:help pathHere's a very quick tour.
Add this to you .vimrc:
set path +=/your/projects/gopath/src/**** tells path to include all subdirectories. By adding your projects GOPATH entry it opens up access to two rather cool features that are useful in navigating your project.
:find
You can use :find to open a file instead of using :e. But :find will look in all of your project's directories to find the file. So rather than having to do::e /package/v10/another-dir/god.goYou just need:
:find god.goYou also get tab-completion for free - just in case you can't remember the file's name.
gf
gf is the useful little command that goes to the file under the cursor. Well providing you've set your path correcly you can navigate your project's imports with ease:package main import ( "code.google.com/p/go.net/websocket" )By "gf"ing over the import vim will open the directory, giving you the list of files in that package.
Just don't dare navigate the directory using the arrow keys!
Update: 8th Jan 2012
On the subject of vim and Go it's worth remembering this little gem:au BufWritePost *.go !gofmt -w %Whenever a Go file is saved gofmt will be run against it.
Great Article
ReplyDeleteB.Tech Final Year Projects for CSE in Go
FInal Year Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai