1

Vim中添加Go的语法高亮

 2 years ago
source link: https://arminli.com/vim-go/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Armin's Blog

Vim中添加Go的语法高亮

September 16, 2016

在一些 linux 发行版里直接(apt-get、yum)安装 go 时会在 vim 中发现语法不会高亮,因为没有 /usr/local/go/misc/vim/这个目录,可以通过以下方法解决:

  1. 下载 go.vim 放到 ~/.vim/syntax
  2. ~/.vimrc内添加下面两行:
filetype on
au BufRead,BufNewFile *.go set filetype=go

Profile picture

Written by Armin Li , a venture capitalist. [Weibo] [Subscribe]


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK