Skip to content

Instantly share code, notes, and snippets.

@mrpollo
Created June 25, 2025 16:46
Show Gist options
  • Save mrpollo/84a94630a36e083f492755a2ea0ccdbe to your computer and use it in GitHub Desktop.
Save mrpollo/84a94630a36e083f492755a2ea0ccdbe to your computer and use it in GitHub Desktop.
@mrpollo vimrc
" ~/.vimrc -- @mrpollo's Vim configuration
" show line numbers
set number
set relativenumber
" show ruler (line and column numbers in the status line)
set ruler
" disable line wrapping per buffer (you can still toggle with :set wrap)
set nowrap
" use soft tabs of 2 spaces and make real tabs insert 2 spaces
set expandtab " convert tabs to spaces
set shiftwidth=2 " spaces per indent
set tabstop=2 " spaces per tab
" show trailing whitespace as a dot
set list " enable display of whitespace characters
set showbreak=↪\
set listchars=tab:→\ ,eol:↲,nbsp:␣,trail:•,extends:⟩,precedes:⟨
" search settings: highlight, incremental, case-insensitive unless uppercase is used
set hlsearch " highlight search results
set incsearch " show matches as you type
set ignorecase " ignore case by default
set smartcase " override ignorecase if search has uppercase
" always show a status line
set laststatus=2
" allow unrestricted backspacing in insert mode
set backspace=indent,eol,start
" buffer navigation shortcuts: previous and next buffer
nnoremap [b :bprevious
nnoremap ]b :bnext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment