update vimrc

This commit is contained in:
Rob Watson 2021-02-25 13:49:17 +01:00
parent 33362f4097
commit c1809703be
2 changed files with 16 additions and 11 deletions

View File

@ -1,7 +1,8 @@
map <Leader>gb :GoBuild<CR> nmap <Leader>gb :GoBuild<CR>
map <Leader>i :GoImplements<CR> nmap <leader>gc :GoCallers<CR>
map <Leader>^ :GoAlternate<CR> nmap <Leader>i :GoImplements<CR>
map <Leader>d :GoDoc<CR> nmap <Leader>^ :GoAlternate<CR>
nmap <Leader>d :GoDoc<CR>
map <leader>gv <esc>:vsplit<bar>:GoAlternate!<cr> map <leader>gv <esc>:vsplit<bar>:GoAlternate!<cr>
map <leader>gs <esc>:split<bar>:GoAlternate!<cr> map <leader>gs <esc>:split<bar>:GoAlternate!<cr>
@ -35,7 +36,6 @@ let g:go_fmt_options = {
\ 'goimports': '-local github.com/sensiblecodeio/cantabular', \ 'goimports': '-local github.com/sensiblecodeio/cantabular',
\ } \ }
autocmd BufNewFile,BufRead *.gohtml set syntax=gohtmltmpl
autocmd BufNewFile,BufRead *.go nmap <silent> <leader>g6 :GoAlternate!<cr> autocmd BufNewFile,BufRead *.go nmap <silent> <leader>g6 :GoAlternate!<cr>
iabbrev fmtpl fmt.Println("")<esc>hi iabbrev fmtpl fmt.Println("")<esc>hi

17
vimrc
View File

@ -2,7 +2,7 @@ set background=dark
syntax on syntax on
filetype plugin indent on filetype plugin indent on
let mapleader="," let mapleader=','
" netrw " netrw
let g:netrw_banner = 0 let g:netrw_banner = 0
@ -74,13 +74,17 @@ set completepopup=width:300,height:50,align:item,border:off
" Colour scheme: " Colour scheme:
colorscheme nord colorscheme nord
" Automatically load/save views on files. augroup vimrc
" https://vi.stackexchange.com/posts/13874/revisions
augroup AutoSaveFolds
autocmd! autocmd!
" Automatically load/save views on files.
" https://vi.stackexchange.com/posts/13874/revisions
autocmd BufWinLeave,BufLeave,BufWritePost,BufHidden,QuitPre ?* nested silent! mkview! autocmd BufWinLeave,BufLeave,BufWritePost,BufHidden,QuitPre ?* nested silent! mkview!
autocmd BufWinEnter ?* silent! loadview autocmd BufWinEnter ?* silent! loadview
" set cursor line highlight in insert mode.
autocmd InsertEnter * set cul
autocmd InsertLeavePre * set nocul
augroup end augroup end
" But, don't remember the current directory for a given file: " But, don't remember the current directory for a given file:
set viewoptions-=curdir set viewoptions-=curdir
@ -146,8 +150,9 @@ call deoplete#custom#option('auto_refresh_delay', 10)
" \ 'go': '[^. *\t]\.\w*', " \ 'go': '[^. *\t]\.\w*',
" \}) " \})
" <TAB>: completion. " <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" inoremap <expr><S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr><s-TAB> pumvisible() ? "\<C-p>" : "\<s-TAB>" inoremap <expr><Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr><Enter> pumvisible() ? "\<C-y>" : "\<Enter>"
" vim-markdown configuration: " vim-markdown configuration:
let g:vim_markdown_conceal = 1 let g:vim_markdown_conceal = 1