[vim]vim 插件汇总

From: http://blog.sina.com.cn/s/blog_498a6eeb0100v06k.html

1. NERD_commenter.vim
万能的注释插件。 可以根据增加或修改,非常方便。
2.
ctags 和cscope
用来看代码的一个工具,和cscope配合使用更好。
3.
TagList 插件
高效地浏览源码, 出了当前文件中的所有宏,全局变量, 函数名等.
4.WinManager 插件
管理各个窗口, 或者说整合各个窗口. 可以在窗口中直接打开不同类型的文件。
5.suptab.vim
自动补齐非常方便。
6. bufexplorer.vim
记录打开文件
7. mru.vim
在菜单中显示打开文件的历史, 个数可以自己定义。
8. vimpdb
可以集成调试python
9. project.vim
项目管理
10. yankring.vim
这个插件可以同时粘贴多个需要的单词等, 很方便。
11. surronding.vim
可以对引号,双引号等符号进行变换
12. matchit.vim
扩展了%的功能。
13. sql格式化
sqlutil_140.zip:http://vim.sourceforge.net/scripts/download_script.php?src_id=4021
Align.vba.gz 

http://www.vim.org/scripts/script.php?script_id=294
_vimrc:
"sql格式化
let g:sqlutil_load_default_maps = 1
let g:sqlutil_align_comma = 1
let g:sqlutil_align_where = 0
let g:sqlutil_align_first_word = 1
let g:sqlutil_keyword_case = '\U
基本满意了。
14. dbext.vim
这个插件可以在Vim中执行sql语句。
"dbext.vim
letg:dbext_default_profile_jb91public='type=ORA:user=aaa@jboracle91wai:passwd=aaa'
let g:dbext_default_display_cmd_line = 1
另外原来的有个BUG

今天使用dbext中的\slc来复制列名的时候,发现每列名字出现两次。终于找到原因了。

在_vimrc中设置:

let g:dbext_default_display_cmd_line =1

这样执行命令的时候,就知道dbext是怎样调用的了。

//

Connection:T(ORA)  S(ORA10) U(llpaytest)   at15:46
Last command:
sqlplus -S llpaytest/llpaytest@ORA10@C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/dbext.sql
Last SQL:
set pagesize 50000
set wrap off
set sqlprompt ""
set linesize 10000
set flush off
set colsep "  "
set tab off
selectcolumn_name      from ALL_TAB_COLUMNS  where table_name ='PUB_AGT_INFO'  order by column_id
;
quit

//

 

selectcolumn_name      from ALL_TAB_COLUMNS  where table_name ='PUB_AGT_INFO'  order by column_id
这句话,放到sqlplus中执行, 发行是这里出现了两行。

 

解决方法:

修改autoload/dbext.vim这个文件。

找到

function!s:DB_ORA_getListColumn(table_name) "{{{
   letowner     = toupper(s:DB_getObjectOwner(a:table_name))
   let table_name =toupper(s:DB_getObjectName(a:table_name))

   .....
       let result = s:DB_ORA_execSql( query )
   return s:DB_ORA_stripHeaderFooter(result)
endfunction "}}}

修改成如下:

function! s:DB_ORA_getListColumn(table_name) "{{{
 

   letowner     = toupper(s:DB_getObjectOwner(a:table_name))
   let table_name = toupper(s:DB_getObjectName(a:table_name))
   let query = "select column_name from ( ".
               \ "select distinct column_name,column_id  ".
               \ "  from ALL_TAB_COLUMNS ".
               \ " where table_name = '".table_name."' "
   if !empty(owner)
       let query .= "  and owner = '".owner."' "
   endif
   let query .= " )order by column_id"
   let result = s:DB_ORA_execSql( query )
   return s:DB_ORA_stripHeaderFooter(result)
endfunction "}}}

15. minibuffer

 打开多个文件时,打开的文件显示在上方。

  let g:miniBufExplMapWindowNavV im = 1
  let g:miniBufExplMapWindowNavA rrows = 1
  let g:miniBufExplMapCTabSwitch Bufs = 1
  let g:miniBufExplModSelTarget = 1
16.new-omni-completion(vim内置)
可以自动提示实例代码
:set tags=PATH/tags
17. vimpdb.vim
可以调试python
  * Highlighting ofcurrently debugged line and breakpoint lines.
        *F5 - Run/continue running.
        *F2 - Toggle breakpoint at current line
        *Ctrl-F2 / Shift-F2 - Toggle conditional/temporary breakpoint.
        *F7 / F8 - Step into/over
        *F12 - Print stack trace
        *F3 / Ctrl-F3 - Eval/Exec a given statement (in the currentdebugging context)
        *Save/load breakpoints into session files.
      * Ctr-pWatch the variable under Cursor/Visual selection
          watch the output/variables in bottom window.
        *Cross-platform
        *And many more... See readme.txt for details
18. php内置函数参数提示,可以自己添加很有用,中国人写的,呵呵
http://www.vim.org/scripts/script.php?script_id=2805
19. php_doc.vim
使用大写的K, 就可以到php官网上打开光标下的函数介绍
我修改了一下,可以指定浏览器。用chrome很快。
def check_php_doc():
      function =vim.eval_r('expand("<cword>")')
      url ="http://php.net/" + function
      "webbrowser.open(url)
      webbrowser.get('chrome%s').open(url)
      returnNone


  • 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、付费专栏及课程。

余额充值