Created
April 6, 2018 19:00
-
-
Save mmcfarland/4ec7211aff7d0215edb2076070851c7f to your computer and use it in GitHub Desktop.
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
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" " required! | |
Bundle 'gmarik/vundle' | |
Bundle 'kien/ctrlp.vim' | |
Bundle 'tpope/vim-vinegar' | |
Bundle 'tpope/vim-surround' | |
Bundle 'tpope/vim-repeat' | |
Bundle 'xolox/vim-misc' | |
Bundle 'xolox/vim-easytags' | |
Bundle 'nvie/vim-flake8' | |
Bundle 'Shutnik/jshint2.vim' | |
Bundle 'scrooloose/syntastic' | |
Bundle 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Bundle 'valloric/MatchTagAlways' | |
Bundle 'Lokaltog/vim-easymotion' | |
Bundle 'head.vim' | |
Plugin 'docker/docker' , {'rtp': '/contrib/syntax/vim/'} | |
Plugin 'pangloss/vim-javascript' | |
Plugin 'mxw/vim-jsx' | |
Bundle 'Valloric/YouCompleteMe' | |
Plugin 'JamshedVesuna/vim-markdown-preview' | |
" Clojure | |
Bundle 'guns/vim-clojure-static' | |
Bundle 'kien/rainbow_parentheses.vim' | |
Bundle 'tpope/vim-fireplace' | |
let g:python_host_prog = '/usr/bin/python' | |
" The Silver Searcher | |
if executable('ag') | |
" Use ag over grep | |
set grepprg=ag\ --nogroup\ --nocolor | |
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore | |
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' | |
" ag is fast enough that CtrlP doesn't need to cache | |
let g:ctrlp_use_caching = 0 | |
endif | |
" bind K to grep word under cursor | |
nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR> | |
" ctrl-j/k split navigation | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
" Default placement for splits | |
set splitbelow | |
set splitright | |
filetype off | |
filetype plugin indent off | |
set runtimepath+=$GOROOT/misc/vim | |
filetype plugin indent on | |
syntax on | |
set list | |
set listchars=tab:>·,trail:␣ | |
set nu " line numbers | |
set showmatch " braces match | |
set hlsearch | |
set smartcase " case sensitive when uc present | |
set smartindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set history=1000 " Store a ton of history (default is 20) | |
set nowrap | |
set undofile " persistent undo | |
set showmode | |
set dir=~/tmp | |
" css -> 2 space indent | |
autocmd FileType css,sass,scss,yml setlocal shiftwidth=2 tabstop=2 | |
autocmd BufNewFile,BufRead *.ejs set syntax=html | |
if has('cmdline_info') | |
set ruler | |
set rulerformat==%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%) | |
set showcmd | |
endif | |
if has('statusline') | |
set laststatus=2 | |
set statusline=%<%f\ " Filename | |
set statusline+=%w%h%m%r " Options | |
set statusline+=\ [%{&ff}/%Y] " filetype | |
set statusline+=\ [%{getcwd()}] " current dir | |
set statusline+=%=%-14.(%l,%c%V%)\ %p%% | |
endif | |
let g:syntastic_python_checkers=['flake8'] | |
let g:syntastic_javascript_checkers=['eslint'] | |
let g:syntastic_error_symbol='✗' | |
let g:syntastic_warning_symbol='>' | |
let g:syntastic_auto_loc_list=1 | |
let g:syntastic_loc_list_height=4 | |
map <F2> :SyntasticToggleMode<CR> | |
" <Tag> matching | |
let g:mta_filetypes = { | |
\ 'htmldjango' : 1, | |
\ 'html' : 1, | |
\ 'xhtml' : 1, | |
\ 'xml' : 1, | |
\ 'jinja' : 1, | |
\} | |
let g:ctrlp_custom_ignore = {'dir': 'node_modules\|site_packages\|git\|dist'} | |
:imap jj <esc> | |
" :ls <F5> buffer # | |
noremap <F5> :buffers<CR>:buffer<Space> | |
" syntax highlight color tweak | |
highlight MatchParen ctermbg=0 ctermfg=red cterm=bold | |
colorscheme atom " darkone? | |
let g:airline_powerline_fonts = 1 | |
let g:airline_theme='luna' | |
let g:EasyMotion_do_mapping = 0 " Disable default mappings | |
" Bi-directional find motion | |
" Jump to anywhere you want with minimal keystrokes, with just one key binding. | |
" `s{char}{label}` | |
nmap s <Plug>(easymotion-s) | |
" or | |
" `s{char}{char}{label}` | |
" Need one more keystroke, but on average, it may be more comfortable. | |
nmap s <Plug>(easymotion-s2) | |
" Turn on case sensitive feature | |
let g:EasyMotion_smartcase = 1 | |
" JK motions: Line motions | |
map <Leader>j <Plug>(easymotion-j) | |
map <Leader>k <Plug>(easymotion-k) | |
" Ctrl-M to preview markdown | |
let vim_markdown_preview_hotkey='<C-m>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment