vim插件

我本来是有一个自己的vimrc, 但是后来用vundle搞丢了.不过vendle确实是神器啊.
这里是网址https://github.com/VundleVim/Vundle.vim
里边其实有个小教程.
我这里就为一个目的. 写go. 偶尔也写点php.
下边是vimrc. 有点乱.

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif

" php file
autocmd FileType php set nu shiftwidth=2 ts=2 expandtab
" go file
autocmd FileType go set nu shiftwidth=4 ts=4
au FileType go nmap r (go-run)
au FileType go nmap b (go-build)
au FileType go nmap t (go-test)
au FileType go nmap c (go-coverage)

" Emacs-style start of line / end of line navigation
nnoremap   ^
nnoremap   $
vnoremap   ^
vnoremap   $
inoremap   ^i
inoremap   $i
" Fix Alt key in MacVIM GUI
" TODO - Fix in MacVIM terminal
if has("gui_macvim")
  set macmeta
endif

" Emacs-style start of file / end of file navigation
nnoremap   gg
nnoremap  > G$
vnoremap   gg
vnoremap  > G$
inoremap   ggi
inoremap  > G$i

set nocompatible              " be iMproved, required
filetype off                  " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" Keep Plugin commands between vundle#begin/end.
Plugin 'fatih/vim-go'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

你可能感兴趣的:(vim插件)