简体   繁体   中英

Why does gVim move } at the beginning of the line in insert mode?

I was editing a CSS file with gVim on Windows 7 when I realized every time I press Shift + } in insert mode as the 4th character of a line, it is put as the 1st one. For example, if the cursor is at the end of line 31 (see below)

初始情况

and I press Enter , gVim inserts a new line and positions the cursor at the 4th column as follows:

按下Enter后

Here's when I press Shift + } and } is moved to the 1st column:

按下}后

Why does gVim behave in such a way? And how could I fix it?

This behavior is perfectly normal and expected so there is nothing to fix.

It is defined in $VIMRUNTIME/indent/css.vim :

setlocal indentkeys=0{,0},!^F,o,O

See :help 'indentkeys' .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM