Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
扔一个Golang的Neovim配置文件
社区开发
2651
views ·
1
replies ·
To
floor
Go
Bluek404
deepin
2014-07-14 20:36
Author
"No warp───┐
set nowrap"│
"──────────┘
"Line number─┐
set number "│
"────────────┘
"Plugin Manager────────────────────┐
set rtp+=~/.nvim/bundle/Vundle.vim"│
"──────────────────────────────────┘
"Plugin load begin───────────────────┐
set nocompatible "│
filetype off "│
call vundle#begin() "│
"│
"Airline───────────────────┐ │
Plugin 'bling/vim-airline'"│ │
set laststatus=2 "│ │
"──────────────────────────┘ │
"TagBar─────────────────────────────┐│
Plugin 'majutsushi/tagbar' "││
nmap :TagbarToggle "││
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ } "││
"───────────────────────────────────┘│
"NerdTree────────────────────┐ │
Plugin 'scrooloose/nerdtree'"│ │
map :NERDTree "│ │
"────────────────────────────┘ │
"Golang Plugin────────────────┐ │
Plugin 'dgryski/vim-godef' "│ │
Plugin 'cespare/vim-golang' "│ │
Plugin 'Blackrush/vim-gocode'"│ │
"─────────────────────────────┘ │
"Autocompletion─────────────────┐ │
Plugin 'Valloric/YouCompleteMe'"│ │
"───────────────────────────────┘ │
"Plugin load end──────────┐ │
call vundle#end() "│ │
filetype plugin indent on"│ │
"─────────────────────────┘ │
"────────────────────────────────────┘
"Highlight─┐
syntax on "│
"──────────┘
"Golang compiler plugin─────────┐
autocmd FileType go compiler go"│
"───────────────────────────────┘
"Automatic format────────────────────────────────────┐
autocmd FileType go autocmd BufWritePre Fmt"│
"────────────────────────────────────────────────────┘
Copy the Code
好吧其实原版VIM也通用
只是需要把上面的.nvim文件夹改成.vim就行
这里面需要用到Golang的官方插件,把go源码里的misc/vim全部扔到相应的文件夹即可(或者做个链接)
别问我为什么写成这样……我有强迫症
不过因为\接上一行的问题,所以有些地方没法注释(逼死强迫症啊)
然后这个是适用于初学者的,因为我才开始用vim不到一周。有什么问题欢迎指出哈
DeepinScreenshot20140714121456.png
使用方法:
1.有一个Neovim(原版vim请自行把.nvim脑补成.vim,Neovim编译安装可以看
http://bluek404.net/post/neovim/
)
2.安装Vundle插件管理器
git clone https://github.com/gmarik/Vundle.vim.git ~/.nvim/bundle/Vundle.vim
Copy the Code
然后打开~/.nvim/bundle/Vundle.vim/autoload/vundle.vim,把里面的文件夹路径.vim替换成.nvim(原版vim无需此步骤,这是让插件管理器安装插件到Neovim的文件夹)
3.把上面的配置文件保存到用户目录的.nvimrc文件
4.终端输入nvim然后输入:BundleInstall安装插件
5.完成~
Reply
Like 0
Favorite
View the author
All Replies
manu_curry
deepin
2019-03-22 08:05
#1
不明觉厉
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Events
More
只是需要把上面的.nvim文件夹改成.vim就行
这里面需要用到Golang的官方插件,把go源码里的misc/vim全部扔到相应的文件夹即可(或者做个链接)
别问我为什么写成这样……我有强迫症
不过因为\接上一行的问题,所以有些地方没法注释(逼死强迫症啊)
然后这个是适用于初学者的,因为我才开始用vim不到一周。有什么问题欢迎指出哈
DeepinScreenshot20140714121456.png
使用方法:
1.有一个Neovim(原版vim请自行把.nvim脑补成.vim,Neovim编译安装可以看http://bluek404.net/post/neovim/)
2.安装Vundle插件管理器
3.把上面的配置文件保存到用户目录的.nvimrc文件
4.终端输入nvim然后输入:BundleInstall安装插件
5.完成~