.vimrc
" Run git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() " required | |
" core plugins | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'kien/ctrlp.vim' | |
" language vundles | |
Plugin 'pangloss/vim-javascript' | |
" Plugin 'marijnh/tern_for_vim' | |
Plugin 'kchmck/vim-coffee-script' | |
Plugin 'othree/javascript-libraries-syntax.vim' | |
Plugin 'digitaltoad/vim-pug' | |
" autocomplete | |
" Plugin 'Valloric/YouCompleteMe' | |
Plugin 'MarcWeber/vim-addon-mw-utils' | |
Plugin 'tomtom/tlib_vim' | |
Plugin 'tpope/vim-surround' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'townk/vim-autoclose' | |
" snippets | |
Plugin 'SirVer/ultisnips' | |
Plugin 'honza/vim-snippets' | |
Plugin 'garbas/vim-snipmate' | |
" Nerd tree | |
Plugin 'scrooloose/nerdtree' | |
" Search directory | |
Plugin 'mileszs/ack.vim' | |
" Tagbar | |
Plugin 'majutsushi/tagbar' | |
" Airline | |
Plugin 'bling/vim-airline' | |
" HTML Tag | |
Plugin 'Valloric/MatchTagAlways' | |
" Fuzzy Finder | |
Plugin 'vim-scripts/L9' | |
Plugin 'vim-scripts/FuzzyFinder' | |
" Colorscheme | |
Plugin 'chriskempson/base16-vim' | |
" Git | |
Plugin 'tpope/vim-fugitive' | |
call vundle#end() " required | |
filetype plugin indent on | |
set t_Co=256 | |
" syntax highlighting | |
syntax on | |
" colorscheme jellybeans | |
colorscheme zenburn | |
" airline | |
let g:airline_theme = 'wombat' | |
if !exists('g:airline_symbols') | |
let g:airline_symbols = {} | |
endif | |
" unicode symbols | |
let g:airline_left_sep = '»' | |
let g:airline_left_sep = '▶' | |
let g:airline_right_sep = '«' | |
let g:airline_right_sep = '◀' | |
let g:airline_symbols.linenr = '␊' | |
let g:airline_symbols.linenr = '' | |
let g:airline_symbols.linenr = '¶' | |
let g:airline_symbols.branch = '⎇' | |
let g:airline_symbols.paste = 'ρ' | |
let g:airline_symbols.paste = 'Þ' | |
let g:airline_symbols.paste = '∥' | |
let g:airline_symbols.whitespace = 'Ξ' | |
" general configs | |
set expandtab | |
set smarttab | |
set shiftwidth=4 | |
set softtabstop=4 | |
set tabstop=4 | |
set autoindent | |
set ruler | |
set hidden | |
set ignorecase | |
set smartcase | |
set showmatch | |
set incsearch | |
set hls | |
set relativenumber | |
set ls=2 | |
set cursorline | |
set nowrap | |
set backspace=indent,eol,start | |
set shell=/bin/bash | |
set completeopt -=preview | |
set textwidth=100 | |
set wildmenu | |
set ttyfast | |
"set noshowmode | |
set cmdheight=1 | |
set number | |
set showcmd | |
" Make sure Vim returns to the same line when you reopen a file. | |
augroup line_return | |
au! | |
au BufReadPost * | |
\ if line("'\"") > 0 && line("'\"") <= line("$") | | |
\ execute 'normal! g`"zvzz' | | |
\ endif | |
augroup END | |
" Text Highlighter = <leader>hx | |
function! HiInterestingWord(n) | |
" Save our location. | |
normal! mz | |
" Yank the current word into the z register. | |
normal! "zyiw | |
" Calculate an arbitrary match ID. Hopefully nothing else is using it. | |
let mid = 86750 + a:n | |
" Clear existing matches, but don't worry if they don't exist. | |
silent! call matchdelete(mid) | |
" Construct a literal pattern that has to match at boundaries. | |
let pat = '\V\<' . escape(@z, '\') . '\>' | |
" Actually match the words. | |
call matchadd("InterestingWord" . a:n, pat, 1, mid) | |
" Move back to our original location. | |
normal! `z | |
endfunction | |
nnoremap <leader>hh :call clearmatches()<CR>:noh<CR> | |
nnoremap <silent> <leader>h1 :call HiInterestingWord(1)<cr> | |
nnoremap <silent> <leader>h2 :call HiInterestingWord(2)<cr> | |
nnoremap <silent> <leader>h3 :call HiInterestingWord(3)<cr> | |
nnoremap <silent> <leader>h4 :call HiInterestingWord(4)<cr> | |
nnoremap <silent> <leader>h5 :call HiInterestingWord(5)<cr> | |
nnoremap <silent> <leader>h6 :call HiInterestingWord(6)<cr> | |
hi def InterestingWord1 guifg=#000000 ctermfg=16 guibg=#ffa724 ctermbg=214 | |
hi def InterestingWord2 guifg=#000000 ctermfg=16 guibg=#aeee00 ctermbg=154 | |
hi def InterestingWord3 guifg=#000000 ctermfg=16 guibg=#8cffba ctermbg=121 | |
hi def InterestingWord4 guifg=#000000 ctermfg=16 guibg=#b88853 ctermbg=137 | |
hi def InterestingWord5 guifg=#000000 ctermfg=16 guibg=#ff9eb8 ctermbg=211 | |
hi def InterestingWord6 guifg=#000000 ctermfg=16 guibg=#ff2c4b ctermbg=195 | |
highlight search ctermfg=white ctermbg=3423513 | |
" enable angular syntax | |
let g:used_javascript_libs = 'jquery,angularjs' | |
" nmap <F7> :tabp <CR> | |
" nmap <F8> :tabn <CR> | |
" nmap <F6> :TagbarToggle <CR> | |
" nmap <F3> :NERDTree <CR> | |
nnoremap <silent> <esc> :noh<cr><esc> | |
set guioptions-=r | |
set guioptions-=T | |
set guioptions-=L | |
nmap ,f :FufFileWithCurrentBufferDir<CR> | |
nmap ,b :FufBuffer<CR> | |
nmap ,t :FufTaggedFile<CR> | |
map <leader>d :execute 'NERDTreeToggle ' . getcwd()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment