vim 编辑器 扩展

1: acp.vim: 语法自动提示
2: rails.vim: 提供许多rails的命令,只能在项目根目录下运行如下是该插件的一部分命令,详情请看帮助:
:Rake :Rake db:migrate, :Rake db:create, ......
:Rmodel :Rmodel info (查找model名称为info的文件)
:Rview :Rview infos/new (查找infos控制器下的new视图文件)
:Rcontroller :Rcontroller infos(查找控制器名称为infos的文件)
:Rfind :Rfind infos_controller(查找infos_controller.rb文件)
:Rails :Rails console 或 :Rails generate model info age:integer或........
:Rscript :Rscript console 或 :Rscript generate model info age:integer或......(注意Rscript相当于script/rails命令)
:Redit :Redit 相对路径
:Rlog :Rlog development 打开development.log日志文件
:Rpreview 打开一个浏览器,http://localhost:3000
:Rrefresh 刷新
R 在目录下直接shift+r,可以刷新目录
gf 根据当前光标处内容跳转到文件
:Rmigration 查找migration文件
:Rlayout 查找layout文件
:Rhelper 查找helper文件
:Rstylesheet
:Rjavascript
:Rplugin
:Rlib
:Rtask
:Rserver

3:
1) bufexplorer.vim: 在打开的文件中进行选择文件,默认情况下打开文件选择窗口的命令为\be,例如当我打开了两个文件,按下\be之后,文件选择窗口弹出
2) minibufexpl.vim: 可以直接显示缓存文件列表窗口,并且通过Ctrl+h、j、k、l来控制光标到所对应的窗口
参考: http://www.cnblogs.com/XiaoHui/archive/2009/06/15/1503901.html
3) tabbar.vim 可以直接显示缓存文件列表窗口,还可以通过ctrl+缓存文件的数字来打开文件,也可以ctrl+tab来切换文件
注意: tabbar有一个缺点是如果vim/autoload/ctrlp.vim打开的文件太多,则无法全部显示,必须吧vim窗口拉的足够宽才能看的到。
4) buf_it.vim 在状态栏显示缓存文件列表,可以通过ctrl+缓存文件的数字来打开文件


4: NERD_commenter.vim: 添加注释的插件,使用如下:
[count],cc:光标以下count行添加注释(2,cc)
[count],cu:光标以下count行取消注释(2,cu)
[count],cm:光标以下count行添加块注释(2,cm)

5: snipMate.vim 为Vim实现了一些 TextMate 的片段(补全)特性,片段就是使用一个关键字后加 <tab> 键来插入一些常用的文本。
注意:
1)这里一定要记住在.vimrc中添加配置信息,还有snipMate的代码片段在.vim/snippets下
eg: auto FileType ruby,ruby-rails setlocal omnifunc=pythoncomplete#Complete
2)需要acp.vim插件

6: surround.vim 方便快捷的处理配对符号如: ( ), [ ], { }, < > ‘ ‘, ” “,例如(注意: 以下实例需要光标的位置在所要操作的位置上,具体的不说了,自己试吧):
"zcy" ds" zcy 去掉“
"zcy" cs"<p> <p>zcy</p> 将”换为<p>
zcy vllls" "zcy" 添加“(其中l为移动光标)
zhang cai ysW" "zhang" cai
<div>zcy</div> dst zcy
<div>zcy</div> cst" "zcy"
<div>zcy</div>a yss( (<div>zcy</div>a)

7: dbext.vim 可以在vim中连接数据库,并且操作数据库,例如:

:DBSetOption :user=用户名 :passwd=密码 :dbname=数据库名称
:Select * from infos;

8: grep.vim 查找插件,如果你需要在整个项目下查找的话,那你就需要它了

http://www.diybl.com/course/6_system/linux/Linuxjs/2007114/84125_6.html


9: taglist.vim 显示当前文件中的方法列表,点击方法可以将鼠标指针指到该方法。

http://easwy.com/blog/archives/advanced-vim-skills-taglist-plugin/

10: tetris.vim 俄罗斯方块游戏,\te开始

http://www.vim.org/scripts/script.php?script_id=172

11: NERDTree.vim 非常非常重要的插件,打开目录,在目录中方便的进行操作

http://www.dutor.net/index.php/2010/01/vim-calendar-nerdtree/


12: man_it.vim 察看命令帮助的插件,在光标处按大些K来查看,例如在vim插件中的while出按K

13: mark.vim 可以标记代码,高亮显示所有的一样的代码,需要注意的是,要想mark.vim生效,需要在vimrc中设置,例如highlight def MarkWord1 ctermbg=Cyan ctermfg=Black guibg=#8CCBEA guifg=Black

地址: http://www.vim.org/scripts/script.php?script_id=1238

14: mswin.vim 提供windows的复制、剪切方式。

例如:

ctrl+c 可以复制vim中的内容到内存中,与yy复制不同的时,这中方式复制的内容,可以粘贴到其他应用程序中,其他具体的就看插件内容吧

注意: mswin.vim在ubuntu中自带的(/usr/share/vim/vim73/mswin.vim),可以把它直接复制到~/.vim/plugin/中。

15: genutils.vim 一些插件依赖的库函数

16: filetype plugin indent on 在vimrc文件中加入这句话,这个不是插件,但是对文件内容格式化效果还是不错


gvim或vim中使用monaco字体: http://mobilecastleb.blogspot.com/2011/03/vim-monaco.html
复制字体到/usr/share/fonts/truetype/unfonts/目录下

17: Tabular.vim 允许你在 Vim 中按等号、冒号、表格等来对齐文本,对于经常写代码的朋友来说,有 Tabular 将会非常方便。将光标定位到有等号那行,执行 :Tab /= 即可,eg:http://linuxtoy.org/archives/tabular.html


18: session.vim 对mksession命令的扩展,如果我们希望打开vim可以像打开firefox浏览器一样可以恢复上一次打开的页面,那么我们需要这个,地址: http://www.vim.org/scripts/script.php?script_id=3150

vim的mksession 和source命令可以代替这个插件

19: ctrlp 添加类似sublime中的ctrl+p 功能
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
vim的数据库连接插件,便于数据库SQL调试,支持几乎所有的常见数据库, For instructions on installing this file, type :help add-local-help |add-local-help| inside Vim. Homepage: http://vim.sourceforge.net/script.php?script_id=356 SourceForge: $Revision: 1.23 $ *dbext* *dbext.vim* *db_ext* *db_ext.vim* *database-extension* *pgsql* *mysql* *asa* *ase* *ingres* *interbase* *sqlite* *sqlsrv* *ora* *db2* 1. Overview |dbext-overview| 2. Installation |dbext-install| 3. Configuration |dbext-configure| 3.1 Displaying Results |dbext-configure-results| 3.2 Script Variables |dbext-configure-variables| 3.3 Database Specific Options |dbext-configure-options| 3.4 DB2 Modes |dbext-configure-db2| 4. Mappings and commands |dbext-mappings| 5. Adding new database types |dbext-newdb| 6. Prompting for input parameters |dbext-prompting| 7. Setting up connection information |dbext-connect| 7.1 Connection Parameters |dbext-connect-parameters| 7.2 Prompting for Parameters |dbext-connect-prompting| 7.3 Connection profiles |dbext-connect-profiles| 7.4 Connection information in modelines |dbext-connect-modelines| 7.5 Asking for connection parameters |dbext-connect-ask| 8. Creating mappings using dbext commands |dbext-in-mappings| 9. Object Completion |dbext-completion| 10. Listing Objects in the Database |dbext-list-objects| 11. Plugin integration |dbext-integration| 11.1 OMNI completion integration |dbext-omni-completion| 11.2 Intellisense integration |dbext-intellisense| 12. Filetype support |dbext-filetypes| 12.1 Using filetype support |dbext-filetypes-using| 12.2 Adding new filetypes |dbext-filetypes-adding| 13. Using SQL History |dbext-history| 14. Open Source |dbext-sourceforge| 15. Tutorial |dbext-tutorial| {Vi does not have any of this} ------------------------------------------------------------------------------ What's New *dbext-new* Version 4.20 New Features ------------ - Improved support for Cygwin. If you are using a Cygwin compiled Vim (on Windows) and are accessing Windows compiled binaries (i.e. sqlplus.exe) the binary will complain since it does not understand Unix path names. Added the option g:dbext_default_use_win32_filenames which allows you to indicate the binaries must use translated Windows paths instead. (Richard) - DBGetOption displays more information. Bug Fixes ------------ - SQL Server support had issues with the queries when running DBCompleteTable, DBCompleteProcedure, DBCompleteView which also affected the sqlcomplete.vim plugin included with Vim7 (Albie Janse van Rensburg). Version 4.10 New Features ------------ - Updated DBGetOption to additionally display a list of all database profiles and their types. All dbext options that have been overriden via the vimrc are also displayed. Bug Fixes ------------ - db2 support had issues with the queries when running DBCompleteTable, DBCompleteProcedure, DBCompleteView which also affected the sqlcomplete.vim plugin included with Vim7 (Peter Princz). - The documentation was still indicating there was a plugin dependency which has been removed with Vim7. Version 4.00 New Features ------------ - dbext.vim now requires Vim7. - dbext.vim required 2 additional plugins multvals and genutil to operate. These dependencies have been removed by taking advantage of the new Vim7 features (Lists and Dictionaries). - When using the DBCompleteTable, DBCompleteProcedure, DBCompleteView commands errors are displayed instead of silently ignored. This makes them more useful with the sqlComplete plugin (see |sql.txt|). - Added new option, dbext_default_MYSQL_version, for MySQL to indicate the version you using. - You can optionally define a function, DBextPostResult, in your .vimrc, this function will be called each time the result window is updated. This function can be used to do anything, for example, syntax highlighting the result set in the result window.

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值