Re: [Patch] Add go filetype with syntax

2014-08-24 Fir de Conversatie 'David Barnett' via vim_dev
I can verify that works for "godoc strings". After patching scripts.vim, I did: vim <(godoc strings) :verbose set ft? filetype=godoc Last set from /usr/share/vim/vim74/scripts.vim David On Sun, Aug 24, 2014 at 12:40 PM, Bram Moolenaar wrote: > > David Barnett wrote: > > > Her

Re: [Patch] Add go filetype with syntax

2014-08-24 Fir de Conversatie Bram Moolenaar
David Barnett wrote: > Here's the first 10 lines of "godoc strings": > > PACKAGE DOCUMENTATION > > package strings > import "strings" > > Package strings implements simple functions to manipulate strings. > > FUNCTIONS > > func Contains(s, substr string) bool OK, then verify that ad

Re: [Patch] Add go filetype with syntax

2014-08-24 Fir de Conversatie 'David Barnett' via vim_dev
Here's the first 10 lines of "godoc strings": PACKAGE DOCUMENTATION package strings import "strings" Package strings implements simple functions to manipulate strings. FUNCTIONS func Contains(s, substr string) bool David On Sun, Aug 24, 2014 at 5:27 AM, Bram Moolenaar wrote: > >

Re: [Patch] Add go filetype with syntax

2014-08-24 Fir de Conversatie Bram Moolenaar
David - > On 23 August 2014 23:24, Bram Moolenaar wrote: > > > If there is no specific file name, perhaps the type can be guessed from > > the file contents? > > There isn't anything hugely distinctive, but you could look for a line > solely consisting of "PACKAGE DOCUMENTATION" as the first l

Re: [Patch] Add go filetype with syntax

2014-08-23 Fir de Conversatie Bram Moolenaar
David Barnett wrote: > +dsymonds > > Good question. I can't tell if there are actual "godoc files" or just cli > output from the godoc tool is sometimes passed to a vim buffer. > > I wouldn't mind keeping that file out for a later patch if there's no quick > ftdetect rule. I don't like defining

Re: [Patch] Add go filetype with syntax

2014-08-22 Fir de Conversatie 'David Barnett' via vim_dev
Oh, I see, it's manually set by commands like :GoDoc in https://github.com/fatih/vim-go/blob/master/ftplugin/go/godoc.vim. Might be able to recognize it looking for a header like "PACKAGE DOCUMENTATION", but probably would have made more sense to just distribute it along with the commands that use

Re: [Patch] Add go filetype with syntax

2014-08-22 Fir de Conversatie 'David Barnett' via vim_dev
On Fri, Aug 22, 2014 at 10:41 AM, Tony Mechelynck < antoine.mechely...@gmail.com> wrote: > If there's no "quick" ftdetect rule (by the filename), there might be a > "slow" ftdetect rule (by the file contents). > I meant quick in terms of effort to set up, actually. I'd rather drop any contentious

Re: [Patch] Add go filetype with syntax

2014-08-22 Fir de Conversatie Tony Mechelynck
On 22/08/14 18:34, 'David Barnett' via vim_dev wrote: +dsymonds Good question. I can't tell if there are actual "godoc files" or just cli output from the godoc tool is sometimes passed to a vim buffer. I wouldn't mind keeping that file out for a later patch if there's no quick ftdetect rule. I

Re: [Patch] Add go filetype with syntax

2014-08-22 Fir de Conversatie 'David Barnett' via vim_dev
+dsymonds Good question. I can't tell if there are actual "godoc files" or just cli output from the godoc tool is sometimes passed to a vim buffer. I wouldn't mind keeping that file out for a later patch if there's no quick ftdetect rule. I don't like defining new filetypes without at least confi

Re: [Patch] Add go filetype with syntax

2014-08-22 Fir de Conversatie Bram Moolenaar
David Barnett wrote: > I've attached a patch to add a "go" filetype to vim, with syntax > highlighting and filetype configuration. I also updated the > vim-ft-vroom repo URL to point to the renamed repo while I'm at it > ("vim-ft.vroom"->"vim-ft-vroom"). > > These files originally came from the

Re: [Patch] Add go filetype with syntax

2014-08-18 Fir de Conversatie Bram Moolenaar
David Barnett wrote: > I've attached a patch to add a "go" filetype to vim, with syntax > highlighting and filetype configuration. I also updated the > vim-ft-vroom repo URL to point to the renamed repo while I'm at it > ("vim-ft.vroom"->"vim-ft-vroom"). > > These files originally came from the

[Patch] Add go filetype with syntax

2014-08-18 Fir de Conversatie David Barnett
I've attached a patch to add a "go" filetype to vim, with syntax highlighting and filetype configuration. I also updated the vim-ft-vroom repo URL to point to the renamed repo while I'm at it ("vim-ft.vroom"->"vim-ft-vroom"). These files originally came from the golang repository and are current