How do I run a command on every open buffer?
:bufdo command
The :bufdo command executes an Ex command on every buffer in the buffer list.
1024 results for "i" a""
:bufdo command
The :bufdo command executes an Ex command on every buffer in the buffer list.
:set autoindent
The autoindent option copies the indentation from the current line when starting a new line.
:filetype plugin indent on
The filetype plugin indent on command enables three key features: file type detection, filetype plugins, and filetype-based indentation.
Plug 'sheerun/vim-polyglot'
vim-polyglot is a collection of language packs for Vim.
cs"' (change), ds" (delete), ys iw" (add)
The vim-surround plugin by Tim Pope adds commands for working with surrounding characters like quotes, brackets, and tags.
"0p in visual mode
When you paste over a visual selection with p, Vim replaces the selection with the register contents — but it also puts the deleted selection into the unnamed
P (in visual mode)
When you paste over a visual selection using p (lowercase), Vim replaces the selection with your register contents — but the replaced text overwrites your unn
zz / zt / zb
Vim's z scroll commands reposition the screen relative to the cursor without moving the cursor itself.
navigation #navigation #scrolling #viewport #cursor-position
:bufdo
When you need to apply the same change to every file you have open in Vim, switching to each buffer manually is tedious and error-prone.
:set option
The :set command changes Vim options for the current session.
:set clipboard=unnamedplus
Setting clipboard=unnamedplus makes Vim's default yank and paste use the system clipboard.
:m {address}
How it works The :m command (short for :move) moves one or more lines to after the specified address.
autocmd FileType python setlocal ts=4 sw=4 et
Using autocmd FileType, you can configure Vim to automatically apply buffer-local settings whenever a file of a particular type is opened.
:set termguicolors
The termguicolors option enables 24-bit RGB color support, allowing color schemes to use millions of colors instead of the terminal's 256-color palette.
:set paste
The :set paste command enables paste mode, which temporarily disables auto-indentation, smart tabs, and other insert-mode features that can mangle text pasted f
[{
The [{ command moves backward to the nearest unmatched {.
ci(
The ci( command deletes everything inside the nearest pair of parentheses and places you in insert mode, ready to type a replacement.
/\zs and \ze
The \zs and \ze atoms let you define where the actual match starts and ends within a larger pattern.
v
The v command enters character-wise visual mode, letting you select text one character at a time.
let mapleader = " "
The leader key is a prefix for custom mappings.