Vim压痕配置

问题描述 投票:0回答:1

在我的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
vim configuration indentation vi
1个回答
0
投票

我自己整理了解决方案,只删除smartindent !!!

© www.soinside.com 2019 - 2024. All rights reserved.