Last active
May 8, 2018 06:41
-
-
Save hebbian/babff155ada03d9f1b95b8a53f7d6e9f to your computer and use it in GitHub Desktop.
Mac Vimrc
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
" 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 'keith/swift.vim' | |
Plugin 'fatih/vim-go' | |
Plugin 'chemzqm/vim-jsx-improve' | |
Plugin 'leafgarland/typescript-vim' | |
Plugin 'udalov/kotlin-vim' | |
" 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' | |
Plugin 'vim-airline/vim-airline-themes' | |
" HTML Tag | |
Plugin 'Valloric/MatchTagAlways' | |
" Fuzzy Finder | |
Plugin 'vim-scripts/L9' | |
Plugin 'vim-scripts/FuzzyFinder' | |
" Colorscheme | |
Plugin 'chriskempson/base16-vim' | |
Plugin 'digitaltoad/vim-pug' | |
" Git | |
Plugin 'tpope/vim-fugitive' | |
" Additional Plugins | |
" Plugin 'mhinz/vim-startify' | |
Plugin 'mbbill/undotree' | |
" required | |
call vundle#end() | |
filetype plugin indent on | |
set t_Co=256 | |
" syntax highlighting | |
syntax on | |
" colorscheme jellybeans | |
" colorscheme zenburn | |
" colorscheme true-monochrome | |
colorscheme monochrome | |
" colorscheme Tomorrow-Night-Bright | |
" airline | |
" let g:airline_theme = 'wombat' | |
let g:airline_theme = 'raven' | |
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> | |
nnoremap <leader>u :UndotreeToggle<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment