{"id":1140,"date":"2011-11-24T15:45:00","date_gmt":"2011-11-24T07:45:00","guid":{"rendered":"\/?p=1140"},"modified":"2012-01-11T22:55:03","modified_gmt":"2012-01-11T14:55:03","slug":"1140","status":"publish","type":"post","link":"https:\/\/blog.vimge.com\/archives\/vim\/1140.html","title":{"rendered":"\u7528Gvim\u5efa\u7acbIDE\u7f16\u7a0b\u73af\u5883 \uff08Windows\u7bc7\uff09"},"content":{"rendered":"
\u51c6\u5907\u8f6f\u4ef6\u53ca\u63d2\u4ef6\u3002<\/span><\/strong><\/p>\n (a)<\/span>gvim72.exe<\/span> \u5730\u5740<\/span>ftp:\/\/ftp.vim.org\/pub\/vim\/pc\/gvim72.exe<\/span><\/a>\u3002<\/span> 1.\u5b89\u88c5gvim7.2\u3002<\/span><\/strong> 2.\u5b89\u88c5\u4e2d\u6587\u5e2e\u52a9\u624b\u518c\u3002<\/span><\/strong> 3.\u8bed\u6cd5\u9ad8\u4eae\u3002<\/span> 4.\u7a0b\u5e8f\u4e2d\u8df3\u8f6c\u3002<\/span> \u6309\u4e0b"ctrl+T"\u4f1a\u8df3\u56de\u5230\u539f\u6765\u7684\u4f4d\u7f6e\u3002<\/span> 5.\u7a97\u53e3\u7ba1\u7406\u3002<\/span><\/strong> \u5176\u4e2d\u5de6\u4e0a\u662fnetrw\u7a97\u53e3\uff08\u6d4f\u89c8\u6587\u4ef6\uff09\uff0c\u5de6\u4e0b\u662fTagList\u7a97\u53e3\uff0c\u518d\u6b21\u8f93\u5165"<\/span>wm<\/span>"\u65f6\u8fd9\u4e24\u4e2a\u7a97\u53e3\u4f1a\u5173\u95ed\u3002<\/span><\/p>\n 6.\u591a\u6587\u4ef6\u7f16\u8f91\u3002<\/span><\/strong> ctrl+Tab\uff0c\u5207\u6362\u5230\u524d\u4e00\u4e2abuffer\uff0c\u5e76\u5728\u5f53\u524d\u7a97\u53e3\u6253\u5f00\u6587\u4ef6\uff1b<\/span> 7.\u5feb\u901f\u5207\u6362\u5934\u6587\u4ef6\/\u6e90\u6587\u4ef6\u3002<\/span><\/strong> 8.\u5728\u5de5\u7a0b\u4e2d\u5feb\u901f\u67e5\u627e\u3002<\/span><\/strong> \u786e\u5b9a\u67e5\u627e\u5185\u5bb9\u65f6\uff0c\u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\u3002<\/span><\/p>\n 9.\u9ad8\u4eae\u7684\u4e66\u7b7e\u3002<\/span><\/strong> <\/p>\n \u4f7f\u7528F2\u5728\u4e66\u7b7e\u4e4b\u95f4\u6b63\u5411\u5207\u6362\uff0cshift+F2\u53cd\u5411\u5207\u6362\u3002<\/span><\/p>\n \u8bf4\u660e\uff1a\u672c\u6587\u662f\u4f5c\u8005\u5728\u5b8c\u5168\u6309\u7167\u8457\u540d\u7684\u300a\u624b\u628a\u624b\u6559\u4f60\u628aVim\u6539\u88c5\u6210\u4e00\u4e2aIDE\u7f16\u7a0b\u73af\u5883\u300b\u4e00\u6587\uff0c\u5728Windows XP\u4e0a\u7528gvim\u5efa\u7acbIDE\u73af\u5883\u65f6\u6240\u4f5c\u7684\u5907\u5fd8\u3002<\/span>
(b)<\/span>vimcdoc-1.7.0-setup.exe<\/span> \u5730\u5740<\/span>http:\/\/prdownloads.sourceforge.net\/vimcdoc\/vimcdoc-1.7.0-setup.exe?download<\/span><\/a>
(c)<\/span>ec57w32.zip<\/span> \u5730\u5740<\/span>http:\/\/prdownloads.sourceforge.net\/ctags\/ec57w32.zip<\/span><\/a>
(d)<\/span>taglist_45.zip<\/span> \u5730\u5740<\/span>http:\/\/www.vim.org\/scripts\/download_script.php?src_id=7701<\/span><\/a>
(e)<\/span>winmanager.zip<\/span> \u5730\u5740<\/span>http:\/\/www.vim.org\/scripts\/download_script.php?src_id=754<\/span><\/a>
(f)<\/span>minibufexpl.vim<\/span> \u5730\u5740<\/span>http:\/\/www.vim.org\/scripts\/download_script.php?src_id=3640<\/span><\/a>
(g)<\/span>a.vim<\/span> \u5730\u5740<\/span>http:\/\/www.vim.org\/scripts\/download_script.php?src_id=7218<\/span><\/a>
(h)<\/span>grep.vim<\/span> \u5730\u5740<\/span>http:\/\/www.vim.org\/scripts\/download_script.php?src_id=7645<\/span><\/a>
(i)<\/span>visualmark.vim<\/span> \u5730\u5740<\/span>http:\/\/www.vim.org\/scripts\/download_script.php?src_id=4700<\/span><\/a><\/p>\n
\u8fd0\u884c<\/span>gvim72.exe<\/span>\uff0c\u9009\u62e9\u5b8c\u5168\u5b89\u88c5(Full)\uff0c\u6211\u7684\u5b89\u88c5\u76ee\u5f55\u662f\u9ed8\u8ba4\u7684<\/span>C:\\Program Files\\Vim<\/span>\u3002<\/span>
\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5305\u62ec\u4e86\u6587\u4ef6\u5939vim72\u548c\u6587\u4ef6\u5939vimfiles\uff0c\u4ee5\u53ca\u811a\u672c_vimrc\u3002<\/span><\/p>\n
\u8fd0\u884c<\/span>vimcdoc-1.7.0-setup.exe<\/span>\uff0c\u5b83\u4f1a\u81ea\u52a8\u627e\u5230gvim\u7684\u5b89\u88c5\u4f4d\u7f6e\u3002<\/span>
\u5b89\u88c5\u5b8c\u6bd5\u540e\u91cd\u65b0\u6253\u5f00gvim\uff0c<\/span>:help<\/span> \u65f6\u5e2e\u52a9\u624b\u518c\u5df2\u7ecf\u662f\u4e2d\u6587\u7684\u4e86\u3002<\/span>
\u8fdb\u884c\u5230\u8fd9\u4e00\u6b65\u65f6\uff0c\u6211\u7684gvim\u83dc\u5355\u5904\u7684\u4e2d\u6587\u51fa\u73b0\u4e86\u4e71\u7801\u3002<\/span>
\u5728\u7f51\u4e0a\u5bfb\u627e\u89e3\u51b3\u65b9\u6848\uff0c\u5c06<\/span>C:\\Program Files\\Vim\\vim72<\/span>\u4e0b\u540d\u4e3a <\/span>lang<\/span> \u7684\u6587\u4ef6\u5939\u5220\u53bb\uff0c\u4f7f\u83dc\u5355\u8bed\u8a00\u53d8\u4e3a\u82f1\u8bed\u3002<\/span><\/p>\n
<\/strong>\u9996\u5148\uff0c\u7f16\u8f91_vimrc\u6587\u4ef6\u52a0\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/span>
set nu!<\/span>
colorscheme desert<\/span>
syntax enable<\/span>
syntax on<\/span>
\u8fd9\u4e9b\u8bbe\u7f6e\u4f7f\u5f97gvim\u53ef\u4ee5\u663e\u793a\u884c\u53f7\uff0c\u5e76\u4f7f\u7528\u4e86desert\u914d\u8272\u65b9\u6848\uff0c\u800c\u4e14\u6253\u5f00\u4e86\u8bed\u6cd5\u9ad8\u4eae\u529f\u80fd\uff08\u7528\u4e0d\u540c\u989c\u8272\u663e\u793a\u6ce8\u91ca\u3001\u5173\u952e\u5b57\u3001\u5b57\u7b26\u4e32\u7b49\uff09\u3002<\/span>
\u6211\u4eec\u8fd8\u53ef\u4ee5\u8ba9\u51fd\u6570\u540d\u4e5f\u9ad8\u4eae\u8d77\u6765\uff0c\u5728<\/span>C:\\Program Files\\Vim\\vim72\\syntax<\/span>\u4e0b\u627e\u5230 <\/span>c.vim<\/span> \u548c <\/span>cpp.vim<\/span>\uff0c\u5206\u522b\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/span>
syn match cFunction "\\<[a-zA-Z_][a-zA-Z_0-9]*\\>[^()]*)("me=e-2<\/span>
syn match cFunction "\\<[a-zA-Z_][a-zA-Z_0-9]*\\>\\s*("me=e-1<\/span>
hi cFunction gui=NONE guifg=#B5A1FF<\/span>
\u91cd\u65b0\u6253\u5f00gvim\uff0c\u6548\u679c\u5982\u4e0b\uff1a<\/span><\/p>\n
<\/strong>\u5c06<\/span>ec57w32.zip<\/span>\u89e3\u538b\uff0c\u5728\u89e3\u538b\u540e\u6587\u4ef6\u5939\u4e2d\u627e\u5230<\/span>ctags.exe<\/span>\uff0c\u5c06\u5176\u590d\u5236\u5230<\/span>C:\\ProgramFiles\\Vim\\vim72<\/span>\u4e0b\uff0c\u5e76\u7f16\u8f91_vimrc\u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/span>
set tags=tags;<\/span>
set autochdir<\/span>
\u6253\u5f00cmd\u547d\u4ee4\u884c\uff0c\u5207\u6362\u5230\u4f60\u8981\u67e5\u770b\u7684\u6e90\u4ee3\u7801\u7684\u6839\u76ee\u5f55\u5904\uff0c\u8fd0\u884c<\/span>
ctags -R<\/span>
\u5c06\u4f1a\u5728\u6b64\u76ee\u5f55\u5904\u751f\u6210\u4e00\u4e2atags\u6587\u4ef6\u3002<\/span>
\u7528gvim\u6253\u5f00\u4e00\u4e2a\u4ee3\u7801\u6587\u4ef6\uff0c\u5c06\u5149\u6807\u653e\u5230\u67d0\u4e00\u51fd\u6570\u540d\u4e0a\uff0c\u5982\u4e0b\u56fe\u7684UpdateViewByPosNo()\uff0c\u6309\u4e0b"ctrl+]"\uff0c\u5149\u6807\u4f1a\u81ea\u52a8\u8df3\u8f6c\u5230\u5b9a\u4e49\u5904\u3002<\/span><\/p>\n
\u53d8\u91cf\u3001\u7ed3\u6784\u4f53\u3001\u5b8f\u7b49\u7b49\uff0c\u90fd\u53ef\u4ee5\u8fd9\u6837\u505a\u3002<\/span>
\u5f53\u4f60\u7684\u6e90\u6587\u4ef6\u6709\u66f4\u65b0\u65f6\uff0c\u53ea\u80fd\u91cd\u65b0\u8fd0\u884c<\/span>ctags -R<\/span>\u547d\u4ee4\uff0c\u6765\u66f4\u65b0tags\u6587\u4ef6\u3002<\/span><\/p>\n
\u5c06<\/span>taglist_45.zip<\/span>\u89e3\u538b\uff0c\u89e3\u538b\u540e\u5305\u542b\u4e00\u4e2adoc\u6587\u4ef6\u5939\u548c\u4e00\u4e2aplugin\u6587\u4ef6\u5939\uff0c\u5c06\u5176\u4e2d\u5185\u5bb9\u5206\u522b\u590d\u5236\u5230<\/span>C:\\Program Files\\Vim\\vim72<\/span>\u4e0b\u7684doc\u53caplugin\u4e2d\u3002<\/span>
\u5728_vimrc\u6587\u4ef6\u4e2d\u52a0\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/span>
let Tlist_Show_One_File=1<\/span>
let Tlist_Exit_OnlyWindow=1<\/span>
\u7528gvim\u6253\u5f00\u4ee3\u7801\u6587\u4ef6\uff08\u5df2\u751f\u6210\u8fc7tags\u6587\u4ef6\uff09\uff0c<\/span>:Tlist<\/span>\uff0cTagList\u7a97\u53e3\u5373\u51fa\u73b0\u5728\u5de6\u4fa7\u3002<\/span>
\u7528\u76f8\u540c\u7684\u65b9\u6cd5\u5c06<\/span>winmanager.zip<\/span>\u89e3\u538b\u548c\u62f7\u8d1d\uff0c\u5728_vimrc\u6587\u4ef6\u4e2d\u52a0\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/span>
let g:winManagerWindowLayout=’FileExplorer|TagList’<\/span>
nmap wm :WMToggle<cr><\/span>
\u7528gvim\u6253\u5f00\u4ee3\u7801\u6587\u4ef6\uff0cnormal\u72b6\u6001\u4e0b\u8f93\u5165\u547d\u4ee4"<\/span>wm<\/span>"\uff0c\u7a97\u53e3\u5982\u4e0b<\/span><\/p>\n
\u5c06<\/span>minibufexpl.vim<\/span>\u590d\u5236\u5230<\/span>C:\\Program Files\\Vim\\vim72\\plugin<\/span>\uff0c\u5728_vimrc\u4e2d\u6dfb\u52a0\uff1a<\/span>
let g:miniBufExplMapCTabSwitchBufs=1<\/span>
let g:miniBufExplMapWindowsNavVim=1<\/span>
let g:miniBufExplMapWindowNavArrows=1<\/span>
\u5f53\u7528gvim\u6253\u5f00\u4e24\u4e2a\u6216\u4e24\u4e2a\u4ee5\u4e0a\u7684\u6587\u4ef6\u65f6\uff0c\u4f1a\u81ea\u52a8\u5f39\u51faMiniBufExplorer\u7a97\u53e3\uff0c\u5982\u4e0b\u56fe<\/span><\/p>\n
ctrl+shift+Tab\uff0c\u5207\u6362\u5230\u540e\u4e00\u4e2abuffer\uff0c\u5e76\u5728\u5f53\u524d\u7a97\u53e3\u6253\u5f00\u6587\u4ef6\uff1b<\/span>
ctrl+\u7bad\u5934\u952e\uff0c\u53ef\u4ee5\u5207\u6362\u5230\u4e0a\u4e0b\u5de6\u53f3\u7a97\u53e3\u4e2d\uff1b<\/span>
ctrl+h,j,k,l\uff0c\u5207\u6362\u5230\u4e0a\u4e0b\u5de6\u53f3\u7684\u7a97\u53e3\u4e2d\u3002<\/span><\/p>\n
\u5c06<\/span>a.vim<\/span>\u590d\u5236\u5230<\/span>C:\\Program Files\\Vim\\vim72\\plugin<\/span>\uff0c\u5728_vimrc\u4e2d\u6dfb\u52a0\uff1a<\/span>
nnoremap <silent> <F12> :A<CR><\/span>
\u7528gvim\u6253\u5f00\u6e90\u7801\u6587\u4ef6\u540e\uff0c\u6309F12\u5373\u53ef\u4ee5\u5728c\/h\u6587\u4ef6\u4e2d\u5207\u6362\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8f93\u5165:A\u5b9e\u73b0\u3002<\/span><\/p>\n
\u5c06<\/span>grep.vim<\/span>\u590d\u5236\u5230<\/span>C:\\Program Files\\Vim\\vim72\\plugin<\/span>\uff0c\u5728_vimrc\u4e2d\u6dfb\u52a0\uff1a<\/span>
nnoremap <silent> <F3> :Grep<CR><\/span>
\u7528gvim\u6253\u5f00\u6e90\u7801\u6587\u4ef6\uff0c\u5e76\u5c06\u5149\u6807\u5b9a\u4f4d\u5230\u8981\u67e5\u627e\u7684\u5185\u5bb9\u4e0a\uff0c\u6309\u4e0bF3\uff0c\u786e\u5b9a\u8981\u67e5\u627e\u7684\u5185\u5bb9\u548c\u641c\u7d22\u8303\u56f4\uff0cgvim\u4f1a\u5728\u5f39\u51fa\u7684QuickFix\u7a97\u53e3\u4e2d\u5217\u51fa\u6240\u6709\u7b26\u5408\u6761\u4ef6\u7684\u641c\u7d22\u7ed3\u679c\u3002\u5982\u4e0b\u56fe<\/span><\/p>\n
\u5c06<\/span>visualmark.vim<\/span>\u590d\u5236\u5230<\/span>C:\\Program Files\\Vim\\vim72\\plugin<\/span>\u3002<\/span>
\u7528gvim\u6253\u5f00\u6e90\u7801\u6587\u4ef6\uff0c\u5c06\u5149\u6807\u5b9a\u4f4d\u5728\u9700\u8981\u6dfb\u52a0\u4e66\u7b7e\u7684\u5730\u65b9\uff0c\u6309\u4e0bctrl+F2\uff0c\u5373\u6dfb\u52a0\u4e86\u4e66\u7b7e\u3002<\/span><\/p>\n
<\/span><\/p>\n
\u539f\u4f5c\u5730\u5740\uff1a<\/span>http:\/\/blog.csdn.net\/wooin\/archive\/2007\/10\/31\/1858917.aspx<\/span><\/a>\u3002<\/span><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"