mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
17
sources_non_forked/vim-go/ftplugin/asm.vim
Normal file
17
sources_non_forked/vim-go/ftplugin/asm.vim
Normal file
@ -0,0 +1,17 @@
|
||||
" asm.vim: Vim filetype plugin for Go assembler.
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< cms<"
|
||||
|
||||
setlocal formatoptions-=t
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,://
|
||||
setlocal commentstring=//\ %s
|
||||
|
||||
setlocal noexpandtab
|
||||
|
||||
command! -nargs=0 AsmFmt call go#asmfmt#Format()
|
@ -53,4 +53,7 @@ command! -nargs=* GoLint call go#lint#Golint(<f-args>)
|
||||
command! -nargs=* -bang GoVet call go#lint#Vet(<bang>0, <f-args>)
|
||||
command! -nargs=* -complete=customlist,go#package#Complete GoErrCheck call go#lint#Errcheck(<f-args>)
|
||||
|
||||
" -- alternate
|
||||
command! -bang GoAlternate call go#alternate#Switch(<bang>0, '')
|
||||
|
||||
" vim:ts=4:sw=4:et
|
||||
|
@ -5,17 +5,16 @@
|
||||
" which by default is enabled. For commands the user has the ability to pass
|
||||
" the '!', such as :GoBuild or :GoBuild!
|
||||
if !exists("g:go_jump_to_error")
|
||||
let g:go_jump_to_error = 1
|
||||
let g:go_jump_to_error = 1
|
||||
endif
|
||||
|
||||
|
||||
" Some handy plug mappings
|
||||
nnoremap <silent> <Plug>(go-run) :<C-u>call go#cmd#Run(!g:go_jump_to_error, '%')<CR>
|
||||
nnoremap <silent> <Plug>(go-run) :<C-u>call go#cmd#Run(!g:go_jump_to_error)<CR>
|
||||
|
||||
if has("nvim")
|
||||
nnoremap <silent> <Plug>(go-run-vertical) :<C-u>call go#cmd#RunTerm('vsplit')<CR>
|
||||
nnoremap <silent> <Plug>(go-run-split) :<C-u>call go#cmd#RunTerm('split')<CR>
|
||||
nnoremap <silent> <Plug>(go-run-tab) :<C-u>call go#cmd#RunTerm('tab')<CR>
|
||||
nnoremap <silent> <Plug>(go-run-vertical) :<C-u>call go#cmd#RunTerm(!g:go_jump_to_error, 'vsplit')<CR>
|
||||
nnoremap <silent> <Plug>(go-run-split) :<C-u>call go#cmd#RunTerm(!g:go_jump_to_error, 'split')<CR>
|
||||
nnoremap <silent> <Plug>(go-run-tab) :<C-u>call go#cmd#RunTerm(!g:go_jump_to_error, 'tabe')<CR>
|
||||
endif
|
||||
|
||||
nnoremap <silent> <Plug>(go-build) :<C-u>call go#cmd#Build(!g:go_jump_to_error)<CR>
|
||||
@ -56,4 +55,6 @@ nnoremap <silent> <Plug>(go-doc-browser) :<C-u>call go#doc#OpenBrowser()<CR>
|
||||
nnoremap <silent> <Plug>(go-metalinter) :<C-u>call go#lint#Gometa(0)<CR>
|
||||
nnoremap <silent> <Plug>(go-vet) :<C-u>call go#lint#Vet(!g:go_jump_to_error)<CR>
|
||||
|
||||
|
||||
nnoremap <silent> <Plug>(go-alternate-edit) :<C-u>call go#alternate#Switch(0, "edit")<CR>
|
||||
nnoremap <silent> <Plug>(go-alternate-vertical) :<C-u>call go#alternate#Switch(0, "vsplit")<CR>
|
||||
nnoremap <silent> <Plug>(go-alternate-split) :<C-u>call go#alternate#Switch(0, "split")<CR>
|
||||
|
Reference in New Issue
Block a user