Closed pkubik closed 9 years ago
When I set my tabstop and shiftwidth to 4, the plugin seems to override it to 2
I assume you mean softtabstop
and shiftwidth
, because vim-scala no longer messes with tabstop
at all.
You can create a file ~/.vim/after/ftplugin/scala.vim
and add to it:
setlocal shiftwidth=4 softtabstop=4
Or if you like to keep everything in one .vimrc
file, this will work also:
autocmd FileType scala setlocal shiftwidth=4 softtabstop=4
Either of these will override the plugin's defaults, which have been chosen because they are strongly urged by the Scala style guide and it seems to be followed in most public Scala code we see. Still, the settings can be overridden and the above are the standard ways to do this.
Using localvimrc will also work, if you need to change the plugin defaults only for certain projects.
Closing the issue, please comment if you find that these solutions don't work for you for some reason.
When I set my tabstop and shiftwidth to 4, the plugin seems to override it to 2. I've used ack-grep to find out that the only existances of such override occur in "vim-scala/ftplugin/scala.vim".
My workaround is to simply delete this overrides so it can use my settings. It works but I have no idea what could it break - hopefully nothing.