Created
February 20, 2016 20:37
-
-
Save lynndylanhurley/24b67d09b5d560e58d51 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
" Tell Neosnippet about the other snippets | |
"let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets, ~/.neosnippets/snippets, ~/.vim/.bundle/neosnippet-snippets/neosnippets' | |
" For conceal markers. | |
if has('conceal') | |
set conceallevel=2 concealcursor=niv | |
endif | |
" omnicompletes | |
au FileType css,sass,scss,stylus,less setl omnifunc=csscomplete#CompleteCSS | |
au FileType html,htmldjango,jinja,markdown setl omnifunc=emmet#completeTag | |
au FileType javascript,jsx,javascript.jsx setl omnifunc=tern#Complete | |
au FileType java setl omnifunc=javacomplete#Complete | |
au FileType python setl omnifunc=pythoncomplete#Complete | |
au FileType xml setl omnifunc=xmlcomplete#CompleteTags | |
au FileType c,cpp,objc,objcpp setl omnifunc=clang_complete#ClangComplete | |
if !exists("g:deoplete#sources") | |
let g:deoplete#sources = {} | |
endif | |
if !exists("g:deoplete#omni#input_patterns") | |
let g:deoplete#omni#input_patterns = {} | |
endif | |
" clang family omnicomplete | |
"let g:deoplete#omni#input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)\w*' | |
"let g:deoplete#omni#input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\w*\|\h\w*::\w*' | |
"let g:deoplete#omni#input_patterns.objc = '[^.[:digit:] *\t]\%(\.\|->\)\w*' | |
"let g:deoplete#omni#input_patterns.objcpp = '[^.[:digit:] *\t]\%(\.\|->\)\w*\|\h\w*::\w*' | |
"let g:deoplete#omni#input_patterns.objc = ['[^. *\t]\.\w*', '[^. *\t]\::\w*', '[^. *\t]\->\w*', '[<"].*/'] | |
" set library path | |
let s:clang_library_path='/Library/Developer/CommandLineTools/usr/lib' | |
if isdirectory(s:clang_library_path) | |
let g:clang_library_path=s:clang_library_path | |
endif | |
let g:clang_complete_auto = 0 | |
let g:clang_auto_select = 0 | |
let g:clang_omnicppcomplete_compliance = 0 | |
let g:clang_make_default_keymappings = 0 | |
"let g:deoplete#omni#input_patterns.objc = '\[\h\w*\s\h\?\|\h\w*\%(\.\|->\)' | |
"let g:deoplete#omni#input_patterns.objcpp = '\[\h\w*\s\h\?\|\h\w*\%(\.\|->\)\|\h\w*::\w*' | |
"ruby omnicomplete | |
let g:monster#completion#rcodetools#backend = 'async_rct_complete' | |
" js omnicomplete | |
let g:deoplete#omni#input_patterns.javascript = '[^. \t]\.\w*' | |
let g:deoplete#omni#input_patterns["javascript.jsx"] = '[^. \t]\.\w*' | |
let g:tern_show_argument_hints = 1 | |
let g:tern_show_signature_in_pum = 1 | |
"TagList | |
nmap <silent> <leader>- :TagbarToggle<CR> | |
let g:tagbar_ctags_bin = "/opt/boxen/homebrew/bin/ctags" | |
set tags=./tags | |
"remap escape to ctrl-c | |
"map ^c <ESC> | |
"for better soft-wrap navigation | |
nmap j gj | |
nmap k gk | |
"for better split navigation | |
noremap <C-h> <C-w>h | |
noremap <C-j> <C-w>j | |
noremap <C-k> <C-w>k | |
noremap <C-l> <C-w>l | |
" now do the same for terminal | |
if (has('tnoremap')) | |
tnoremap <Esc> <C-\><C-n> | |
tnoremap <C-h> <C-\><C-n><C-w>h | |
tnoremap <C-j> <C-\><C-n><C-w>j | |
tnoremap <C-k> <C-\><C-n><C-w>k | |
tnoremap <C-l> <C-\><C-n><C-w>l | |
endif | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-l> <C-w>l | |
set noea | |
"Hide/Show Marks | |
let g:showmarks_enable=1 | |
set formatoptions-=o "dont continue comments when pushing o/O | |
"vertical/horizontal scroll off settings | |
set scrolloff=3 | |
set sidescrolloff=7 | |
set sidescroll=1 | |
"some stuff to get the mouse going in term | |
set mouse=a | |
"set ttymouse=xterm2 | |
"tell the term has 256 colors | |
set t_Co=256 | |
"hide buffers when not displayed | |
set hidden | |
"dont load csapprox if we no gui support - silences an annoying warning | |
"if !has("gui_running") | |
"let g:CSApprox_loaded = 1 | |
"endif | |
"colors | |
let g:seoul256_background=235 | |
colorscheme seoul256 | |
"make <leader>l clear the highlight as well as redraw | |
nnoremap <leader>l :nohls<CR><C-L> | |
inoremap <leader>l <C-O>:nohls<CR> | |
"fzf | |
nnoremap <silent> <Leader>t :FZF<CR> | |
nnoremap <silent> <Leader>b :Buffers<CR> | |
nnoremap <silent> <Leader>/ :Ag<CR> | |
"map save to ctrl + s | |
"nnoremap <C-s> <ESC>:w<CR> | |
noremap <silent> <C-S> :update<CR> | |
vnoremap <silent> <C-S> <C-C>:update<CR> | |
inoremap <silent> <C-S> <C-O>:update<CR> | |
"kill trailing whitespace | |
nnoremap <leader>w :FixWhitespace<CR> | |
"ragtag.vim | |
let g:ragtag_global_maps = 1 | |
"jump to last cursor position when opening a file | |
"dont do it when writing a commit log entry | |
autocmd BufReadPost * call SetCursorPosition() | |
function! SetCursorPosition() | |
if &filetype !~ 'commit\c' | |
if line("'\"") > 0 && line("'\"") <= line("$") | |
exe "normal! g`\"" | |
normal! zz | |
endif | |
end | |
endfunction | |
"actionscript | |
autocmd BufRead *.as set filetype=actionscript | |
autocmd BufRead *.mxml set filetype=mxml | |
let tlist_actionscript_settings = 'actionscript;c:class;f:method;p:property;v:variable' | |
"hamlc | |
autocmd BufRead *.hamlc set filetype=haml | |
"skim | |
autocmd BufRead *.skim set filetype=slim | |
autocmd BufRead *.slim set filetype=slim | |
"wsgi to use python syntax | |
autocmd BufRead *.wsgi set filetype=python | |
"ruby confs | |
autocmd BufRead Vagrantfile set filetype=ruby | |
autocmd BufRead Berksfile set filetype=ruby | |
"############# PYTHON ############" | |
autocmd FileType python set ft=python.django " For SnipMate | |
autocmd FileType html set ft=htmldjango.html " For SnipMate | |
"golang | |
"au FileType go nmap <Leader>i <Plug>(go-info) | |
"au FileType go nmap <Leader>gd <Plug>(go-doc) | |
"au FileType go nmap <Leader>gv <Plug>(go-doc-vertical) | |
" | |
"au FileType go nmap gd <Plug>(go-def) | |
"au FileType go nmap <Leader>ds <Plug>(go-def-split) | |
"au FileType go nmap <Leader>dv <Plug>(go-def-vertical) | |
"au FileType go nmap <Leader>dt <Plug>(go-def-tab) | |
" Marks and Quotes | |
noremap ' ` | |
noremap æ ' | |
noremap ` <C-^> | |
"toolbars | |
set guioptions-=m "remove menu bar | |
set guioptions-=T "remove toolbar | |
"kill bell | |
set noerrorbells | |
set visualbell | |
set t_vb= | |
"stop shitting swps | |
set noswapfile | |
set nobackup | |
"gundo | |
nnoremap <leader>u :GundoToggle<CR> | |
let g:gundo_right=1 | |
"gist | |
let g:gist_clip_command = 'pbcopy' | |
let g:gist_detect_filetype = 1 | |
let g:github_user = "lynndylanhurley" | |
let g:github_token = "9712824974388b27dde1b980a00654d3" | |
"undo | |
set undofile | |
set undodir=~/.vim/undodir | |
set undofile | |
set undolevels=1000 | |
set undoreload=10000 | |
"sessions | |
let g:session_default_to_last=0 | |
let g:session_autoload = 'no' | |
let g:session_autosave = 'no' | |
"zen coding | |
let g:user_zen_expandabbr_key = '<c-e>' | |
let g:use_zen_complete_tag = 1 | |
let g:user_zen_mode='a' | |
"the silver searcher | |
let g:agprg="/usr/local/bin/ag --column" | |
let g:ags_agexe="/usr/local/bin/ag" | |
"camelCaseMotion | |
map <silent> w <Plug>CamelCaseMotion_w | |
map <silent> b <Plug>CamelCaseMotion_b | |
map <silent> e <Plug>CamelCaseMotion_e | |
sunmap w | |
sunmap b | |
sunmap e | |
"surround | |
let g:surround_indent = 1 | |
"delimitMate | |
let g:delimitMate_expand_cr = 1 | |
let g:delimitMate_jump_expansion = 1 | |
let g:delimitMate_expand_space = 1 | |
let g:delimitMate_smart_matchpairs = 1 | |
let g:delimitMate_smart_quotes = 1 | |
let g:delimitMate_balance_matchpairs = 1 | |
let g:delimitMate_autoclose = 1 | |
"let g:neopairs#enable = 1 | |
" git gutter | |
let g:gitgutter_eager = 0 | |
" Easy align | |
vnoremap <silent> <Enter> :EasyAlign<Enter> | |
" Syntastic | |
"let g:syntastic_ruby_exec = '~/.rbenv/shims/ruby' | |
"let g:syntastic_html_tidy_ignore_errors=[" proprietary attribute \"ng-"] | |
"let g:syntastic_mode_map = { 'mode': 'active', | |
"\ 'active_filetypes': [], | |
"\ 'passive_filetypes': ['html'] } | |
"let g:syntastic_javascript_checkers = ['eslint'] | |
"let g:syntastic_scss_checkers = ['scss_lint'] | |
let g:neomake_open_list=0 | |
let g:neomake_javascript_enabled_makers = ['eslint'] | |
let g:neomake_jsx_enabled_makers = ['eslint'] | |
let g:neomake_logfile = '/usr/local/var/log/neomake.log' | |
let g:neomake_error_sign = { | |
\ 'text': 'E>', | |
\ 'texthl': 'ErrorMsg', | |
\ } | |
let g:neomake_warning_sign = { | |
\ 'text': 'W>', | |
\ 'texthl': 'WildMenu', | |
\ } | |
autocmd! BufWritePost * Neomake | |
" java / android | |
let g:android_sdk_path = $ANDROID_HOME | |
" insert class import | |
nmap <F4> <Plug>(JavaComplete-Imports-Add) | |
imap <F4> <Plug>(JavaComplete-Imports-Add) | |
" add all missing imports | |
nmap <F5> <Plug>(JavaComplete-Imports-AddMissing) | |
imap <F5> <Plug>(JavaComplete-Imports-AddMissing) | |
" remove missing imports | |
nmap <F6> <Plug>(JavaComplete-Imports-RemoveUnused) | |
imap <F6> <Plug>(JavaComplete-Imports-RemoveUnused) | |
" jsx | |
let g:jsx_ext_required = 0 " Allow JSX in normal JS files | |
"autocmd FileType js set ft=javascript " For SnipMate | |
"autocmd FileType javascript set ft=javascript " For SnipMate | |
" Coffeelint | |
"let coffee_lint_options = '--file ~/.coffeelint.json' | |
"let g:syntastic_coffee_coffeelint_args="--file ~/coffeelint.json | |
"let g:coffee_liner = '/usr/local/bin/coffeelint' | |
"au BufNewFile,BufReadPost *.coffee setl shiftwidth=2 expandtab | |
autocmd BufNewFile,BufReadPost *.coffee setfiletype coffee | |
autocmd BufNewFile,BufReadPost *.coffee setl shiftwidth=2 expandtab | |
" CoffeeTags | |
if executable('coffeetags') | |
let g:tagbar_type_coffee = { | |
\ 'ctagsbin' : 'coffeetags', | |
\ 'ctagsargs' : '', | |
\ 'kinds' : [ | |
\ 'f:functions', | |
\ 'o:object', | |
\ ], | |
\ 'sro' : ".", | |
\ 'kind2scope' : { | |
\ 'f' : 'object', | |
\ 'o' : 'object', | |
\ } | |
\ } | |
endif | |
autocmd BufNewFile,BufReadPost *.jade setfiletype jade | |
" Gotags | |
let g:tagbar_type_go = { | |
\ 'ctagstype' : 'go', | |
\ 'kinds' : [ | |
\ 'p:package', | |
\ 'i:imports:1', | |
\ 'c:constants', | |
\ 'v:variables', | |
\ 't:types', | |
\ 'n:interfaces', | |
\ 'w:fields', | |
\ 'e:embedded', | |
\ 'm:methods', | |
\ 'r:constructor', | |
\ 'f:functions' | |
\ ], | |
\ 'sro' : '.', | |
\ 'kind2scope' : { | |
\ 't' : 'ctype', | |
\ 'n' : 'ntype' | |
\ }, | |
\ 'scope2kind' : { | |
\ 'ctype' : 't', | |
\ 'ntype' : 'n' | |
\ }, | |
\ 'ctagsbin' : 'gotags', | |
\ 'ctagsargs' : '-sort -silent' | |
\ } | |
" hilight indention tabs | |
hi NonText ctermfg=darkgrey guifg=#565656 | |
hi clear SpecialKey | |
hi link SpecialKey NonText | |
hi SpecialKey ctermfg=darkgrey guifg=#565656 | |
let g:indentLine_color_term=238 | |
let g:indentLine_color_gui='#565656' | |
let g:indentLine_char='•' | |
" supercollider | |
let g:sclangTerm = '/Applications/iTerm.app/Contents/MacOS/iTerm' | |
" auto reload vimrc | |
" Set augroup. | |
augroup MyAutoCmd | |
autocmd! | |
augroup END | |
function! s:set_syntax_of_user_defined_commands() | |
redir => _ | |
silent! command | |
redir END | |
let command_names = join(map(split(_, '\n')[1:], | |
\ "matchstr(v:val, '[!\"b]*\\s\\+\\zs\\u\\w*\\ze')")) | |
if command_names == '' | return | endif | |
execute 'syntax keyword vimCommand ' . command_names | |
endfunction | |
if !has('gui_running') | |
autocmd MyAutoCmd BufWritePost init.vim nested source $MYVIMRC | | |
\ call s:set_syntax_of_user_defined_commands() | | |
\ echo "source $MYVIMRC" | |
else | |
autocmd MyAutoCmd BufWritePost init.vim source $MYVIMRC | | |
\ call s:set_syntax_of_user_defined_commands() | | |
\ if has('gui_running') | source $MYVIMRC | echo "source $MYVIMRC" | |
endif | |
" golden view | |
let g:goldenview__enable_default_mapping = 0 " disable <c-l> behavior | |
" airline | |
let g:airline_theme="lucius" | |
let g:airline_powerline_fonts=1 | |
" investigate | |
"let g:investigate_use_dash=1 | |
"let g:investigate_dash_for_coffeescript="angularjs" | |
" easyclip | |
let g:EasyClipUseSubstituteDefaults=0 | |
let g:EasyClipAutoFormat=1 | |
let g:EasyClipUseYankDefaults=1 | |
let g:EasyClipUseCutDefaults=1 | |
let g:EasyClipUsePasteDefaults=1 | |
let g:EasyClipEnableBlackHoleRedirect=0 | |
let g:EasyClipUsePasteToggleDefaults=1 | |
" use x for cut | |
nmap d <Plug>MoveMotionPlug | |
xmap d <Plug>MoveMotionXPlug | |
nmap dd <Plug>MoveMotionLinePlug | |
" vim sneak | |
let g:sneak#streak = 1 | |
" HowMuch | |
"The scale of the result: | |
let g:HowMuch_scale = 2 | |
"the engine order for auto-calculation | |
let g:HowMuch_auto_engines = ['bc', 'vim', 'py'] | |
" choosewin | |
nmap - <Plug>(choosewin) | |
let g:choosewin_overlay_enable = 1 | |
" prevent replacing paste buffer on vp | |
"function! RestoreRegister() | |
"let @" = s:restore_reg | |
"return '' | |
"endfunction | |
"function! s:Repl() | |
"let s:restore_reg = @" | |
"return "p@=RestoreRegister()\<cr>" | |
"endfunction | |
"xmap <silent> <expr> p <sid>Repl() | |
" yankstack compatibility | |
"let g:yankstack_map_keys = 0 | |
"let g:yankstack_yank_keys = ['y', 'd', 'x'] | |
"call yankstack#setup() | |
"nmap <M-p> <Plug>yankstack_substitute_older_paste | |
"nmap <M-P> <Plug>yankstack_substitute_newer_paste | |
"nmap s <Plug>Sneak_s | |
"nmap S <Plug>Sneak_S | |
"xmap s <Plug>Sneak_s | |
"xmap S <Plug>Sneak_S | |
" incsearch | |
map / <Plug>(incsearch-forward) | |
map ? <Plug>(incsearch-backward) | |
map g/ <Plug>(incsearch-stay) | |
" hilight current line | |
let g:conoline_auto_enable = 1 | |
let g:conoline_color_normal_dark = "guibg=#393939" | |
let g:conoline_color_insert_dark = "guibg=#444444" | |
"let g:conoline_use_colorscheme_default_normal=1 | |
"let g:conoline_use_colorscheme_default_insert=1 | |
" neoterm test runner | |
nnoremap <silent> ,rn :call neoterm#test#run('current')<cr> | |
nnoremap <silent> ,rt :call neoterm#test#run('all')<cr> | |
nnoremap <silent> ,rf :call neoterm#test#run('file')<cr> | |
nnoremap <silent> ,rr :call neoterm#test#rerun()<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment