{"id":96877,"date":"2024-05-29T15:20:11","date_gmt":"2024-05-29T07:20:11","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=96877"},"modified":"2024-05-29T15:20:11","modified_gmt":"2024-05-29T07:20:11","slug":"vim-plugins-vundle","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/vim-plugins-vundle.html","title":{"rendered":"\u4f7f\u7528 Vundle \u7ba1\u7406 Vim \u63d2\u4ef6"},"content":{"rendered":"
\u6bcb\u5eb8\u7f6e\u7591\uff0cVim \u662f\u4e00\u6b3e\u5f3a\u5927\u7684\u6587\u672c\u6587\u4ef6\u5904\u7406\u7684\u901a\u7528\u5de5\u5177\uff0c\u80fd\u591f\u7ba1\u7406\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6\u548c\u7f16\u5199\u4ee3\u7801\u3002\u901a\u8fc7\u63d2\u4ef6\uff0cVim \u53ef\u4ee5\u88ab\u62d3\u5c55\u51fa\u4e0d\u540c\u5c42\u6b21\u7684\u529f\u80fd\u3002\u901a\u5e38\uff0c\u6240\u6709\u7684\u63d2\u4ef6\u548c\u9644\u5c5e\u7684\u914d\u7f6e\u6587\u4ef6\u90fd\u4f1a\u5b58\u653e\u5728 ~\/.vim<\/span> \u76ee\u5f55\u4e2d\u3002\u7531\u4e8e\u6240\u6709\u7684\u63d2\u4ef6\u6587\u4ef6\u90fd\u88ab\u5b58\u50a8\u5728\u540c\u4e00\u4e2a\u76ee\u5f55\u4e0b\uff0c\u6240\u4ee5\u5f53\u4f60\u5b89\u88c5\u66f4\u591a\u63d2\u4ef6\u65f6\uff0c\u4e0d\u540c\u7684\u63d2\u4ef6\u6587\u4ef6\u4e4b\u95f4\u76f8\u4e92\u6df7\u6dc6\u3002\u56e0\u800c\uff0c\u8ddf\u8e2a\u548c\u7ba1\u7406\u5b83\u4eec\u5c06\u662f\u4e00\u4e2a\u6050\u6016\u7684\u4efb\u52a1\u3002\u7136\u800c\uff0c\u8fd9\u6b63\u662f Vundle \u6240\u80fd\u5904\u7406\u7684\u3002Vundle\uff0c\u5206\u522b\u662f V<\/strong>im \u548c Bundle<\/strong> \u7684\u7f29\u5199\uff0c\u5b83\u662f\u4e00\u6b3e\u80fd\u591f\u7ba1\u7406 Vim \u63d2\u4ef6\u7684\u6781\u5176\u5b9e\u7528\u7684\u5de5\u5177\u3002<\/p>\n <\/p>\n Vundle \u4e3a\u6bcf\u4e00\u4e2a\u4f60\u5b89\u88c5\u7684\u63d2\u4ef6\u521b\u5efa\u4e00\u4e2a\u72ec\u7acb\u7684\u76ee\u5f55\u6811\uff0c\u5e76\u5728\u76f8\u5e94\u7684\u63d2\u4ef6\u76ee\u5f55\u4e2d\u5b58\u50a8\u9644\u52a0\u7684\u914d\u7f6e\u6587\u4ef6\u3002\u56e0\u6b64\uff0c\u76f8\u4e92\u4e4b\u95f4\u6ca1\u6709\u6df7\u6dc6\u7684\u6587\u4ef6\u3002\u7b80\u8a00\u4e4b\uff0cVundle \u5141\u8bb8\u4f60\u5b89\u88c5\u65b0\u7684\u63d2\u4ef6\u3001\u914d\u7f6e\u5df2\u6709\u7684\u63d2\u4ef6\u3001\u66f4\u65b0\u63d2\u4ef6\u914d\u7f6e\u3001\u641c\u7d22\u5b89\u88c5\u7684\u63d2\u4ef6\u548c\u6e05\u7406\u4e0d\u4f7f\u7528\u7684\u63d2\u4ef6\u3002\u6240\u6709\u7684\u64cd\u4f5c\u90fd\u53ef\u4ee5\u5728\u4e00\u952e\u4ea4\u4e92\u6a21\u5f0f\u4e0b\u5b8c\u6210\u3002\u5728\u8fd9\u4e2a\u7b80\u6613\u7684\u6559\u7a0b\u4e2d\uff0c\u8ba9\u6211\u544a\u8bc9\u4f60\u5982\u4f55\u5b89\u88c5 Vundle\uff0c\u5982\u4f55\u5728 GNU\/Linux \u4e2d\u4f7f\u7528\u5b83\u6765\u7ba1\u7406 Vim \u63d2\u4ef6\u3002<\/p>\n \u5982\u679c\u4f60\u9700\u8981 Vundle\uff0c\u90a3\u6211\u5c31\u5f53\u4f5c\u4f60\u7684\u7cfb\u7edf\u4e2d\uff0c\u5df2\u5c06\u5b89\u88c5\u597d\u4e86 Vim\u3002\u5982\u679c\u6ca1\u6709\uff0c\u8bf7\u5b89\u88c5 Vim \u548c git\uff08\u4ee5\u4e0b\u8f7d Vundle\uff09\u3002\u5728\u5927\u90e8\u5206 GNU\/Linux \u53d1\u884c\u7248\u4e2d\u7684\u5b98\u65b9\u4ed3\u5e93\u4e2d\u90fd\u53ef\u4ee5\u83b7\u53d6\u5230\u8fd9\u4e24\u4e2a\u5305\u3002\u6bd4\u5982\uff0c\u5728 Debian \u7cfb\u5217\u7cfb\u7edf\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u5b89\u88c5\u8fd9\u4e24\u4e2a\u5305\u3002<\/p>\n \u590d\u5236 Vundle \u7684 GitHub \u4ed3\u5e93\u5730\u5740:<\/p>\n \u521b\u5efa ~\/.vimrc<\/span> \u6587\u4ef6\uff0c\u4ee5\u901a\u77e5 Vim \u4f7f\u7528\u65b0\u7684\u63d2\u4ef6\u7ba1\u7406\u5668\u3002\u5b89\u88c5\u3001\u66f4\u65b0\u3001\u914d\u7f6e\u548c\u79fb\u9664\u63d2\u4ef6\u9700\u8981\u8fd9\u4e2a\u6587\u4ef6\u3002<\/p>\n \u5728\u6b64\u6587\u4ef6\u9876\u90e8\uff0c\u52a0\u5165\u5982\u4e0b\u82e5\u5e72\u884c\u5185\u5bb9\uff1a<\/p>\n \u88ab\u6807\u8bb0\u4e3a \u201crequired\u201d \u7684\u884c\u662f Vundle \u7684\u6240\u9700\u914d\u7f6e\u3002\u5176\u4f59\u884c\u4ec5\u662f\u4e00\u4e9b\u4f8b\u5b50\u3002\u5982\u679c\u4f60\u4e0d\u60f3\u5b89\u88c5\u90a3\u4e9b\u7279\u5b9a\u7684\u63d2\u4ef6\uff0c\u53ef\u4ee5\u79fb\u9664\u5b83\u4eec\u3002\u5b8c\u6210\u540e\uff0c\u952e\u5165 :wq<\/span> \u4fdd\u5b58\u9000\u51fa\u3002<\/p>\n \u6700\u540e\uff0c\u6253\u5f00 Vim\uff1a<\/p>\n \u7136\u540e\u952e\u5165\u4e0b\u5217\u547d\u4ee4\u5b89\u88c5\u63d2\u4ef6\uff1a<\/p>\n <\/p>\n \u5c06\u4f1a\u5f39\u51fa\u4e00\u4e2a\u65b0\u7684\u5206\u7a97\u53e3\uff0c\u6211\u4eec\u52a0\u5728 .vimrc<\/span> \u6587\u4ef6\u4e2d\u7684\u6240\u6709\u63d2\u4ef6\u90fd\u4f1a\u81ea\u52a8\u5b89\u88c5\u3002<\/p>\n <\/p>\n \u5b89\u88c5\u5b8c\u6bd5\u4e4b\u540e\uff0c\u952e\u5165\u4e0b\u5217\u547d\u4ee4\uff0c\u53ef\u4ee5\u5220\u9664\u9ad8\u901f\u7f13\u5b58\u533a\u7f13\u5b58\u5e76\u5173\u95ed\u7a97\u53e3\uff1a<\/p>\n \u4f60\u4e5f\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e0a\u4f7f\u7528\u4e0b\u9762\u547d\u4ee4\u5b89\u88c5\u63d2\u4ef6\uff0c\u800c\u4e0d\u7528\u6253\u5f00 Vim\uff1a<\/p>\n \u4f7f\u7528 fish shell<\/a>[1]<\/span> \u7684\u670b\u53cb\uff0c\u6dfb\u52a0\u4e0b\u9762\u8fd9\u884c\u5230\u4f60\u7684 .vimrc<\/span> \u6587\u4ef6\u4e2d\u3002<\/p>\n \u9996\u5148\uff0c\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u641c\u7d22\u53ef\u4ee5\u4f7f\u7528\u7684\u63d2\u4ef6\uff1a<\/p>\n \u8981\u4ece vimscripts \u7f51\u7ad9\u5237\u65b0\u672c\u5730\u7684\u5217\u8868\uff0c\u8bf7\u5728\u547d\u4ee4\u4e4b\u540e\u6dfb\u52a0 !<\/span>\u3002<\/p>\n \u4f1a\u5f39\u51fa\u4e00\u4e2a\u5217\u51fa\u53ef\u7528\u63d2\u4ef6\u5217\u8868\u7684\u65b0\u5206\u7a97\u53e3\uff1a<\/p>\n <\/p>\n \u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u6307\u5b9a\u63d2\u4ef6\u540d\u7684\u65b9\u5f0f\uff0c\u7f29\u5c0f\u641c\u7d22\u8303\u56f4\u3002<\/p>\n \u8fd9\u6837\u5c06\u4f1a\u5217\u51fa\u5305\u542b\u5173\u952e\u8bcd \u201cvim\u201d \u7684\u63d2\u4ef6\u3002<\/p>\n \u5f53\u7136\u4f60\u4e5f\u53ef\u4ee5\u6307\u5b9a\u786e\u5207\u7684\u63d2\u4ef6\u540d\uff0c\u6bd4\u5982\uff1a<\/p>\n \u79fb\u52a8\u7126\u70b9\u5230\u6b63\u786e\u7684\u4e00\u884c\u4e0a\uff0c\u6309\u4e0b i<\/span> \u952e\u6765\u5b89\u88c5\u63d2\u4ef6\u3002\u73b0\u5728\uff0c\u88ab\u9009\u62e9\u7684\u63d2\u4ef6\u5c06\u4f1a\u88ab\u5b89\u88c5\u3002<\/p>\n <\/p>\n \u7c7b\u4f3c\u7684\uff0c\u5728\u4f60\u7684\u7cfb\u7edf\u4e2d\u5b89\u88c5\u6240\u6709\u60f3\u8981\u7684\u63d2\u4ef6\u3002\u4e00\u65e6\u5b89\u88c5\u6210\u529f\uff0c\u4f7f\u7528\u4e0b\u5217\u547d\u4ee4\u5220\u9664 Vundle \u7f13\u5b58\uff1a<\/p>\n \u73b0\u5728\uff0c\u63d2\u4ef6\u5df2\u7ecf\u5b89\u88c5\u5b8c\u6210\u3002\u4e3a\u4e86\u8ba9\u63d2\u4ef6\u6b63\u786e\u7684\u81ea\u52a8\u52a0\u8f7d\uff0c\u6211\u4eec\u9700\u8981\u5728 .vimrc<\/span> \u6587\u4ef6\u4e2d\u6dfb\u52a0\u5b89\u88c5\u597d\u7684\u63d2\u4ef6\u540d\u3002<\/p>\n \u8fd9\u6837\u505a\uff1a<\/p>\n \u6dfb\u52a0\u8fd9\u4e00\u884c\uff1a<\/p>\n \u7528\u81ea\u5df1\u7684\u63d2\u4ef6\u540d\u66ff\u6362 vim-dasm\u3002\u7136\u540e\uff0c\u6572\u51fb ESC<\/span>\uff0c\u952e\u5165 :wq<\/span> \u4fdd\u5b58\u9000\u51fa\u3002<\/p>\n \u8bf7\u6ce8\u610f\uff0c\u6240\u6709\u63d2\u4ef6\u90fd\u5fc5\u987b\u5728 .vimrc<\/span> \u6587\u4ef6\u4e2d\u8ffd\u52a0\u5982\u4e0b\u5185\u5bb9\u3002<\/p>\n \u952e\u5165\u4e0b\u9762\u547d\u4ee4\u5217\u51fa\u6240\u6709\u5df2\u5b89\u88c5\u7684\u63d2\u4ef6\uff1a<\/p>\n <\/p>\n \u952e\u5165\u4e0b\u5217\u547d\u4ee4\u66f4\u65b0\u63d2\u4ef6\uff1a<\/p>\n \u952e\u5165\u4e0b\u5217\u547d\u4ee4\u91cd\u65b0\u5b89\u88c5\u6240\u6709\u63d2\u4ef6\uff1a<\/p>\n \u9996\u5148\uff0c\u5217\u51fa\u6240\u6709\u5df2\u5b89\u88c5\u7684\u63d2\u4ef6\uff1a<\/p>\n \u4e4b\u540e\u5c06\u7126\u70b9\u7f6e\u4e8e\u6b63\u786e\u7684\u4e00\u884c\u4e0a\uff0c\u6309\u4e0b SHITF+d<\/span> \u7ec4\u5408\u952e\u3002<\/p>\n <\/p>\n \u7136\u540e\u7f16\u8f91\u4f60\u7684 .vimrc<\/span> \u6587\u4ef6\uff1a<\/p>\n \u5220\u9664\u63d2\u4ef6\u5165\u53e3\u3002\u6700\u540e\uff0c\u952e\u5165 :wq<\/span> \u4fdd\u5b58\u9000\u51fa\u3002<\/p>\n \u6216\u8005\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u79fb\u9664\u63d2\u4ef6\u6240\u5728 .vimrc<\/span> \u6587\u4ef6\u884c\uff0c\u5e76\u4e14\u6267\u884c\u4e0b\u5217\u547d\u4ee4\uff0c\u5378\u8f7d\u63d2\u4ef6\uff1a<\/p>\n \u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u79fb\u9664\u6240\u6709\u4e0d\u5728\u4f60\u7684 .vimrc<\/span> \u6587\u4ef6\u4e2d\u4f46\u662f\u5b58\u5728\u4e8e bundle \u76ee\u5f55\u4e2d\u7684\u63d2\u4ef6\u3002<\/p>\n \u4f60\u5e94\u8be5\u5df2\u7ecf\u638c\u63e1\u4e86 Vundle \u7ba1\u7406\u63d2\u4ef6\u7684\u57fa\u672c\u65b9\u6cd5\u4e86\u3002\u5728 Vim \u4e2d\u4f7f\u7528\u4e0b\u5217\u547d\u4ee4\uff0c\u67e5\u8be2\u5e2e\u52a9\u6587\u6863\uff0c\u83b7\u53d6\u66f4\u591a\u7ec6\u8282\u3002<\/p>\n \u73b0\u5728\u6211\u5df2\u7ecf\u628a\u6240\u6709\u5185\u5bb9\u90fd\u544a\u8bc9\u4f60\u4e86\u3002\u5f88\u5feb\uff0c\u6211\u5c31\u4f1a\u51fa\u4e0b\u4e00\u7bc7\u6559\u7a0b\u3002\u4fdd\u6301\u5173\u6ce8\uff01<\/p>\n \u5e72\u676f\uff01<\/p>\n Vundle GitHub \u4ed3\u5e93<\/a>[2]<\/span><\/p>\n via: https:\/\/www.ostechnix.com\/manage-vim-plugins-using-vundle-linux\/<\/a><\/p>\n \u4f5c\u8005\uff1aSK<\/a>[3]<\/span> \u8bd1\u8005\uff1aCYLeft<\/a>[4]<\/span> \u6821\u5bf9\uff1awxy<\/a>[5]<\/span><\/p>\n \u672c\u6587\u7531 LCTT<\/a>[6]<\/span> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a>[7]<\/span> \u8363\u8a89\u63a8\u51fa<\/p>\n \u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-9416-1.html<\/a><\/p>\nsudo apt-get install vim git\r\n<\/pre>\n
git clone https:\/\/github.com\/VundleVim\/Vundle.vim.git ~\/.vim\/bundle\/Vundle.vim\r\n<\/pre>\n
vim ~\/.vimrc\r\n<\/pre>\n
set nocompatible \" be iMproved, required\r\nfiletype off \" required\r\n\r\n\" set the runtime path to include Vundle and initialize\r\nset rtp+=~\/.vim\/bundle\/Vundle.vim\r\ncall vundle#begin()\r\n\" alternatively, pass a path where Vundle should install plugins\r\n\"call vundle#begin('~\/some\/path\/here')\r\n\r\n\" let Vundle manage Vundle, required\r\nPlugin 'VundleVim\/Vundle.vim'\r\n\r\n\" The following are examples of different formats supported.\r\n\" Keep Plugin commands between vundle#begin\/end.\r\n\" plugin on GitHub repo\r\nPlugin 'tpope\/vim-fugitive'\r\n\" plugin from http:\/\/vim-scripts.org\/vim\/scripts.html\r\n\" Plugin 'L9'\r\n\" Git plugin not hosted on GitHub\r\nPlugin 'git:\/\/git.wincent.com\/command-t.git'\r\n\" git repos on your local machine (i.e. when working on your own plugin)\r\nPlugin 'file:\/\/\/home\/gmarik\/path\/to\/plugin'\r\n\" The sparkup vim script is in a subdirectory of this repo called vim.\r\n\" Pass the path to set the runtimepath properly.\r\nPlugin 'rstacruz\/sparkup', {'rtp': 'vim\/'}\r\n\" Install L9 and avoid a Naming conflict if you've already installed a\r\n\" different version somewhere else.\r\n\" Plugin 'ascenator\/L9', {'name': 'newL9'}\r\n\r\n\" All of your Plugins must be added before the following line\r\ncall vundle#end() \" required\r\nfiletype plugin indent on \" required\r\n\" To ignore plugin indent changes, instead use:\r\n\"filetype plugin on\r\n\"\r\n\" Brief help\r\n\" :PluginList - lists configured plugins\r\n\" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate\r\n\" :PluginSearch foo - searches for foo; append `!` to refresh local cache\r\n\" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal\r\n\"\r\n\" see :h vundle for more details or wiki for FAQ\r\n\" Put your non-Plugin stuff after this line\r\n<\/pre>\n
vim\r\n<\/pre>\n
:PluginInstall\r\n<\/pre>\n
:bdelete\r\n<\/pre>\n
vim +PluginInstall +qall\r\n<\/pre>\n
set shell=\/bin\/bash\r\n<\/pre>\n
:PluginSearch\r\n<\/pre>\n
:PluginSearch!\r\n<\/pre>\n
:PluginSearch vim\r\n<\/pre>\n
:PluginSearch vim-dasm\r\n<\/pre>\n
:bdelete\r\n<\/pre>\n
:e ~\/.vimrc\r\n<\/pre>\n
[...]\r\nPlugin 'vim-dasm'\r\n[...]\r\n<\/pre>\n
[...]\r\nfiletype plugin indent on\r\n<\/pre>\n
:PluginList\r\n<\/pre>\n
:PluginUpdate\r\n<\/pre>\n
:PluginInstall!\r\n<\/pre>\n
:PluginList\r\n<\/pre>\n
:e ~\/.vimrc\r\n<\/pre>\n
:PluginClean\r\n<\/pre>\n
:h vundle\r\n<\/pre>\n
\n\n