vim의 플러그인이 내 현재 go (golang) 파일을 정적으로 분석하고 오류를 포착하는 기능을 추가하려고했습니다."autocmd FileType go compiler go"가해야하는 것은 무엇입니까?
$GOROOT/misc/vim
의 readme.txt 파일에있는 지침을 수행하려고했습니다.
Vim compiler plugin
-------------------
To install the compiler plugin:
1. Same as 1 above.
2. Copy or link compiler/go.vim to the compiler directory underneath your vim
runtime directory (normally $HOME/.vim/compiler).
3. Activate the compiler plugin with ":compiler go". To always enable the
compiler plugin in Go source files add an autocommand to your .vimrc file
(normally $HOME/.vimrc):
autocmd FileType go compiler go
Godoc plugin
------------
나는 그들이 말한 모든했지만 : 나는 내 파일을 저장할 때
autocmd FileType go compiler go
package main
import "fmt"
//This is my first go program!
//cool hu? Hope I can render this.
func main(){
jhjkahsdjkh //<-----------------ERROR HERE
fmt.Print("Hello World\n")
}
내가 autocmd FileType go compiler go
을 할 예정이다 모르는 사촌 기대 해야할지 모르겠어. 나는 또한 '파티 흐/VIM-이동'플러그인을 설치하고 명령 :GoBuild
을 수행하여이 시도
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Avoid a name conflict with L9
Plugin 'user/L9', {'name': 'newL9'}
Plugin 'commentary.vim'
"Plugin 'fatih/vim-go'
"Plugin 'Syntastic'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
""""------------------------------------
syntax on
" filetype plugin on
" filetype indent on
autocmd FileType go compiler go
" autocmd FileType go autocmd BufWritePre <buffer> Fmt
:
이처럼 내 정력 파일이 모습입니다. 그런 종류의 작업이 아니라 현재 파일의 오류를 가리키는 대신 개발중인 다른 패키지의 다른 파일로 이동하여 오류가 있음을 분명히 알았지 만 그 파일을보고 싶지는 않습니다. 현재 파일의 오류. 이 작업을 수행하는 플러그인이 있습니까? 내 vim이 구원을 받거나이 일을 할 수있는 방법이 있습니까?
autocmd는 사용자의 vimrc에 있어야합니다. 필자는 플러그인이 작동하지 않는 이유에 대해 언급하기에 충분하지 않습니다. 그러나 사용하지 않는 플러그인은 제거하는 것이 좋습니다. 예를 들어. '플러그인 '파일 : /// home/gmarik/path/to/plugin''은 실제 플러그인이 아닙니다 ... – FDinoff