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 <[email protected]> wrote:
>
> 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 adding this in $VIMRUNTIME/scripts.vim, e.g. below
> "valgrind", sets the filetype:
>
> " Go docs
> elseif s:line1 =~ '^PACKAGE DOCUMENTATION$'
> set ft=godoc
>
> Perhaps it's a bit too strict and white space needs to be ignored.
>
>
> --
> Creating the world with Emacs: M-x let-there-be-light
> Creating the world with Vim: :make world
>
> /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net
> \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/
> \\\
> \\\ an exciting new programming language -- http://www.Zimbu.org
> ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org
> ///
>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.