Skip to content

Instantly share code, notes, and snippets.

@zenshell
Created January 21, 2013 04:11
Show Gist options
  • Save zenshell/4583532 to your computer and use it in GitHub Desktop.
Save zenshell/4583532 to your computer and use it in GitHub Desktop.
set nocompatible
filetype off
"vbundle
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
"bundle list
source ~/.vim/list.vim
filetype plugin indent on
syntax on
"indentation
set autoindent
set smartindent
"set cindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
"set color
set background=dark
set t_Co=256
"color scheme
"let g:solarized_termtrans = 1
let g:solarized_termcolors = 256
colorscheme solarized
"colorscheme Tomorrow-Night-Eighties
"colorscheme Monokai
set cursorline
set cursorcolumn
set colorcolumn=81
"mouse
set mouse=a
"direction key remapping for faster movement between windows
noremap <C-J> <C-W>j
noremap <C-K> <C-W>k
noremap <C-H> <C-W>h
noremap <C-L> <C-W>l
"gui font
set guifont=Monaco\ Bold\ 10
"history
set history=1024
"matching
set showmatch
set smartcase
set incsearch
set ignorecase
"powerline status
set showcmd
set laststatus=2
set ruler
set nu
"Tagbar
let g:tagbar_width=32
let g:tagbar_autofocus=1
"neocomplcache
let g:neocomplcache_enable_at_startup=1
let g:neocomplcache_enable_smart_case=1
let g:neocomplcache_min_syntax_length=3
let g:neocomplcache_lock_buffer_name_pattern="\*ku\*"
set completeopt-=preview
"utility key mapping
nmap <F2> :NERDTreeToggle <CR>
nmap <F3> :TagbarToggle <CR>
nmap <F4> :GundoToggle <CR>
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
au BufRead,BufNewFile Makefile set noexpandtab
let javascript_enable_domhtmlcss = 1
"omnicompletion
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
"nasm
au BufRead,BufNewFile *.nasm set ft=nasm
"write with sudo
cmap w!! w !sudo tee >/dev/null %
let mapleader=","
nnoremap <Leader>l :set list!<CR>
set listchars=tab:▸\ ,eol:¬
"cd to the current buffer's directory
nnoremap <Leader>cd :cd %:p:h<CR>
"ctrlp
let g:ctrlp_cmd='CtrlPMRU'
let g:ctrlp_by_filename=1
let g:ctrlp_regexp=1
"easymotion
let g:EasyMotion_leader_key='<Leader>'
"ack grep
nnoremap <Leader>a :Ack
"insert mode movement
inoremap <C-K> <Up>
inoremap <C-J> <Down>
inoremap <C-H> <Left>
inoremap <C-L> <Right>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment