Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd GoLang syntax highlighting for VIM
    primarykey
    data
    text
    <p>I'm trying to add Go language syntax highlighting to VIM on ubuntu with resources and direction supplied here <a href="http://go-lang.cat-v.org/text-editors/vim/" rel="nofollow noreferrer">http://go-lang.cat-v.org/text-editors/vim/</a>.</p> <p>Go comes with a <code>go.vim</code> file that contains syntax settings for VIM and the above page offers the following instructions</p> <p><strong>Place $GOROOT/misc/vim/syntax/go.vim in ~/.vim/syntax/ and put the following in ~/.vim/ftdetect/go.vim:</strong></p> <pre><code>au BufRead,BufNewFile *.go set filetype=go </code></pre> <p>This is more or less the same vein of procedure for customizing vim syntax I've seen elsewhere (<a href="https://stackoverflow.com/questions/12962233/vim-7-3-on-ubuntu-12-10-doesnt-have-ftplugin-directory-anywhere">Vim 7.3 on Ubuntu 12.10 doesn&#39;t have &#39;ftplugin&#39; directory anywhere</a> and <a href="https://github.com/jnwhiteh/vim-golang/blob/master/readme.txt" rel="nofollow noreferrer">https://github.com/jnwhiteh/vim-golang/blob/master/readme.txt</a>)</p> <p>So I think I'm doing the right thing when I create directories:<br> ~/.vim<br> ~/.vim/syntax<br> ~/.vim/ftdetect<br></p> <p>and follow the above instructions by adding </p> <p>go.vim to ~/.vim/syntax/ and creating a file, go.vim, in ~/.vim/ftdetect/ which contains</p> <pre><code>au BufRead,BufNewFile *.go set filetype=go </code></pre> <p>Yet syntax highlighting does not seem to occur. Is there something I need to do to force VIM to look at these new settings files?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload