zhuang@linux:~/reading/practical-vim/03-insert-mode/$ less

Practical Vim / chapter 03

Insert Mode

$ grep tags 03-insert-mode.md

This post extracts some knowledge from Chapter 3 – Insert Mode.

Expert typists recommend drastic measures: delete the entire word; then type it out again.

KeystrokesEffect
C-hDelete back one character(backspace)
C-wDelete back one word
C-uDelete back to start of line

These commands are not unique to Insert mode or even to Vim. We can also use them in Vim’s command line as well as in the bash shell.

C-[ == Esc

From Insert mode, switch to Insert Normal mode by pressing C-o.

Insert Normal mode is a special version of Normal mode, which gives us one bullet.

zz command redraws the screen with the current line in the middle of the window.

Map the Caps Lock button to Ctrl key.

The <C-r>{register} command is convenient for pasting a few words from Insert mode.

The expression register is addressed by the = symbol. From Insert mode we can access it by type <C-r>=.

From Insert mode, type <C-v>{code}(here three decimal digits). And <C-v>u{code} (here four-digit hexadecimal) for unicode character.

¿ – ga show the character code in dicimal and hexadecimal notions below status line.

From Insert mode, type <C-k>{char1}{char2} to insert digraphs.

¿ – <C-k>?I

In my neovim config, it’s replaced by blink.cmp plugin, and i think that it is less used.

From Normal mode, we can engage Replace mode with the R command.

Virtual Replace mode is triggered with gR and treats the tab character as though it consisted of spaces.

Recommend using Virtual Replace mode whenever possible.

The r{char} and gr{char} commands allow us to overwrite a single character before switching straight back to Normal mode.

zhuang@linux:~/reading/practical-vim/03-insert-mode/$ comments