How do I open a floating window showing diagnostic details at the cursor using a built-in Neovim key?
<C-w>d
Neovim 0.
buffers-windows #diagnostics #lsp #floating-window #neovim #buffers #windows
366 results for ":w"
<C-w>d
Neovim 0.
buffers-windows #diagnostics #lsp #floating-window #neovim #buffers #windows
:w !diff % -
The command :w !diff % - pipes the current buffer's contents to an external diff command that compares it against the saved file on disk.
buffers-windows #buffers-windows #ex-commands #editing #navigation
:%s/\<\w\+\>/\=toupper(submatch(0))/g
The \= flag in the replacement part of :substitute tells Vim to evaluate what follows as a Vimscript expression instead of treating it as a literal string.
:%s/\w\+/\u&/g
Vim's substitute command supports case-conversion modifiers in the replacement string.
W, B, and E
How it works Vim distinguishes between two types of word objects: A word (lowercase w, b, e) is a sequence of letters, digits, and underscores, or a sequence of
:s/\(\w\+\)/\u\1/g
Vim's substitute command supports case-change modifiers in the replacement string that let you capitalize, uppercase, or lowercase matched text as part of the s
w
The w command moves the cursor forward to the beginning of the next word.
:w ++ff=unix
The ++ff modifier on :w forces the file format used for writing, independently of the buffer's 'fileformat' option.
command-line #ex-commands #formatting #command-line #editing
/\(\<\w\+\>\)\_s\+\1\>
When writing or editing text, repeated words like "the the" or "is is" are a common typo that spell checkers often miss.
<C-w>TgT
When a split temporarily becomes the center of attention, promoting it to its own tab can reduce layout noise.
:set complete=.,w,b,t
Default keyword completion can feel noisy in large projects because Vim may scan extra sources you do not care about in the moment.
<C-w>f
How it works You may already know that gf opens the file path under the cursor in the current window.
:wincmd {cmd}
:wincmd {key} is the Ex command equivalent of every {key} window shortcut.
buffers-windows #buffers-windows #windows #ex-commands #normal-mode
:%s/\v<(\w+)\s+\1>/\1/g\<CR>
OCR cleanup, copy-paste artifacts, and rushed note-taking often produce repeated words like the the or is is.
<C-w>N
When using Vim's built-in :terminal, the buffer is in Terminal-Job mode by default, meaning all keystrokes go to the running shell.
<C-w><C-^>
Press (Ctrl+W followed by Ctrl+6) to open the alternate file in a horizontal split.
:term then <C-w>N for normal mode
Vim 8+ and Neovim have a built-in terminal emulator that runs inside a buffer.
command-line #command-line #terminal #workflow #productivity
\d \w \s \a \l \u
How it works Vim provides shorthand character classes that save you from writing out full bracket expressions.
:wincmd {key}
:wincmd is the Ex command equivalent of any keystroke.
:w !sudo tee %
The :w !sudo tee % command lets you save a file that requires root permissions, even if you forgot to open Vim with sudo.