How do you enable incremental search in Vim?
set incsearch
With set incsearch, Vim shows search matches as you type the pattern.
set incsearch
With set incsearch, Vim shows search matches as you type the pattern.
set autoindent smartindent
Use autoindent to copy indentation from the current line.
filetype plugin indent on
This command enables filetype detection, loading of filetype plugins, and filetype-specific indentation.
syntax on
Use syntax on in your vimrc to enable syntax highlighting for all supported file types.
nnoremap <leader>s :w<CR>
Use nnoremap for non-recursive normal mode mappings.
set noswapfile
Use set noswapfile to disable creating .
augroup MyGroup | autocmd! | autocmd BufWrite *.py :!black % | augroup END
Wrap autocommands in an augroup with autocmd! to clear previous entries.
autocmd FileType python setlocal tabstop=4 expandtab
Use autocmd FileType to set buffer-local options for specific filetypes.
vim-which-key plugin
vim-which-key displays a popup showing available key bindings as you type a prefix key.
Plug 'vim-airline/vim-airline'
vim-airline provides a beautiful, feature-rich status line that shows file info, git branch, diagnostics, and more with minimal configuration.
:set shortmess-=S
The shortmess option controls which messages are shortened.
:set updatetime=250
The updatetime option controls how long Vim waits after you stop typing before triggering certain events (like swap file writes and CursorHold autocommands).
: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 belloff=all
The belloff=all option disables all error bells and visual bells in Vim.
Create plugin/myplugin.vim
A basic Vim plugin is just a .
Plug 'sheerun/vim-polyglot'
vim-polyglot is a collection of language packs for Vim.
:TSInstall language
nvim-treesitter provides Tree-sitter integration for Neovim, offering faster and more accurate syntax highlighting, indentation, and text objects.
vim.lsp.buf.definition()
Neovim has a built-in LSP (Language Server Protocol) client that provides IDE-like features without plugins.
let mapleader = " "
The leader key is a prefix for custom mappings.
:set textwidth=80
The textwidth option sets the maximum width for text.