How do I customize what Vim considers a 'word' for motions and text objects?
:setlocal iskeyword+=-
The iskeyword option defines which characters are part of a "word" for motions like w, b, e, , and text objects like iw.
366 results for ":w"
:setlocal iskeyword+=-
The iskeyword option defines which characters are part of a "word" for motions like w, b, e, , and text objects like iw.
:command Name action
The :command command defines a new user Ex command.
vim.diagnostic.count()
vim.
:ptag {identifier}
:ptag {identifier} opens a small preview window showing the definition of the given tag, while keeping your cursor in the original window.
:[range]sort /regex/
The :[range]sort /regex/ command sorts lines while skipping the portion of each line that matches the regex.
:only
The :only command closes every window in the current tab page except the one your cursor is in.
:%s/\(pattern1\)\(pattern2\)/\2\1/g
Vim's substitute command supports capture groups that let you match parts of text, remember them, and rearrange or reuse them in the replacement.
stevearc/oil.nvim
oil.
\U, \L, \u, \l, \e in :substitute replacement
Vim's substitute command supports in-replacement case conversion metacharacters that transform the case of matched text without extra scripting.
:silent!
The :silent! modifier runs an Ex command without displaying any output or error messages.
:set winfixheight
When you have a specific window you want to keep at a fixed size — like a terminal, log viewer, or reference file — winfixheight and winfixwidth prevent Vim
:set winfixwidth winfixheight
How it works When you open new split windows in Vim, the existing windows automatically resize to make room.
:norm! {cmd}
Both :norm and :norm! execute a sequence of Normal mode keystrokes from the command line or a script, but they differ in how they handle user-defined mappings.
:sball
The :sball command (short for split all) opens every loaded buffer in its own horizontal split window in one shot.
:<C-u>MyCommand<CR>
When writing nnoremap or vnoremap mappings that call Ex commands, Vim may silently prepend a count or a visual range (') to your command before it runs.
:set fileformat=unix
When you open a Windows file in Vim on a Unix system, you may see ^M at the end of every line — that's the carriage return (\r) from CRLF line endings.
qQ
Recording a macro with an uppercase register letter appends to the existing macro in the corresponding lowercase register instead of overwriting it.
:file {newname}
:file {newname} (short form: :f {newname}) changes the filename Vim associates with the current buffer.
:e ++enc={encoding}
When Vim auto-detects the wrong character encoding — mojibake where é shows as é is a classic symptom — you can reload the current buffer with a specifi
/\v
Vim's default regex syntax requires backslashes before most special characters like +, (, ), {, and , which is the opposite of what most developers expect from