How do I replace the contents of the entire current line?
cc
The cc command deletes the entire content of the current line (preserving indentation) and enters insert mode.
210 results for "insert mode"
cc
The cc command deletes the entire content of the current line (preserving indentation) and enters insert mode.
ci`
The ` ci ` command changes the text inside backtick delimiters.
<C-v>jjI\=printf('%02d ', line('.')-line("'<")+1)<CR><Esc>
By combining visual block insert with Vim's expression register, you can insert dynamically computed line numbers at the start of each selected line.
visual-mode #visual-mode #block-mode #line-numbers #expression-register
:<C-r>a
How it works While typing an Ex command on the command line (after pressing :), you can insert the contents of any register by pressing Ctrl-R followed by the r
O
The O (uppercase) command opens a new blank line above the current line and places you in insert mode, ready to type.
<C-k>
Vim has a built-in digraph system that lets you type special characters using short two-character codes.
<C-t> and <C-d> in insert mode
When typing in insert mode, you can adjust the current line's indentation without leaving to normal mode.
ct{char}
The ct{char} command deletes everything from the cursor up to (but not including) the specified character and drops you into insert mode.
editing #editing #motions #normal-mode #text-objects #productivity
<C-r><C-r>{register}
In insert mode, {register} pastes the register's contents but runs it through Vim's insert-mode processing — including autoindent, textwidth wrapping, and for
<C-r><C-f>
While typing a command, inserts the filename under the cursor in the buffer at the command-line prompt.
r<CR>
You can split a line at the cursor without entering Insert mode by using r.
ci"
The ci" command deletes everything inside the nearest pair of double quotes and drops you into insert mode, ready to type the replacement.
ce
The ce command changes from the cursor position to the end of the current word.
:<C-r>"
When typing an Ex command or search pattern, you often need to insert text you've already yanked or deleted.
<C-r><C-r>{register}
In insert mode, {reg} pastes from a register but treats certain bytes as key inputs — so a register containing \n triggers a newline, \x08 triggers backspace,
<C-x><C-l>
The command triggers whole-line completion in insert mode.
<C-v>jj$A;
Visual block mode normally selects a fixed-width column, which makes appending tricky when lines have different lengths.
<C-x><C-f>
The command triggers filename completion in insert mode.
editing #editing #insert-mode #completion #file-management #productivity
:ab teh the
Vim's abbreviation system automatically expands short text sequences as you type, making it perfect for auto-correcting typos, inserting boilerplate snippets, o
config #editing #insert-mode #config #productivity #auto-correct
:echo @%
Vim provides special read-only registers that hold the current and alternate filenames.