How do I delete from the cursor to the end of a word?
de
The de command deletes from the cursor position to the end of the current word.
2277 results for "@a"
de
The de command deletes from the cursor position to the end of the current word.
:%s/\r//g
When a file created on Windows is opened in Vim on a Unix system, lines may retain \r (carriage return) characters, displayed as ^M at the end of each line.
:let @/ = '\V' .. escape(expand('<cword>'), '\\')
Sometimes * is too opinionated: it uses keyword boundaries and interprets regex metacharacters.
:set shiftround
shiftround causes indent commands (>, always adds exactly shiftwidth spaces to whatever indentation the line already has With shiftround: > rounds up to the nex
/\%Vpattern
The \%V atom restricts a search pattern to only match inside the most recent visual selection.
:earlier {time} and :later {time}
Vim's :earlier and :later commands let you navigate the undo history by elapsed time rather than by edit count.
:set opfunc and g@
Vim's operatorfunc option lets you define your own operators — just like the built-in d, y, or c — that accept any motion or text object.
winsaveview() and winrestview()
When writing Vimscript functions or complex mappings that move the cursor, it is essential to restore the original view afterward so the user does not notice an
vim.highlight.on_yank()
After yanking text in Vim it can be hard to tell exactly what was captured, especially with larger motions or text objects.
\@<=
The \@<= operator is Vim's zero-width look-behind assertion.
<C-r>=substitute(getreg('+'), '\n\+', ', ', 'g')<CR>
When you paste from the system clipboard into code or config, multiline text often needs to be flattened first.
registers #registers #insert-mode #expression-register #text-processing
vim.api.nvim_create_autocmd('LspAttach', ...)
Setting your LSP keymaps inside a LspAttach autocmd ensures they are only active in buffers where a language server is actually running.
+ and -
The + and - motions jump to the first non-blank character of the next or previous line respectively — combining vertical movement and ^ into a single, count-a
:%s/\v(\w+)/\u\L\1/g
Vim's substitution engine supports case-modifier sequences in the replacement string, making it possible to convert text to title case in a single command.
search #search #substitution #regex #editing #case #formatting
:packadd cfilter
Vim ships with useful optional runtime plugins that many users never load.
plugins #plugins #quickfix #location-list #search #command-line
I{text}<Esc>
When you need to add the same prefix to many adjacent lines, Visual Block insert is faster and safer than repeating macros or substitutions.
"ayy ... "ap
Named registers let you store multiple pieces of text independently.
:set {option}&
Append & to any :set command to reset that option to its compiled-in default value — the value Vim shipped with before any vimrc or plugin changed it.
zA
The zA command toggles the fold under the cursor together with all nested sub-folds in one keystroke.
/\c
Vim lets you override the ignorecase and smartcase settings on a per-search basis using the \c (case-insensitive) and \C (case-sensitive) atoms directly inside