" Happy yaml configuration au! BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab let g:gutentags_file_list_command = 'git ls-files' " quick-scope " https://github.com/unblevable/quick-scope let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] " Golang " Go test, Def, Decls shortcut nmap got :GoTest:botright copen autocmd FileType go nmap gd :GoDef autocmd FileType go nmap gD :GoDecls " Go formatting autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist " Caddyfile indentation autocmd FileType caddyfile setlocal noexpandtab shiftwidth=8 tabstop=8 softtabstop=8 nolist " vim-go disable text-objects let g:go_textobj_enabled = 0 " disable vim-go :GoDef short cut (gd) " this is handled by LanguageClient [LC] let g:go_def_mapping_enabled = 0 " GitGutter and vim Magit " inspired by: https://jakobgm.com/posts/vim/git-integration/ " Don't map gitgutter keys automatically, set them ourselves let g:gitgutter_map_keys = 0 " Jump between hunks nmap gn (GitGutterNextHunk) " git next nmap gp (GitGutterPrevHunk) " git previous " Hunk-add and hunk-revert for chunk staging nmap ga (GitGutterStageHunk) " git add (chunk) nmap gu (GitGutterUndoHunk) " git undo (chunk) " Open vimagit pane nnoremap gs :Magit " git status " Push to remote nnoremap gP :! git push " git Push " Quick conflict resolution in git mergetool nvim " http://vimcasts.org/episodes/fugitive-vim-resolving-merge-conflicts-with-vimdiff/ nmap [ :diffget //2 nmap ] :diffget //3 " netrw let g:netrw_fastbrowse=0 " Auto-FMT rust code on save let g:rustfmt_autosave = 1 " Indenting in html template tags let g:html_indent_style1 = "inc" " yank highlight duration let g:highlightedyank_highlight_duration = 200 " Markdown options let g:vim_markdown_folding_disabled = 1 " Haskell options let g:haskell_enable_quantification = 1 " to enable highlighting of `forall` let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec` let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc` let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern` let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static` let g:haskell_backpack = 1 " to enable highlighting of backpack keywords " Emmet let g:user_emmet_leader_key='' " Ack if executable('ag') let g:ackprg = 'ag --vimgrep' endif