问题描述
我正在使用适用于Python开发人员的YouCompleteMe vim插件. YCM使用jedi-vim自动完成python代码.但是,我想将python缩进配置为2个空格而不是4个(Google Python样式).我怎样才能做到这一点?我尝试在/ftplugin中添加python.vim并设置tabstop = 2 shiftwidth = 2.但这没用.
I'm using YouCompleteMe vim plugin for Python dev. YCM uses jedi-vim to autocomplete python code. However, I want to configure python indentation to 2 spaces not 4 (Google Python style). How can I do this? I tried add python.vim in /ftplugin and set tabstop=2 shiftwidth=2. but it didn't work.
推荐答案
这解决了问题: http://bbs.archlinux.org/viewtopic.php?id=174117 ,因此在.vim文件夹中添加after/ftplugin/language.vim
this solved the problem: http://bbs.archlinux.org/viewtopic.php?id=174117 so adding an after/ftplugin/language.vim in .vim folder
这篇关于jedi-vim和YCM python缩进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!