[英]Emacs org-mode Python source blocks don't export with python-mode.el
[英]Emacs org-mode python blocks have 5 space tabs, but I want 4 space tabs
我在組織模式文件中的源塊內編寫python代碼; 我正在使用emacs命令Cc '
在python模式下在子緩沖區中編輯代碼塊
例:
#+begin_src python
def function(x):
hitting_tab_inserts_5_spaces=x*2
if x<0:
hitting_tab_inserts_5_spaces=-x
return x
我到處都有5個空格標簽,而不是我想要的4個空格標簽。
注意:我有v蛇(vim仿真)。
配置中的哪些參數會影響org-mode文件中代碼塊內的列表?
如果我使用emacs編輯.py
文件,我會得到4個空格的標簽; 這個5空格的標簽只發生在org-mode中。
(defun my-tab-related-stuff ()
(setq indent-tabs-mode t)
(setq tab-stop-list (number-sequence 4 200 4))
(setq tab-width 4)
(setq indent-line-function 'insert-tab))
(add-hook 'org-mode-hook 'my-tab-related-stuff)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.