Reputation: 3945
I have a file that is set to indent by four spaces. I have a block of code that looks something like:
content
content
end
You can see how everything above is 4 spaces in. Vim likes to do something like:
content
content
new line #(2 spaces, not 4)
end
I set up my vimrc file to have the following lines, in addition to the default settings:
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
What's going on? Even if I do 1>>
it moves too far over and 1<<
moves to far left.
Upvotes: 2
Views: 143
Reputation: 326
I think smartindent
is depreciated. Try cindent
for C-style languages. You could also try filetype indent on
.
Upvotes: 1