vim目录树

使用vim插件:显示树形目录插件NERDTree

安装方法很简单,先把压缩文件下载下来,解压后将plugin目录下的NERD_tree.vim拷贝~/.vim/plugin以及doc目录下的NERD_tree.txt拷贝到~/.vim/doc. ~表示当前用户的目录,我的环境中没有~/.vim ~/.vim/plugin ~/.vim/doc ,待会会创建,如果你的版本有,那就更好了。

wget http://www.vim.org/scripts/download_script.php?src_id=17123 -O nerdtree.zip 
unzip nerdtree.zip
 
mkdir -p ~/.vim/{plugin,doc}
 
cp plugin/NERD_tree.vim ~/.vim/plugin/
cp doc/NERD_tree.txt ~/.vim/doc/

安装好后,命令行中输入vim,打开vim后,在vim中输入:NERDTree,你就可以看到NERDTree的效果了。

ctrl+w+w 光标在左右窗口切换
ctrl+w+r 切换当前窗口左右布局

:vs  或者 :vsplit  --vertical split,将当前窗口竖直分割,当前文件在两个窗口中显示

:vs filename 将当前窗口竖直分割,文件filename在新窗口中显示

:sp 或者 :split  将当前窗口水平分割,当前文件在两个窗口中显示

:sp filename 将当前窗口竖直分割,文件filename在新窗口中显示

posted @ 2019-12-13 00:38  腹肌猿  阅读(918)  评论(0编辑  收藏  举报