Closed lliuaotian closed 6 years ago
It should be:
[options]
default_indent = 8
expand_tab = false
but I recommand to use editorconfig, this plugin has been included in SpaceVim.
thank you.
this seems not working for python! is that because of the pep standard?
Becasue some python ftplugin change this config, I can not fix it. you need to find which plugin change this, and disable that plugin for python.
thanks. which ftplugins do SpaceVim have?
Jingpeng Wu Postdoc in Princeton Neuroscience Institute, Princeton University, NJ website: jingpengw.github.io
On Thu, Nov 29, 2018 at 10:38 AM Wang Shidong notifications@github.com wrote:
Becasue some python ftplugin change this config, I can not fix it. you need to find which plugin change this, and disable that plugin for python.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SpaceVim/SpaceVim/issues/2237#issuecomment-442878918, or mute the thread https://github.com/notifications/unsubscribe-auth/AHTA9ZRVPRC0prTGq3EWhezoYDMz2TdLks5uz_-MgaJpZM4XKYF0 .
It seems that the plugin vim-python-pep8-indent
is forcing it following the pep8 standard, which requires the indent to be 4.
yeah, you can try to disable that plugin.
Shidong Wang
-------- 原始邮件 -------- 主题:Re: [SpaceVim/SpaceVim] How to modify tab indentation. (#2237) 发件人:Jingpeng Wu 收件人:SpaceVim/SpaceVim 抄送:Wang Shidong ,State change
It seems that the plugin vim-python-pep8-indent is forcing it following the pep8 standard.
― You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/SpaceVim/SpaceVim/issues/2237#issuecomment-448688114, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMiJkvYGZ2G4MOrbaynrnhEhu8AeX0VUks5u6n5ngaJpZM4XKYF0.
can I specify different indent for different languages? such as indent 4 for python and indent 2 for C++.
I tried to set default_indent=2
in layers
section, but do not work.
can I specify different indent for different languages? such as indent 4 for python and indent 2 for C++. I tried to set
default_indent=2
inlayers
section, but do not work.
@jingpengw did you find a solution?
unfortunately not. I am using VSCode now...
On Thu, Sep 17, 2020 at 8:50 PM louise notifications@github.com wrote:
can I specify different indent for different languages? such as indent 4 for python and indent 2 for C++. I tried to set default_indent=2 in layers section, but do not work.
@jingpengw https://github.com/jingpengw did you find a solution?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SpaceVim/SpaceVim/issues/2237#issuecomment-694581494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2MB5KOKAJJN4RNYJJV4XLSGKVF3ANCNFSM4FZJQF2A .
"The default_indent option will be applied to vim’s &tabstop, &softtabstop and &shiftwidth options." Code-indentation
First of all, reset all of such forcing commands after SpaceVim initialized. Although you didn't change these settings before, these commands were already setup by SpaceVim, making all other indent-related settings not working.
Bootstrap functions Modify and add commands like this as below
function! myspacevim#after() abort
"" Add your codes here
set tabstop&
set softtabstop&
set shiftwidth&
endfunction
Then, you can do whatever you want with other formatters
Hello, my English is not good, so the next question I use is Google Translate. The question I want to ask is that I am used to tab indentation of 4 spaces, and Spacevim defaults to 2 indents. It makes me very headache, and the vertical line mark tab of Spacevim is also based on 2 spaces. I don't know how to modify it.