在我的vim编辑器中发生的是->看看光标...
int main() {|
按Enter后。光标始终位于行首,不会自动缩进!
int main() {
|
}
OR
int main() {
if () {
|
}
}
我想要的是...
int main() {
|
}
光标具有2或4个空格缩进!
我该怎么办?
我的.vimcr:
" when I close tab, remove the buffer
set nohidden
" Highlight things that we find with the search
set hlsearch
" Incremental searching
set incsearch
set smartcase
" Enable mouse support in console
set mouse=a
" Line numbers PWN!
set number
set shiftwidth=3
set softtabstop=3
set smarttab
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
inoremap {<cr> {<CR><CR>}<Esc>-cc
我自己整理了解决方案,只删除smartindent !!!