A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged

2

The reason that o works the way it does is that, with autoindent or smartindent set, it will insert whitespace in order to match the indentation of the previous line. When you move downwards in normal mode without entering insert mode, the line remains empty and no text is added, so the cursor moves to the start of the line. The simplest way to achieve ...


1

That's a bell (a visual bell). You can turn off bells for Esc in normal mode using belloff: *'belloff'* *'bo'* 'belloff' 'bo' string (default "") global Specifies for which events the bell will not be rung. It is a comma separated list of items. For each item that is present, the bell will be silenced. ...


0

To insert a char at the end of a word (instead of at the cursor position), use nnoremap <C-a> a <ESC>r This maps to Ctrl + a, you can map it to anything else of course. I have the two in my .vimrc just so I don't hustle much :) " Insert char at cursor position nnoremap <C-i> i <ESC>r " Append char after cursor position nnoremap &...


6

As discussed in the comments you are looking for the following mapping nnoremap <leader>i yiwoThe word is <Esc>p yiw Yank the word under the cursor o Create a new line under the current one and enter insert mode The word is Type this ...


Top 50 recent answers are included