技术头条 - 一个快速在微博传播文章的方式     搜索本站
您现在的位置首页 --> Linux --> vim 常用插件推荐

vim 常用插件推荐

浏览:5769次  出处信息

    1 程序设计

    1.1 Tag List

    下载地址: 官方站点

    官方描述: The “Tag List” plugin is a source code browser plugin for Vim and provides an overview of the structure of source code files and allows you to efficiently browse through source code files for different programming languages.

    滇狐评价: 这是一个非常非常非常非常重要的插件, 有了它, 我们才能够在 VIM 中查看一个文件中包含的函数列表, 或是一个类包含的方法列表, 为编程人员提供了极大方便。 推荐大家一定要安装!

    安装注意事项: 有的系统内置的 ctags 功能太弱, 推荐大家安装 EXUBERANT CTAGS, 这个东西功能比较强大, 居然连 HTML 里面内嵌的 Java Script 都能够支持, 实在是匪疑所思!

    滇狐个人习惯: 滇狐习惯把方法列表放在屏幕的右侧, 于是在 .vimrc 中设置了

    let Tlist_Use_Right_Window=1

     另外, 滇狐习惯让当前不被编辑的文件的方法列表自动折叠起来, 这样可以节约一些屏幕空间, 于是在 .vimrc 中设置了

    let Tlist_File_Fold_Auto_Close=1。

     1.2 A

    下载地址: 官方站点

    官方描述:

    A few of quick commands to swtich between source files and header files quickly.

    :A switches to the header file corresponding to the current file being edited (or vise versa)

    :AS splits and switches

    :AV vertical splits and switches

    E.g. if you are editing foo.c and need to edit foo.h simply execute :A and you will be editting foo.h, to switch back to foo.c execute :A again.

    滇狐评价: 第一眼看到这个东西时, 总觉得它功能太简单, 似乎没有什么用处。 用过之后, 才发现这项功能对于一个程序员来说是如何重要!

    1.3 Win Manager

    下载地址: 官方站点

    官方描述: winmanager is a plugin which implements a classical windows type IDE in Vim-6.0. Basically, you have the directory tree and the buffer list as 2 windows which stay on the left and the editing is done in a seperate area on the left. People have already made excellent File and Buffer explorers seperately and I thought that it might be a cool idea to combine them both. winmanager.vim combines the standard File Explorer which ships with Vim 6.0 and a Buffer Explorer written by Jeff Lanzarotta into one package.

    滇狐评价: 非常好用的东西, 在屏幕上打开一个文件浏览器, 这样就可以方便地选择要编辑的文件了。

    默认情况下, winmanager 依赖于 bufexplorer, 到这里下载。 如果你不喜欢 bufexplorer 插件的话 可以在你的 .vimrc 中添加这条命令禁用它:

    let g:winManagerWindowLayout = “FileExplorer”

     这样就不需要下载该插件了。

    滇狐为 winfileexplorer.vim 加了一个补丁, 提供了使用系统默认打开方式打开选中文件的功能, 只要把光标放在想要打开的文件上, 然后按“S”就可以了 (注意是大写)。 这样以后就可以直接在 gvim 里打开 Noatun 或别的播放器, 不用再切换出来找 konqueror 了。

    

     1.4 echofunc

    下载地址: 官方站点

    官方描述: When you type ‘(‘ after a function name in insert mode, the function declaration will be displayed in the command line automatically. Then use Alt+-, Alt+= to cycle between function declarations (if exists).

    滇狐评价: 一个非常好用的插件, 虽然很小巧, 功能也很简单, 但非常实用, 强烈推荐。 除此之外, 安装了这个插件后, 当鼠标移到一个标志符之上时, 还会出现一个气球显示该标志符的定义, 如图:

    安装注意事项: 该插件需要安装 EXUBERANT CTAGS, 不支持古老版本的标准 ctags。 建议创建一个这样的脚本:

    #!/bin/sh

     # Filename: omnictags

    ctags -c++-kinds=+p -fields=+iaS -extra=+q “$@”

     然后使用 omnictags 来运行 ctags 生成 tags 文件, 保证 tags 文件中含有所需的信息。

    1.5 omnicppcomplete

    下载地址: 官方站点

    官方描述: This script is for vim 7.0 or higher it provides an omnifunc cppcomplete function. You can use the omni completion (intellisense) in c++ files.

    This is a full vim script and you only need a ctags database.

    滇狐评价: 虽然滇狐几乎不依赖 IDE 的自动完成, 因此也很少使用这个插件, 但总的说来, 这仍然是个很棒的插件。

    安装注意事项: 该插件需要安装 EXUBERANT CTAGS, 不支持古老版本的标准 ctags。 建议创建一个和前面的 echofunc 中给出个脚本, 使用那个脚本来生成 tags 文件。

    1.6 clewn

    下载地址: 官方站点

    官方描述: Clewn implements full gdb support in the vim editor: breakpoints, watch variables, gdb command completion, assembly windows, etc.

    滇狐评价: Vim 从一开始的设计哲学就是要保持简单, 不要把太多的东西整合在 Vim 中。 Clewn 在保持了 Vim 简单的原则下, 将集成调试所需的一部分功能引入到了 GVim 中, 支持设置断点、 查看变量的值等许多操作, 非常方便。

    1.7 jad

    下载地址: 无。 自己将代码复制粘贴回去, 保存为 $HOME/.vim/plugins/jad.vim:

    augr class

     au!

     au bufreadpost,filereadpost *.class %!jad -noctor -ff -i -p %

     au bufreadpost,filereadpost *.class set readonly

     au bufreadpost,filereadpost *.class set ft=java

     au bufreadpost,filereadpost *.class normal gg=G

     au bufreadpost,filereadpost *.class set nomodified

     au bufreadpost,filereadpost *.class set nomodifiable

     augr END

     官方描述: (无)

    滇狐评价: 挺好玩的插件, 不过似乎也只是好玩而已。 安装了之后可以直接双击打开 .class 文件, VIM 会自动调用 jad 把文件反编译了。

    安装注意事项:需要先安装一份 jad。

    1.8 cscope_maps

    下载地址: 官方站点

    官方描述: Cscope is a very handy tool, but it’s even better when you don’t ever have to leave the comfort of your favorite editor (i.e. Vim) to use it. Fortunately, Cscope support has been built into Vim.

    滇狐评价: 滇狐目前 cscope 用得不如 ctags 多, 许多功能都不大熟。 不过既然大家都说好, 那还是装着玩玩吧。

    安装注意事项: 需要安装 cscope。

    1.9 project

    下载地址: 官方站点

    官方描述: You can use this plugin’s basic functionality to set up a list of frequently-accessed files for easy navigation. The list of files will be displayed in a window on the left side of the Vim window, and you can press or double-click on filenames in the list to open the files. This is similar to how some IDEs I’ve used work. I find this easier to use than having to navigate a directory hierarchy with the file-explorer. It also obviates the need for a buffer explorer because you have your list of files on the left of the Vim Window.

    滇狐评价: 食之无肉,弃之有味。

    安装注意事项: 几乎没怎么用过, 所以暂时没有发现需要注意的地方。

    2 文档编写

    2.1 fencview

    下载地址: 官方站点

    官方描述: View a multi-byte encoded file in different encodings.

    滇狐评价: 对于亚洲用户, 尤其是中国用户而言, 这是一个非常重要的插件! 它能自动识别文本文件的编码, 给需要编辑各种不同编码的人员提供了极大方便。

    2.2 VIM LaTeX Suite

    下载地址: 官方站点

    官方描述:

    Vim is undoubtedly one of the best editors ever made. LaTeX is an extremely powerful, intelligent typesetter. Vim-LaTeX aims at bringing together the best of both these worlds.

    We attempt to provide a comprehensive set of tools to view, edit and compile LaTeX documents without needing to ever quit Vim. Together, they provide tools starting from macros to speed up editing LaTeX documents to compiling tex files to forward searching .dvi documents.

    See the features page for a brief tour of the various features in LaTeX-suite. All these features can be tuned extensively using the included texrc file. The screenshots page shows you how a typical working session with LaTeX-suite might progress.

    LaTeX-suite is made for Vim versions 6.0 and above. Installation instructions are given in the download page.

    滇狐评价: 实在是非常非常非常非常好的一个插件! 用 VIM 写 LaTeX 的朋友无论如何都要试一试, 不用 VIM 写 LaTeX 的朋友也要试一试, 说不定你会改变你的主意, 改用 VIM 写 LaTeX。

    安装注意事项: 如果使用 gvim 的话, 需要注意 scim 可能会和 LaTeX Suite 有冲突。 解决方法是要么把 scim 的 on the spot 功能去掉, 或者把 gtk_im_module 设为 scim。 (较新版本 scim 建议第二种方案)。

    另外, 为了提高工作效率, 强烈建议配置 VIM 的LaTeX 正向、反向搜索功能。

    2.3 sketch

    下载地址: 官方站点

    官方描述: Sketch.vim

建议继续学习:

  1. vim几个小技巧(批量替换,列编辑)    (阅读:35669)
  2. 简明Vim练级攻略    (阅读:20494)
  3. Vim下的代码自动补全和代码跳转阅读    (阅读:14194)
  4. 分享一个JQUERY颜色选择插件    (阅读:12379)
  5. 为什么要用 Emacs/Vim,而不是任何其他编辑器    (阅读:11994)
  6. 在vim(gvim)中运行终端(对,你没有看错,我也没有写反)    (阅读:9261)
  7. vim入门,进阶与折腾    (阅读:8999)
  8. 让vim在终端下的配色亮起来!    (阅读:8504)
  9. jQuery Color Animations颜色动画插件    (阅读:6915)
  10. 最近总结的一些技巧(vim,python,svn,fiddler等)    (阅读:6889)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
© 2009 - 2024 by blogread.cn 微博:@IT技术博客大学习

京ICP备15002552号-1