vim + spf13
发布时间:2020-12-15 23:05:01 所属栏目:安全 来源:网络整理
导读:mac-----$ brew install vim --with-cscope --with-lua --override-system-vim安装spf13-vim见下面linux部分。如果安装macvim,将上面的vim替换为macvim,然后执行 brew linkapps macvim linux-----$ sudo apt-get remove --purge vim$ sudo apt-get autocle
mac ----- $ brew install vim --with-cscope --with-lua --override-system-vim 安装spf13-vim见下面linux部分。 如果安装macvim,将上面的vim替换为macvim,然后执行 brew linkapps macvim linux ----- $ sudo apt-get remove --purge vim $ sudo apt-get autoclean $ sudo apt-get install python-dev python3-dev ruby-dev luajit liblua5.1-dev libluajit-5.1 libperl-dev libncurses5-dev $ sudo rm -rf /usr/local/share/vim $ sudo rm /usr/bin/vim $ sudo mkdir -p /usr/include/lua5.1/include $ sudo cp /usr/include/lua5.1/*.h /usr/include/lua5.1/include/ $ cd ~ $ git clone --depth 1 https://github.com/vim/vim.git $ cd ~/vim/src $ make distclean $ ./configure --with-features=huge --enable-largefile --enable-multibyte --enable-perlinterp --enable-rubyinterp --enable-luainterp --enable-python3interp --with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu --with-luajit --enable-fail-if-missing --with-lua-prefix=/usr/include/lua5.1 --enable-cscope --enable-gui=auto 注意:python3 和 python 同时给定,优先会使用python --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config $ make -j8 $ sudo make install $ whereis vim vim: /usr/local/bin/vim /usr/share/man/man1/vim.1 $ vim --version 安装spf13-vim ----vim-plugs版本---- https://github.com/junegunn/vim-plug/wiki cd ~ pip3 install neovim curl https://raw.githubusercontent.com/StarryLeo/starry-vim/master/bootstrap.sh -L > starry-vim.sh && sh starry-vim.sh 或者 sh <(curl https://raw.githubusercontent.com/StarryLeo/starry-vim/master/bootstrap.sh -L) 添加go-vim插件 echo "Plug ‘fatih/vim-go‘,{ ‘do‘: ‘:GoUpdateBinaries‘ }" >> ~/.vimrc.plugs.local vim +PlugClean! +PlugInstall +q 查看状态,清理错误的插件后再重新安装 :PlugStatus :PlugClean :PlugInstall 删除一个插件 echo UnPlug ‘scrooloose/syntastic‘ >> ~/.vimrc.plugs.local 更新: cd ~/.starry-vim/ git pull vim +PluginClean! +PlugInstall +q ----原始Vundle版本---- $ sudo apt-get install exuberant-ctags $ curl http://j.mp/spf13-vim3 -L -o - | sh 或者 $ curl https://raw.githubusercontent.com/spf13/spf13-vim/3.0/bootstrap.sh -L -o - | sh 会出现amirh/HTML-AutoCloseTag错误(提示是登陆github),按Ctrl+w,jj跳过这个错误 全部安装后 $ vim ~/.vimrc.bundles 找到amirh,替换为okayliao,保存退出后用下面命令重新安装一遍插件。 $ vim +BundleInstall! +BundleClean +q 快捷键: 开启行号(简写nu) :set number 开启相对行号(简写rnu) :set relativenumber 向上移动相对8行:g.8k 向下移动相对8行:g.8j 向下删除到相对4行:d4j 重复上个命令:. 打开NERD_Tree目录树:C-e或者,e 查找文件打开:C-p 注释:,cc 跳转:,fa,b Surround Old text Command New text ~ "Hello *world!" ds" Hello world! [123+4*56]/2 cs]) (123+456)/2 "Look ma,I‘m *HTML!" cs"<q> <q>Look ma,I‘m HTML!</q> if *x>3 { ysW( if ( x>3 ) { my $str = *whee!; vllllS‘ my $str = ‘whee!‘; 关闭拼写检查、自动折叠、行号显示、调整字体大小 vim ~/.vimrc.local set number relativenumber set nospell set nofoldenable let g:DisableAutoPHPFolding = 1 if has(‘gui_running‘) set guioptions-=T " Remove the toolbar set lines=40 " 40 lines of text instead of 24 if !exists("g:starry_no_big_font") if LINUX() && has("gui_running") set guifont=Consolas-with-Yahei:h12 elseif OSX() && has("gui_running") set guifont=Andale Mono Regular:h13,Menlo Regular:h12,Consolas Regular:h13,Courier New Regular:h15 elseif WINDOWS() && has("gui_running") set guifont=Consolas-with-Yahei:h10.5 endif endif else if &term == ‘xterm‘ || &term == ‘screen‘ set t_Co=256 " Enable 256 colors to stop the CSApprox warning and make xterm vim shine endif "set term=builtin_ansi " Make arrow and other keys work endif 内容结束 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |