How do I resize Vim windows to exact dimensions?
:resize N / :vertical resize N
The :resize and :vertical resize commands set a window to an exact number of lines or columns.
366 results for ":w"
:resize N / :vertical resize N
The :resize and :vertical resize commands set a window to an exact number of lines or columns.
:vsplit
The :vsplit command (or :vs for short) splits the current window vertically, creating a new window side-by-side with the current one.
<Leader><Leader>w
The vim-easymotion plugin replaces Vim's default motion commands with a visual overlay system that lets you jump to any visible position on screen in just two o
let mapleader = " "
The leader key is a prefix for custom mappings.
:set winminheight=0
By default, Vim enforces a minimum window height of 1 line, which means you can never fully collapse a split.
buffers-windows #buffers-windows #windows #splits #navigation
:%s/\(group\)/\1/g
Capture groups in Vim substitute let you match parts of a pattern and reuse them in the replacement.
:[range]write >> filename
The >> modifier on :write appends lines to a file instead of overwriting it.
command-line #command-line #ex-commands #file-handling #editing
:normal!
The :normal! command (with !) executes normal mode keystrokes exactly as Vim defines them, ignoring any user-defined mappings.
:resize +N / :resize -N
:resize adjusts the height of the current window by a relative or absolute amount.
<C-r>/
Vim stores your last search pattern in the / register.
:diffthis in both windows
The :diffthis command enables diff mode for the current buffer.
:update
The :update command (abbreviated :up) writes the buffer to disk only if it has been modified since the last save.
:norm! {command}
:normal {command} runs a sequence of Normal mode keystrokes from the command line (or a range of lines with :%normal), but it applies your custom key mappings.
command-line #ex-commands #macros #normal-mode #command-line
let mapleader = ' '
Set mapleader to space (or any key) to use as a prefix for custom mappings.
:pedit
Vim has a built-in preview window — a special window distinct from regular splits.
":p
The : register holds the most recently executed Ex command.
registers #registers #ex-commands #normal-mode #productivity
:cabbrev
:cabbrev (command-line abbreviation) lets you define short aliases for longer Ex commands.
:%s/pattern/\=MyFunc(submatch(0))/g
The \= prefix in Vim's substitute replacement invokes the expression register, which can call any Vimscript function.
:nnoremap / :inoremap / :vnoremap
Vim has two types of key mappings: recursive (:map, :nmap, :imap) and non-recursive (:noremap, :nnoremap, :inoremap).
:saveas {newname}
:saveas saves the buffer to a new file and redirects all future :w commands to write to that new filename — making it the true "Save As" command in Vim.