gvim - Problems with undoing command line command operations and highlighting the line where the cursor is located in Vim
给我你的怀抱
给我你的怀抱 2017-05-16 16:36:38
0
1
960

Regarding gVim in Windows environment, I have the following questions. I would like some Vim experts to give me some advice:

1) I know that u is the command to undo the last editing operation. Is there any command to undo the last command line operation? For example, after I type::set list, I want to cancel the operation directly. Without typing::set nolist, are there other more general shortcut keys and commands?

2) How to highlight the line where the cursor is and change the line number color of the line where the cursor is in insert mode (for example, change it to red to more clearly remind yourself that you are in insert mode); and then restore it after exiting insert mode. For the original?

3) A very strange problem: Set the line number foreground color: highlight LineNr guifg=dimgray. It can be successfully set by entering it on the command line, but it does not work after writing it to the _vimrc file, saving it and restarting. why is that? No error was reported when starting. The settings in the _vimrc file are as follows:

Greatful!

给我你的怀抱
给我你的怀抱

reply all(1)
曾经蜡笔没有小新

1) Not as far as I know

2) A solution copied from StackOverflow:

" Enable CursorLine
set cursorline

" Default Colors for CursorLine
highlight  CursorLine ctermbg=Yellow ctermfg=None

" Change Color when entering Insert Mode
autocmd InsertEnter * highlight  CursorLine ctermbg=Green ctermfg=Red

" Revert Color to default when leaving Insert Mode
autocmd InsertLeave * highlight  CursorLine ctermbg=Yellow ctermfg=None

3) Vim may not read your _vimrc file. You can check the settings to see if there is a problem.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!