Added vim polyglot and changed some vim shortcuts for go, also added skeleton support for ~/.vim/templates/skeleton.*

This commit is contained in:
TuDatTr
2020-02-02 15:42:41 +01:00
parent d37618a44e
commit ce61a4733c
17 changed files with 72 additions and 3514 deletions

View File

@@ -1,19 +1,19 @@
" Basics
set autoindent noexpandtab tabstop=4 shiftwidth=4
" Shortcuts
abbrev funct func<Space>Test(t<Space>*testing.T)<Space>{<CR>}<Esc>kwwi
abbrev trun t.Run("", func(t *testing.T)<Space>{<CR>})<Esc>%la
abbrev fori for i := 0; i < ; i++{<CR>}<Esc>k2f;i
" Compiling
nnoremap <C-c><C-f> <Esc>:GoFmt<CR>
nnoremap <C-c><C-c> <Esc>:!clear<CR><CR>:GoRun<CR>
nnoremap <C-c><C-b> <Esc>:!clear<CR><CR>:GoBuild<CR>
nnoremap <C-c><C-t> <Esc>:!clear<CR><CR>:GoTest<CR>
nnoremap <C-c><C-f> <Esc>:!clear<CR><CR>:GoTestFunc<CR>
nnoremap <C-c><C-d> <Esc>:!clear<CR><CR>:GoDebugStart<CR>
nnoremap <C-c><C-b> <CR>:GoBuild<CR>
nnoremap <C-c><C-t> <CR>:GoTest<CR>
nnoremap <C-c><C-d> <CR>:GoDebugStart<CR>
nnoremap gd <Esc>:GoDef
nnoremap <F1> <Esc>:GoDoc<CR>
map <C-c><C-w> <Esc>:!clear; GOOS=windows GOARCH=386 go build -o %<.exe %<CR><CR>
abbrev funct func<Space>Test(t<Space>*testing.T)<Space>{<CR>}<Esc>kwwi
abbrev trun t.Run("", func(t *testing.T)<Space>{<CR>})<Esc>%la