Reputation: 5836
I'm trying to change the indentation settings on my vim config, which is currently set to 2 spaces. But neither changing the vimrc.old nor vimrc.after manually nor using the echo 'setting' >> ~/.vimrc.after
way is changing the setting. How can I change my indentation settings with Janus?
Upvotes: 2
Views: 1043
Reputation: 1215
Actually, you don't have to drop Janus. I really like janus myself (for the color theme).
Just create a file ~/.vimrc.after
within the file, set tab to 4 spaces set tabstop=4
Then janus will load the .vimrc.after file after janus
Upvotes: 3
Reputation: 1167
The best way I found was to create a folder in the ~/.janus folder (let's call it mysettings)
In ~/.janus/mysettings/after/ftplugin/ create a file with the name of your file-type you wish to change the indent for. For cpp it would be cpp.vim
Then inside this file set the indent style you wish to use, in my case:
setlocal noexpandtab
setlocal tabstop=4
setlocal shiftwidth=4
setlocal softtabstop=4
setlocal textwidth=0
Then in your .vimrc.after put a line
filetype plugin indent on
Upvotes: 1
Reputation: 196536
Drop Janus and use a regular ~/.vimrc
.
Alternatively, you could type :verbose set {setting}
to see where {setting}
is set. The "problem", here, is that Vim may use a bunch of settings for indentation: try the code above with:
tabstop
softtabstop
shiftwidth
Upvotes: 1