Created
October 11, 2012 09:02
-
-
Save ghprince/3871127 to your computer and use it in GitHub Desktop.
Vim User Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Turn of Vi compatibility | |
set nocompatible | |
set encoding=utf-8 | |
set backspace=2 | |
" Universal map leader | |
let mapleader = "," | |
" Plugin pathogen setting | |
call pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
" ISU syntax setting | |
autocmd BufRead,BufNewFile *.isu set filetype=isu | |
" Centralized backup and swap files | |
set backupdir=~/.vim/backup// | |
set directory=~/.vim/swap// | |
" Enable $ when changing content | |
set cpoptions+=$ | |
" Enable line number and set columns for GVim | |
if has('gui_running') | |
set number | |
set columns=84 | |
endif | |
" Show right edge | |
set colorcolumn=80 | |
" Highlight matching brackets | |
set showmatch | |
" Plugin ctrlp setting | |
set runtimepath^=~/.vim/bundle/ctrlp.vim | |
" Window management | |
nnoremap <C-H> <C-W>h | |
nnoremap <C-J> <C-W>j | |
nnoremap <C-K> <C-W>k | |
nnoremap <C-L> <C-W>l | |
" Plugin NERDTree setting | |
map <silent> <F2> :NERDTreeToggle<CR> | |
" Set font | |
if has('gui_running') | |
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 10 | |
endif | |
" Plugin vim-powerline setting | |
let g:Powerline_symbols = 'fancy' | |
let g:Powerline_colorscheme = 'solarized' | |
set laststatus=2 | |
" Plugin vim-colors-solarized setting | |
" syntax enable | |
if has('gui_running') | |
set background=dark | |
else | |
set background=light | |
endif | |
set t_Co=16 | |
let g:solarized_termcolors=16 | |
colorscheme solarized | |
" Search settings | |
set hlsearch | |
nnoremap <silent> <F3> :set hlsearch!<CR> | |
set incsearch | |
" Tab and Indent | |
set smartindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
" Visible white spaces | |
set listchars=tab:»-,trail:·,nbsp:%,eol:¶,extends:>,precedes:< | |
set nolist | |
nnoremap <silent> <F4> :set list!<CR> | |
" Quick edit Vimrc file | |
autocmd bufwritepost .vimrc source $MYVIMRC | |
nmap <leader>v :rightbelow vsplit $MYVIMRC<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment