{"id":1488,"date":"2012-05-26T23:47:57","date_gmt":"2012-05-26T15:47:57","guid":{"rendered":"http:\/\/doophp.sinaapp.com\/?p=1488"},"modified":"2012-05-27T15:46:47","modified_gmt":"2012-05-27T07:46:47","slug":"vim-plugin-nerdtree-taglist","status":"publish","type":"post","link":"https:\/\/blog.vimge.com\/archives\/vim\/vim-plugin-nerdtree-taglist.html","title":{"rendered":"Vim\u653b\u7565\u4e4bNERD Tree\u3001TagList\u7bc7"},"content":{"rendered":"
\u4e60\u60ef\u4e86ZendStudio\u8fd9\u7c7bIDE\u5de5\u4f5c\u533a\u5de6\u4fa7\u6587\u4ef6\u6d4f\u89c8\u5668\u3001\u4e2d\u95f4\u7f16\u8f91\u533a\u3001\u53f3\u4fa7\u6587\u4ef6\u7ed3\u6784\u5217\u8868\u5e03\u5c40\u7684\u7ae5\u978b\u4e00\u5b9a\u5bf9VIM\u539f\u751f\u7cfb\u7edf\u7b80\u5355\u7684\u6587\u4ef6\u7ba1\u7406\u529f\u80fd\u5f88\u4e0d\u4e60\u60ef\uff0c\u4e0d\u8fc7\u795e\u5947\u7684VIM\u4e5f\u6709\u7c7b\u4f3c\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u901a\u8fc7NERD Tree\u548cTagList\u8fd9\u4e24\u4e2a\u63d2\u4ef6\u548cVIM\u5f3a\u5927\u7684\u914d\u7f6e\u529f\u80fd\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u8ba9\u795e\u5668\u62e5\u6709\u8fd9\u4e9b\u529f\u80fd.<\/p>\n
TagsList\u9700\u8981\u4f9d\u8d56Ctags\u751f\u6210\u7684tags\u7d22\u5f15\uff0c\u6b64\u5916\uff0c\u6211\u4eec\u53ef\u4ee5\u501f\u52a9Ctags\u5b9e\u73b0\u51fd\u6570\u3001\u53d8\u91cf\u5f15\u7528\u67e5\u770b\u5b9a\u4e49\uff0c\u5c06\u9f20\u6807\u79fb\u52a8\u5230\u8981\u67e5\u770b\u7684\u53d8\u91cf\u6216\u8005\u65b9\u6cd5\u4e0a\uff0c\u6309Ctrl+\u3011\u5c06\u4f1a\u8df3\u8f6c\u5230\u5b9a\u4e49\u5904\uff0cCtrl+t\u3001Ctrl+o\u8fd4\u56de<\/p>\n
\u8d34\u5f20\u672c\u4eba\u914d\u7f6e\u540e\u7684\u6548\u679c<\/p>\n
<\/a><\/p>\n PS\uff1a<F3>\u6620\u5c04\u6253\u5f00\/\u5173\u95ed NERDTree\u3001<F4>\u6620\u5c04\u6253\u5f00\/\u5173\u95edTagList<\/p>\n NERD Tree<\/strong><\/p>\n NERD Tree \u63d0\u4f9b\u6811\u72b6\u65b9\u5f0f\u6d4f\u89c8\u6587\u4ef6\u548c\u76ee\u5f55\uff0c\u652f\u6301\u5feb\u6377\u952e\u4e0e\u9f20\u6807\u64cd\u4f5c\uff0c\u5305\u542b\u4e66\u7b7e\u3001\u8fc7\u6ee4\u7b49\u5b9e\u7528\u529f\u80fd\uff0c\u5b83\u4ee5\u4e0d\u540c\u989c\u8272\u663e\u793a\u8282\u70b9\u7c7b\u578b\uff0c\u4e30\u5bcc\u7684\u5feb\u6377\u952e\u548c\u547d\u4ee4\u7528\u6237\u4f53\u9a8c\u975e\u5e38\u4e0d\u9519.<\/p>\n \u6700\u65b0\u7248\u662f 4.2.0\u9002\u7528vim7.0\u4ee5\u4e0a\u7248\u672c\uff0c\u5b98\u65b9\u5730\u5740<\/a><\/p>\n \u914d\u7f6e\u89c4\u5219<\/p>\n “NERDTree\u63d2\u4ef6\u529f\u80fd\u914d\u7f6e<\/p>\n map <f3> :NERDTreeToggle work<CR> “F2\u5feb\u6377\u952e\u6253\u5f00\u5173\u95edNERDTree\u529f\u80fd<\/p>\n “NERDTree Settings{<\/p>\n let NERDTreeWinPos =”left” “\u5c06NERDTree\u7684\u7a97\u53e3\u8bbe\u7f6e\u5728gvim\u7a97\u53e3\u7684\u5de6\u8fb9<\/p>\n let NERDTreeShowBookmarks=1 “\u5f53\u6253\u5f00NERDTree\u7a97\u53e3\u65f6\uff0c\u81ea\u52a8\u663e\u793aBookmarks<\/p>\n let NERDTreeBookmarksFile=$vim.”\\\\.NERDTreeBookmarks” “\u8bbe\u7f6e\u4e66\u7b7e\u6587\u4ef6\u4e3aVIM\u6839\u76ee\u5f55<\/p>\n “}<\/p><\/blockquote>\n TagList<\/strong><\/p>\n TagList \u662fVim\u7684\u6e90\u4ee3\u7801\u6d4f\u89c8\u63d2\u4ef6\uff0c\u63d0\u4f9b\u4e86\u5728Vim\u4e2d\u67e5\u770b\u6587\u4ef6\u4e2d\u5305\u542b\u7684\u51fd\u6570\u3001\u7c7b\u3001\u53d8\u91cf\u7684\u529f\u80fd.TagList\u529f\u80fd\u5b9e\u73b0\u8981\u4f9d\u8d56\u4e8eCtags\u751f\u6210\u7684\u4ee3\u7801\u7d22\u5f15\u6587\u4ef6.<\/p>\n \u5b89\u88c5TagList\u4e4b\u524d\u9700\u8981\u5b89\u88c5Ctags\u652f\u6301\uff0c\u63a8\u8350\u4f7f\u7528Exuberant<\/a>\uff0c\u5b98\u65b9\u63d0\u4f9bWin\u7f16\u8bd1\u7248\uff08Win7\/64x\u652f\u6301\uff09,\u5efa\u8bae\u5b89\u88c5\u65f6\u590d\u5236ctags.exe\u6587\u4ef6\u5230\u7cfb\u7edf\u73af\u5883\u6216\u6307\u5b9a\u5b89\u88c5\u8def\u5f84\u5230\u7cfb\u7edf$PATH\uff0c\u7b14\u8bb0\u53d1\u73b0\u6574\u5408TagList\u548cCtags\u65f6Win\u73af\u5883\u8def\u5f84\u652f\u6301\u4e0d\u662f\u5f88\u597d.<\/p>\n \u4ee3\u7801\u7d22\u5f15\u751f\u6210\uff08\u7528\u4e8eTagList\uff09<\/p>\n \u8fdb\u5165\u9879\u76ee\u6839\u76ee\u5f55\u6267\u884c “ctags -R .”\uff0c\u5c06\u5bf9\u5f53\u524d\u6839\u76ee\u5f55\u8fdb\u884c\u9012\u5f52\u751f\u6210\u7d22\u5f15.<\/p>\n \u914d\u7f6eTagList<\/p>\n set tags=tags; \u201c\u7ed3\u5c3e\u5206\u53f7\u4e0d\u80fd\u5c11\uff0c\u6307\u5b9a\u5148\u4ece\u5f53\u524d\u76ee\u5f55\u67e5\u627etags\u6587\u4ef6\uff0c\u518d\u5411\u4e0a\u9012\u5f52<\/p>\n set autochdir \u201c\u81ea\u52a8\u8bbe\u7f6e\u5de5\u4f5c\u76ee\u5f55\u4e3a\u5f53\u524d\u76ee\u5f55\uff08tags\u6587\u4ef6\u76ee\u5f55\u76f8\u5bf9\u4e8etags\u6587\u4ef6\uff09<\/p>\n filetype plugin on<\/p>\n let Tlist_Ctags_Cmd = “ctags\\.exe” “ctags.exe\u6587\u4ef6\u8def\u5f84,\u5f53\u524dctags.exe\u8def\u5f84\u6307\u5b9a\u4e3a\u7cfb\u7edf\u73af\u5883\u53d8\u91cf$PATH<\/p>\n let Tlist_Show_One_File = 1 “\u4e0d\u540c\u65f6\u663e\u793a\u591a\u4e2a\u6587\u4ef6\u7684Tag\uff0c\u53ea\u663e\u793a\u5f53\u524d\u6587\u4ef6<\/p>\n let Tlist_Exit_OnlyWindow = 1 “\u5982\u679cTaglist\u7a97\u53e3\u662f\u6700\u540e\u4e00\u4e2a\u7a97\u53e3\u65f6\u9000\u51faVIM<\/p>\n let Tlist_Use_Right_Window = 1 “\u8ba9Taglist\u7a97\u53e3\u5728\u53f3\u4fa7\u663e\u793a<\/p>\n let Tlist_GainFocus_On_ToggleOpen = 1 “\u8bbe\u7f6e\u5f53\u6267\u884cTlistToggle\u65f6\uff0c\u5b9a\u4f4d\u5f53\u524d\u5149\u6807\u5230Tlist\u7a97\u53e3<\/p><\/blockquote>\n \u53c2\u8003\u8d44\u6599\uff1a<\/strong><\/p>\n 1.http:\/\/vim-taglist.sourceforge.net\/manual.html<\/a><\/p>\n