Skip to content

Instantly share code, notes, and snippets.

@ybbond
Last active Jul 30, 2020
Embed
What would you like to do?
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