How do I select a rectangular block past the end of shorter lines in visual block mode?
:set virtualedit=block
By default, Vim's visual block mode () is limited by line length — if some lines are shorter than others, the block selection gets ragged.
:set virtualedit=block
By default, Vim's visual block mode () is limited by line length — if some lines are shorter than others, the block selection gets ragged.
:set iskeyword+={char}
iskeyword defines which characters are considered word characters in Vim.
:verbose set {option}?
:verbose set {option}? shows the current value of an option and reports exactly which file set it last — the full path and line number.
:set breakindent
When wrap is enabled, long lines wrap to the next screen row starting at column 1 by default, which makes indented code look messy.
:set pumheight=10
By default, Vim's completion popup menu (the PUM — Pop-Up Menu) can expand to fill the entire screen if there are many candidates.
:set lazyredraw
When Vim runs a macro or an :argdo / :bufdo loop, it redraws the screen after every command by default.
:set linebreak
By default, when wrap is enabled, Vim wraps long lines at the window edge — which can split words in the middle.
autocmd FileType python setlocal expandtab shiftwidth=4
Vim's autocmd FileType lets you apply settings automatically whenever a specific file type is detected.
:options
:options opens a special Vim buffer that lists every available option, grouped by category (appearance, editing, search, etc.
:set exrc
Vim's exrc option tells Vim to look for a .
:set statusline=%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
Vim's built-in statusline option lets you build a custom status bar that displays exactly the information you want — without any plugin.
:set autoread
The autoread option tells Vim to automatically re-read a file when it detects the file has been changed outside of Vim.
:set conceallevel=2
The conceallevel option controls how Vim displays characters that have the "conceal" syntax attribute.
set signcolumn=yes
Use set signcolumn=yes to always display the sign column (used by diagnostics, git markers).
:source $MYVIMRC
Use :source $MYVIMRC or :so % if editing the vimrc to reload configuration.
set wildmenu wildmode=longest:full,full
Enable wildmenu for a visual menu above the command line.
set showmatch
Enable showmatch to briefly highlight the matching bracket when you type a closing bracket.
set relativenumber
Use set relativenumber (or set rnu) to show line numbers relative to the cursor position.
set list listchars=tab:>-,trail:~,extends:>,precedes:<
Enable list and configure listchars to show tabs as >-, trailing spaces as ~, and indicators for text extending beyond the screen.
set number
Use set number (or set nu) to display absolute line numbers in the left margin.