Skip to content

Instantly share code, notes, and snippets.

@zeph1e
Created January 9, 2015 01:09
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 zeph1e/bc48410233b78aa23f78 to your computer and use it in GitHub Desktop.
Save zeph1e/bc48410233b78aa23f78 to your computer and use it in GitHub Desktop.
"-----------------------------------------------------------
" GENERAL
"----------------------------------------------------------
" history
set history=700
" enable filetype plugins
filetype plugin on
filetype indent on
" autoread when file is changed from outside
set autoread
" I like ansi color
set term=ansi
" syntax highlighting
syntax on
" turn on wild menu
set wildmenu
" ignore compiled files
set wildignore=*.o,*~,*.pyc
" show current position
set ruler
" height of command bar
set cmdheight=2
" expand a tab to 4 spaces except Makefiles
let _curfile = expand("%:t")
if _curfile =~ "Makefile" || _curfile =~ "makefile" || _curfile =~ ".*\.mk"
set noexpandtab
else
set shiftwidth=4
set tabstop=4
set expandtab
endif
" indent
set autoindent
set smartindent
set paste
" jump to matching brace
noremap % V%
" no backup file but prepare for the case we crash
set nobackup
set writebackup
" encoding
set encoding=utf-8
set fileencodings=utf-8,cp949,default,latin1
set termencoding=utf-8
" highlight for unexpected spaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment