vim-plug + nerdtree + vim-colorschemes

1 篇文章 0 订阅
0.概述

vim-plug:
vim-plug是所有vim插件的管家
vim-colorschemes:
是vim的配色管理
NERDTree:
是让vim的左侧出现目录结构,方便定位文件。
Gutentags:
基于ctags(exuberant-ctags on Ubuntu18 or universal-ctags on Ubuntu22),可以在big respository中搜索代码的定义
vim-preview:
vim-preview可以preview tags, files and function signatures.

1.下载vim-plug

cd ~/.vim/autoload
wget https://github.com/junegunn/vim-plug/archive/0.10.0.tar.gz
tar -xvf 0.10.0.tar.gz
cp vim-plugxxxxxxx/plug.vim ./

2.配置vim-plug , 安装 vim-colorscheme 和 nerdtree
2-1 修改~/.vimrc
vim ~/.vimrc

输入:

" vim
set nocompatible

" vim-plug
call plug#begin('~/.vim/plugged')
Plug 'flazz/vim-colorschemes'
Plug 'scrooloose/nerdtree'
call plug#end()

" colorscheme
colorscheme molokai
2-2. 退出重进.vimrc,然后运行安装命令:
:PlugInstall
3. vim-plug排雷

不要下载github上推荐的链接,否则运行的时候,会有很多报错。
正确的做法是下载历史的tag,如:
https://github.com/junegunn/vim-plug/archive/0.10.0.tar.gz
并将其中的plug.vim 拷贝到 ~/.vim/autoload中即可。

4. 我目前的配置
" vim
set nocompatible

" vim-plug
call plug#begin('~/.vim/plugged')
Plug 'flazz/vim-colorschemes'
Plug 'scrooloose/nerdtree'
call plug#end()
" vim-plug colorscheme
colorscheme molokai

" tab 
" a tab takes 4-spaces-wide
set tabstop=4
" a indent takes 4-spaces-wide
set shiftwidth=4
" a tab consist of 4 spaces
set expandtab
set smarttab
" this is for tab party,disable it
set softtabstop=0
5. 插件的基础使用

5.1 NERDTree
开启NERDTree的树形菜单
:NERDTree
开启NERDTree的帮助
:help NERDTree

5.2 Gutentags
sudo apt install global
sudo apt install universal-ctags
add .git in .vimrc config

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值