How do I change text from the cursor to the end of the line?
C
The C command deletes everything from the cursor position to the end of the line and places you in insert mode.
31 results for "d motion"
C
The C command deletes everything from the cursor position to the end of the line and places you in insert mode.
onoremap ih :<C-u>execute "normal! ?^==\+$\r:noh\rkvg_"<CR>
Vim lets you define custom text objects using operator-pending mode mappings (onoremap) and visual mode mappings (vnoremap).
]]
The ]] motion jumps forward to the next line that starts with { in the first column, which is typically the beginning of a C-style function or section.
<C-o>{cmd}
Pressing in insert mode lets you execute one normal mode command and then automatically returns you to insert mode.
dap / dip
The dap and dip commands use Vim's paragraph text objects to delete an entire block of contiguous text in a single motion.
editing #editing #text-objects #normal-mode #delete #motions
s{char}{char}
The vim-sneak plugin by Justin Keyes provides a motion that lets you jump to any visible location by typing just two characters.
v%
How it works The % motion jumps to the matching bracket, parenthesis, or brace.
:options
:options opens a special Vim buffer that lists every available option, grouped by category (appearance, editing, search, etc.
:'<,'>s/pattern/replacement/g
When you make a visual selection and then type :, Vim automatically inserts ' as the range — the marks for the start and end of the last visual selection.
di(
The di( command deletes everything inside the nearest pair of parentheses without removing the parentheses themselves.
; / ,
After using f, t, F, or T to jump to a character on the current line, pressing ; repeats the same search in the same direction, and , repeats it in the opposite
navigation #navigation #motions #normal-mode #editing #productivity