diff --git a/vim/after/ftplugin/go.vim b/vim/after/ftplugin/go.vim index 71856fe..863491d 100644 --- a/vim/after/ftplugin/go.vim +++ b/vim/after/ftplugin/go.vim @@ -1,7 +1,8 @@ -map gb :GoBuild -map i :GoImplements -map ^ :GoAlternate -map d :GoDoc +nmap gb :GoBuild +nmap gc :GoCallers +nmap i :GoImplements +nmap ^ :GoAlternate +nmap d :GoDoc map gv :vsplit:GoAlternate! map gs :split:GoAlternate! @@ -35,7 +36,6 @@ let g:go_fmt_options = { \ 'goimports': '-local github.com/sensiblecodeio/cantabular', \ } -autocmd BufNewFile,BufRead *.gohtml set syntax=gohtmltmpl autocmd BufNewFile,BufRead *.go nmap g6 :GoAlternate! iabbrev fmtpl fmt.Println("")hi diff --git a/vimrc b/vimrc index 8e9f73a..756334e 100644 --- a/vimrc +++ b/vimrc @@ -2,7 +2,7 @@ set background=dark syntax on filetype plugin indent on -let mapleader="," +let mapleader=',' " netrw let g:netrw_banner = 0 @@ -74,13 +74,17 @@ set completepopup=width:300,height:50,align:item,border:off " Colour scheme: colorscheme nord -" Automatically load/save views on files. -" https://vi.stackexchange.com/posts/13874/revisions -augroup AutoSaveFolds +augroup vimrc autocmd! + " Automatically load/save views on files. + " https://vi.stackexchange.com/posts/13874/revisions autocmd BufWinLeave,BufLeave,BufWritePost,BufHidden,QuitPre ?* nested silent! mkview! autocmd BufWinEnter ?* silent! loadview + " set cursor line highlight in insert mode. + autocmd InsertEnter * set cul + autocmd InsertLeavePre * set nocul augroup end + " But, don't remember the current directory for a given file: set viewoptions-=curdir @@ -146,8 +150,9 @@ call deoplete#custom#option('auto_refresh_delay', 10) " \ 'go': '[^. *\t]\.\w*', " \}) " : completion. -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" " vim-markdown configuration: let g:vim_markdown_conceal = 1