win10环境下gvim离线配置插件的一些补充

0 总述

在上一篇博客,即《Windows系统下使用gvim配置LaTeX快速书写环境》一文中,本小白试图模仿神级人物Gilles Castel,打造vim下的 LaTeX \LaTeX LATEX书写环境。实话实说,东施效颦了。虽不至于一无所得,但也仅仅算开了个头。经过一段时间的摸索和查漏补缺,我深刻地认识到在之前博客中犯了一些错误。本文试图对于其中的一个错误进行修正。

1 究竟应该如何配置插件

上文书讲到,因为github受到墙的影响,导致我们无法按照vim-plug插件的官方指导方法,通过网络安装插件的方法直接完成插件配置。因此小白随意找了一个位置把插件配置了进去。虽然通过小白一通蹩脚的配置,确实勉强可以使用。但是不知道你有没有发现,按照那个配置方法,我们是无法查看到相关help或者其他doc文件的。这样给我们学习插件使用带了很大困扰。

从第一性原理出发,理论上,插件自动安装,也无非是通过程序将相应的文件安装配置在正确的位置。那么,插件的正确安装位置应该是哪里?

小白通过不间断地尝试,在github网络较好的时候,幸运地以自动化的方式安装成功了一个插件。于是我们查看到这个插件的安装位置实际上是在

C:\\Users\\XXXX\\vimfiles\\plugged

路径下。其中XXXX指的当然就是你的用户名了。

小白查阅了一些资料,原来,如果你在gvim中输入

:echo &HOME

注意冒号和大小写,这其实是在vim的普通模式下。
则系统会返回给你$HOME的路径,而这个路径下的vimfiles文件夹才应该是插件应该待的地方。

如果你和小白一样是windows10系统下默认安装的gvim,那么你将会看到

C:\Users\XXXX

如果你打开这个路径,发现没有plugged文件夹,那就顺手建一个,同样地,不要拼错单词。

注意把你下载的几个插件解压到这个plugged文件夹下面。
同时注意把它的版本号去掉。
在这里插入图片描述

然后又回到我们的_vimrc配置文件中,把之前强行指定的部分全都修改掉。

" Vim with all enhancements
source $VIMRUNTIME/vimrc_example.vim

" Use the internal diff if available.
" Otherwise use the special 'diffexpr' for Windows.
if &diffopt !~# 'internal'
  set diffexpr=MyDiff()
endif
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  
gvim常用插件及其配置文件 支持c,perl,python,latex。 需要自己安装ctags .vim: after compiler doc indent ltags perl-support skeleton syntax autoload c-support ftdetect keymap Makefile plugin snipMate.vim.ct tools colors CVIMSYN ftplugin latextags Makefile.in README.csupport snippets .vim/after: ftplugin plugin syntax .vim/after/ftplugin: c_snippets.vim java_snippets.vim python_pydiction.vim python_snippets.vim sh_snippets.vim .vim/after/plugin: .vim/after/syntax: cpp.vim c.vim java.vim .vim/autoload: acp.vim perlsupportgui.vim perlsupportprofiling.vim perlsupportregex.vim snipMate.vim .vim/colors: desertEx.vim peachpuff.vim zenburn.vim .vim/compiler: tex.vim .vim/c-support: codesnippets doc rc scripts templates wordlists .vim/c-support/codesnippets: calloc_double_matrix.c main.cc print_array.cc.noindent calloc_int_matrix.c Makefile print_double_array.c.noindent main.c Makefile.multi-target.template print_int_array.c.noindent .vim/c-support/doc: ChangeLog c-hotkeys.pdf c-hotkeys.tex .vim/c-support/rc: customization.ctags customization.gvimrc customization.indent.pro customization.vimrc .vim/c-support/scripts: wrapper.sh .vim/c-support/templates: c.comments.template cpp.comments.template cpp.preprocessor.template c.statements.template c.cpp.template cpp.cpp.template cpp.statements.template Templates c.idioms.template cpp.idioms.template c.preprocessor.template Templates~ .vim/c-support/wordlists: c-c++-keywords.list c-c++-keywords.list.bak k+r.list stl_index.list .vim/CVIMSYN: engspchk.contraction engspchk.dialect engspchk.dict engspchk.match engspchk.proper engspchk.rare .vim/doc: acp.jax latexhelp.txt latex-suite-quickstart.css Makefile taglist.txt acp.txt latex-suite latex-suite-quickstart.html Makefile.in tags catalog.xml la
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值