vim-go: How to open files returned by GoFiles -
The Vimeo-plugin has one: the GoFile function to show the dependent source files on the current file is output looks like this :
['/ home / tretkow / tut / main.go', '/home/tretkow/tut/test.go']
list How to open files from?
: gofile
only by the look of your snippet go # tool # Files ()
.
It is possible to extract only one file name in some way:
: E & lt; C-R & gt; = Know # device # files () [0] & lt; CR & gt;
Or put that list in the scratch buffer:
: vnew < CR & gt; : 0put = join (# tools # go to the files), '\ r') & lt; CR & gt; Use /home/tretkow/tut/main.go/home/tretkow/tut/test.go
and gf
to jump on file under cursor Please.
Here's a more sophisticated solution: : GoFile
is the command to edit through the custom tab for : GoFiles
Lets choose file - news
Usage:
: GoFile> Tab & gt;
Comments
Post a Comment