Vim学习笔记

工作需要,搭建一个cms,需要修改一下默认的模版文件,文件点多了出现鼠标手,使用希望可以使用键盘完成所有工作。选择了windows下的gvim。

 1、生存

  最基本的使用方法,上下左右的移动;文件的打开、保存、关闭;常见模式的使用;tutor的学习;

2、level1

  分窗口,分标签,简单的vimrc配置(不加载插件的情况下),buffer,简单的自动完成,快捷键设置

  外篇:编码

3、level2

  加载一些常见插件:buffermanager,nerdtree,winmanager太老了, tagbar,nerd系列,neo系列,

  使用Vundle管理插件非常的方便,目前使用了NerdTree、TagBar、NeoComplete、NeoSnippets等插件

  使用NeoSnippets时为了缩进正确,需要打开filetype plugin on, filetype plugin indent on并设置

  set tabstop=4
  set softtabstop=4
  set shiftwidth=4

  set expandtab
  开始时手动设定了smartindent\autoindent\cindent,结果出现了缩进错误。

  使用Vundle时,居然有了眼前一亮的感觉。

  使用NeoComplete和NeoSnippets后,感觉可以放弃SublimeText了。

  使用syntastic,可以腾出Quickfix了。

  使用jedi-vim时,需要修改一点文件,否则会同NeoComplete冲突,(准备试用NeoBundle,可以自动选择GihHub上的Patch)。

4、level3

  在使用vim时常常会有一些插件弹出错误信息,而这些错误信息常常是一闪而过的,要怎么保存呢?

  

see
:help :redir
:help :messages
:help error-messages
:help v:errmsg
:help :let-register

Example: to copy the 10 latest messages to the clipboard (or all of them if
there were less than 10):

:redir @*
:messages
:redir END

(paste them then with "*p or with the Edit -> Paste menu item)

to copy the latest error message to register x:

:let @x = v:errmsg

paste with

"xp

    如上。

5、VimFx In Firefox

原文地址:https://www.cnblogs.com/abcat/p/3134401.html