{"id":297,"date":"2009-11-25T22:05:19","date_gmt":"2009-11-25T21:05:19","guid":{"rendered":"http:\/\/www.gennard.net\/blog\/?p=297"},"modified":"2009-11-25T22:05:19","modified_gmt":"2009-11-25T21:05:19","slug":"vim-and-go","status":"publish","type":"post","link":"http:\/\/www.gennard.net\/blog\/2009\/11\/vim-and-go\/","title":{"rendered":"VIM and GO"},"content":{"rendered":"<p>Getting started with GO and vim<\/p>\n<p>As a developer who lives most of his life on my Mac with vi\/vim, I was happy to see the GO distribution includes vim colourisation for .go, files ..but it was installed.. so..<\/p>\n<p>To setup this up, first copy $GOROOT\/misc\/vim\/go.vim to your vim\/gvim syntax directory or $HOME\/.vim\/syntax (see comment below for the mac). Then all that is required is to setup the file association in runtime\/filetype.vim, the following lines did it for me..<\/p>\n<p><code lang=\"text\"><br \/>\n\" Go<br \/>\nau BufNewFile,BufRead *.go                      setf go<br \/>\n<\/code><\/p>\n<p>If like me, you are using Vim.app on the mac, the runtime vim location will be Vim.app\/Contents\/Resources\/vim\/runtime with the syntax directory being below this too.<\/p>\n<p>If all goes well, it should look like:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gennard.net\/blog\/wp-content\/uploads\/2009\/11\/2009-11-25_2100.png\" alt=\"GVIM and GO\" title=\"GVIM and GO\" width=\"460\" height=\"159\" class=\"alignnone size-full wp-image-300\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Getting started with GO and vim As a developer who lives most of his life on my Mac with vi\/vim, I was happy to see the GO distribution includes vim colourisation for .go, files ..but it was installed.. so.. To &hellip; <a href=\"http:\/\/www.gennard.net\/blog\/2009\/11\/vim-and-go\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45,35],"tags":[237,229],"_links":{"self":[{"href":"http:\/\/www.gennard.net\/blog\/wp-json\/wp\/v2\/posts\/297"}],"collection":[{"href":"http:\/\/www.gennard.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gennard.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gennard.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gennard.net\/blog\/wp-json\/wp\/v2\/comments?post=297"}],"version-history":[{"count":0,"href":"http:\/\/www.gennard.net\/blog\/wp-json\/wp\/v2\/posts\/297\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.gennard.net\/blog\/wp-json\/wp\/v2\/media?parent=297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gennard.net\/blog\/wp-json\/wp\/v2\/categories?post=297"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gennard.net\/blog\/wp-json\/wp\/v2\/tags?post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}