Commit d801a04

mo khan <mo.khan@gmail.com>
2020-11-14 02:51:02
add mappings for go files
1 parent ec8378a
Changed files (3)
ftplugin/go.vim
@@ -1,1 +1,3 @@
-nnoremap <leader>t :GoTest<cr>
+nnoremap <leader>t :!go test %<cr>
+nnoremap <leader>r :!go run %<cr>
+set nolist
ftplugin/html.vim
@@ -1,2 +1,3 @@
 " \c comment out line.
 nnoremap <buffer> <localleader>c I<!--<esc>A--><esc>
+set nowrap
vimrc
@@ -110,7 +110,6 @@ filetype plugin indent on " Turn on filetype plugins (:help filetype-plugin)
 if has("autocmd")
   au BufNewFile,BufRead *.html set nowrap
   au BufNewFile,BufRead *.json set ft=javascript
-  au BufNewFile,BufRead *.go set nolist
   au BufRead,BufNewFile *.{md,markdown,mdown,mkd,mkdn,txt} set ft=markdown
   au BufRead,BufNewFile {Gemfile,Rakefile,RakeFile,Vagrantfile,config.ru,*.rake} set ft=ruby
   au FocusLost * :w