扔一个Golang的Neovim配置文件
Tofloor
poster avatar
Bluek404
deepin
2014-07-14 20:36
Author
  1. "No warp───┐
  2. set nowrap"│
  3. "──────────┘
  4. "Line number─┐
  5. set number  "│
  6. "────────────┘
  7. "Plugin Manager────────────────────┐
  8. set rtp+=~/.nvim/bundle/Vundle.vim"│
  9. "──────────────────────────────────┘
  10. "Plugin load begin───────────────────┐
  11. set nocompatible                    "│
  12. filetype off                        "│
  13. call vundle#begin()                 "│
  14.                                     "│
  15. "Airline───────────────────┐         │
  16. Plugin 'bling/vim-airline'"│         │
  17. set laststatus=2          "│         │
  18. "──────────────────────────┘         │
  19. "TagBar─────────────────────────────┐│
  20. Plugin 'majutsushi/tagbar'         "││
  21. nmap :TagbarToggle        "││
  22. let g:tagbar_type_go = {           
  23.     \ 'ctagstype' : 'go',         
  24.     \ 'kinds'     : [              
  25.         \ 'p:package',            
  26.         \ 'i:imports:1',           
  27.         \ 'c:constants',           
  28.         \ 'v:variables',           
  29.         \ 't:types',               
  30.         \ 'n:interfaces',         
  31.         \ 'w:fields',              
  32.         \ 'e:embedded',            
  33.         \ 'm:methods',            
  34.         \ 'r:constructor',         
  35.         \ 'f:functions'            
  36.     \ ],           
  37.     \ 'sro' : '.',
  38.     \ 'kind2scope' : {            
  39.         \ 't' : 'ctype',           
  40.         \ 'n' : 'ntype'            
  41.     \ },           
  42.     \ 'scope2kind' : {            
  43.         \ 'ctype' : 't',           
  44.         \ 'ntype' : 'n'            
  45.     \ },           
  46.     \ 'ctagsbin'  : 'gotags',      
  47.     \ 'ctagsargs' : '-sort -silent'
  48. \ }                                "││
  49. "───────────────────────────────────┘│
  50. "NerdTree────────────────────┐       │
  51. Plugin 'scrooloose/nerdtree'"│       │
  52. map :NERDTree     "│       │
  53. "────────────────────────────┘       │
  54. "Golang Plugin────────────────┐      │
  55. Plugin 'dgryski/vim-godef'   "│      │
  56. Plugin 'cespare/vim-golang'  "│      │
  57. Plugin 'Blackrush/vim-gocode'"│      │
  58. "─────────────────────────────┘      │
  59. "Autocompletion─────────────────┐    │
  60. Plugin 'Valloric/YouCompleteMe'"│    │
  61. "───────────────────────────────┘    │
  62. "Plugin load end──────────┐          │
  63. call vundle#end()        "│          │
  64. filetype plugin indent on"│          │
  65. "─────────────────────────┘          │
  66. "────────────────────────────────────┘
  67. "Highlight─┐         
  68. syntax on "│         
  69. "──────────┘   
  70. "Golang compiler plugin─────────┐
  71. autocmd FileType go compiler go"│
  72. "───────────────────────────────┘
  73. "Automatic format────────────────────────────────────┐
  74. autocmd FileType go autocmd BufWritePre Fmt"│
  75. "────────────────────────────────────────────────────┘
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插件管理器
  1. 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 Favorite View the author
All Replies
manu_curry
deepin
2019-03-22 08:05
#1
不明觉厉
Reply View the author