Install vim after installing ubuntu

来源:互联网 发布:win10系统改mac地址 编辑:程序博客网 时间:2024/05/22 05:33

Code

installvim.sh

#!/bin/bashcd ~/sudo apt-get -y updatesudo apt-get -y install vim-gtk gitmkdir -p ~/.vim/bundlecd ~/.vim/bundlegit clone https://github.com/gmarik/Vundle.vim.gitcd ~/Downloadswget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gztar -zxvf ctags-5.8.tar.gzcd ctags-5.8./configuremakesudo make installrm ctags-5.8.tar.gz ctags-5.8 -rftouch ~/.vimrc

~/.vimrc

set nocompatiblefiletype offset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()Plugin 'gmarik/Vundle.vim'Plugin 'scrooloose/nerdtree'Plugin 'scrooloose/nerdcommenter'Plugin 'scrooloose/syntastic'Plugin 'jiangmiao/auto-pairs'Plugin 'Yggdroot/indentLine'Plugin 'vim-scripts/python_fold'Plugin 'SirVer/ultisnips'Plugin 'honza/vim-snippets'"Plugin 'ctags.vim'Plugin 'taglist.vim'call vundle#end()filetype plugin indent on:colorscheme elflordset numberset cursorlineset tabstop=4set softtabstop=4set expandtabset shiftwidth=4set smartindentset foldenableset foldmethod=syntax"nerdtree"autocmd vimenter * NERDTreemap <C-b> :NERDTreeMirror<CR>map <C-b> :NERDTreeToggle<CR>"taglistlet Tlist_Show_One_File=1let Tlist_Exit_OnlyWindow=1let Tlist_File_Fold_Auto_Close=1let Tlist_Use_Right_Window=1let Tlist_Show_Menu=1let Tlist_Auto_Open=1"UltiSnipslet g:UltiSnipsExpandTrigger="<tab>"let g:UltiSnipsJumpForwardTrigger="<c-b>"let g:UltiSnipsJumpBackwardTrigger="<c-z>"

How to do

  • Step 1: new a file named installvim.sh, and copy the code.
  • Step 2: run it.
  • Step 3: copy .vimrc
  • Step 4: open vim
  • Step 5: run :PluginInstall in vim
0 0