Alternative to using backspace in vim

When I make a mistake in vim, I use backspace because switching to command mode and using "x" is longer, but maybe this is another way to do it in vim-way?

+3
source share
3 answers

ctrl-wto erase the last word, ctrl-uto delete the entire line that you are in.

+7
source

You can use uto cancel. However, it usually erases the entire last line that you typed ...

Depending on the situation, you can use the following text objects:

  • ciwto erase and rewrite the current word
  • c$to erase and rewrite everything to the end of the line
  • c^to erase and rewrite everything at the beginning of the line.
  • ci),

. :help text-objects.

, Vim r .

  • type tje home
  • j fj fj , j
  • r, h
+4

In insert mode ctrl+h, it does the same as the return key (i.e., deletes one character back).

+2
source

Source: https://habr.com/ru/post/1788926/


All Articles