Skip to content

Instantly share code, notes, and snippets.

@Adobe-Android
Last active March 8, 2021 18:20
Show Gist options
  • Save Adobe-Android/01e6026d1db5f14743af4fedf4d2edca to your computer and use it in GitHub Desktop.
Save Adobe-Android/01e6026d1db5f14743af4fedf4d2edca to your computer and use it in GitHub Desktop.
Minimal .vimrc
set nocompatible " disable vi compatibility
syntax on " enable syntax highlighting
set background=dark " dark or light. used to help inform syntax highlighting colors
set number " enable line numbers
"
" configure tab width and insert spaces instead of tabs
" https://stackoverflow.com/questions/1562336/tab-vs-space-preferences-in-vim
"
set expandtab " expand tabs to spaces
set tabstop=2 " set tab width to 2 spaces
set softtabstop=2 " number of spaces the Tab character uses impacting backspace behavior
set shiftwidth=2 " set indent to 2 spaces
set nowrap " disable line wrapping
set laststatus=2 " always show status-line
set showmatch " highlight matching braces
set incsearch " highlight while searching with / or ?
set hlsearch " keep search matches highlighted
set lazyredraw " don't redraw while executing macros
set scrolljump=5 " lines to scroll when cursor leaves screen
set scrolloff=3 " minimum lines to keep above and below cursor
set nobackup " disable backups
set noswapfile " disable swapfile
set undofile " enable persistent undo
set undodir=~/.vim/undodir " set undo directory location
set undolevels=1000 " maximum number of changes that can be undone
set undoreload=10000 " maximum number lines to save for undo on a buffer reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment