Skip to content

Instantly share code, notes, and snippets.

@ybbond
Last active July 30, 2020 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ybbond/d73cad5d901173d8654334a440f755cb to your computer and use it in GitHub Desktop.
Save ybbond/d73cad5d901173d8654334a440f755cb to your computer and use it in GitHub Desktop.
This is the very minimal Vim configuration that makes me more productive than vanilla Vim. I usually use this on server.
syntax enable
syntax on
filetype plugin indent on
set number
set relativenumber
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set ruler
set incsearch
set showmatch
set ignorecase
set smartcase
set hlsearch
nnoremap <LEADER><SPACE> :nohlsearch<CR>
inoremap jk <ESC>
if !isdirectory($HOME."/.vim")
call mkdir($HOME."/.vim", "", 0770)
endif
if !isdirectory($HOME."/.vim/undo-dir")
call mkdir($HOME."/.vim/undo-dir", "", 0770)
endif
set undodir=~/.vim/undo-dir
if has ('persistent_undo')
set undofile
set undolevels=250
set undoreload=500
endif
set t_SI=^[[5\ q
set t_SR=^[[4\ q
set t_EI=^[[1\ q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment