{"id":175516,"date":"2020-04-12T10:32:20","date_gmt":"2020-04-12T02:32:20","guid":{"rendered":"https:\/\/gulass.cn\/?p=175516"},"modified":"2020-03-25T15:33:45","modified_gmt":"2020-03-25T07:33:45","slug":"vim8-plug","status":"publish","type":"post","link":"https:\/\/gulass.cn\/vim8-plug.html","title":{"rendered":"\u5982\u4f55\u5b89\u88c5\u6700\u65b0\u7684Vim8.2\u4e0eVim\u63d2\u4ef6\u7ba1\u7406\u5668vim-plug"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u6211\u4e2a\u4eba\u6700\u559c\u6b22\u7684\u662fvim-plug\uff0c\u5b83\u662fvim\u7684\u6f02\u4eae\u800c\u7b80\u7ea6\u7684\u63d2\u4ef6\u3002\u8ba9\u6211\u4eec\u770b\u770b\u5982\u4f55\u5728Linux\u6216\u7c7b\u4f3cUnix\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5\u548c\u4f7f\u7528\u6b64\u63d2\u4ef6\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u5bf9\u4e8e\u6709\u5174\u8da3\u5b89\u88c5\u6b64\u65b0\u7248\u672c\u7684\u7528\u6237\uff0c\u53ef\u4ee5\u901a\u8fc7\u6839\u636e\u5176\u7cfb\u7edf\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4e4b\u4e00\u6765\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n

Ubuntu\u53ca\u5176\u884d\u751f\u7248<\/strong><\/div>\n
[linuxidc@linux:~\/www.linuxidc.com]$ sudo add-apt-repository ppa:jonathonf\/vim \r\n<\/pre>\n

\"\"<\/p>\n

[linuxidc@linux:~\/www.linuxidc.com]$ sudo apt-get update  \r\n[linuxidc@linux:~\/www.linuxidc.com]$ sudo apt install vim \r\n<\/pre>\n

\"\"<\/p>\n

Arch Linux\u53ca\u5176\u884d\u751f\u7248\u672c<\/strong><\/div>\n
[linuxidc@linux:~\/www.linuxidc.com]$ sudo pacman -S vim  \r\n[linuxidc@linux:~\/www.linuxidc.com]$ flatpak install flathub org.vim.Vim  \r\n<\/pre>\n

\u5bf9\u4e8e\u4efb\u4f55\u559c\u6b22Vim\u7684\u7528\u6237\uff0cvim\u63d2\u4ef6\u7ba1\u7406\u5668\u90fd\u662f\u5fc5\u987b\u7684\u3002\u60a8\u53ef\u4ee5\u5728\u627e\u5230\u4e00\u4e9b\u53ef\u7528\u7684\u9009\u9879\u3002\u6211\u4e2a\u4eba\u6700\u559c\u6b22\u7684\u662fvim-plug\uff0c\u5b83\u662fvim\u7684\u6f02\u4eae\u800c\u7b80\u7ea6\u7684\u63d2\u4ef6\u3002\u8ba9\u6211\u4eec\u770b\u770b\u5982\u4f55\u5728Linux\u6216\u7c7b\u4f3cUnix\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5\u548c\u4f7f\u7528\u6b64\u63d2\u4ef6\u3002<\/p>\n

\u5982\u4f55\u5b89\u88c5vim-plug<\/strong><\/div>\n

\u81ea\u7136\uff0c\u60a8\u5fc5\u987b\u5728\u7cfb\u7edf\u4e0a\u5b89\u88c5vim\u3002\u51fa\u4e8e\u6f14\u793a\u76ee\u7684\uff0c\u6211\u4f7f\u7528Ubuntu Linux\u3002\u4e0b\u8f7dplug.vim\u5e76\u5c06\u5176\u653e\u5728\u201cautoload\u201d\u76ee\u5f55\u4e2d\uff1a<\/p>\n

[linuxidc@linux:~\/www.linuxidc.com]$ mkdir -p ~\/.vim\/autoload\/  \r\n[linuxidc@linux:~\/www.linuxidc.com]$ cd ~\/.vim\/autoload\/  \r\n<\/pre>\n

\u73b0\u5728\u6211\u4eec\u4f7f\u7528wget\u6216curl\u547d\u4ee4\u6765\u83b7\u53d6plugin.vim\uff0c\u5982\u4e0b\uff1a<\/p>\n

[linuxidc@linux:~\/.vim\/autoload]$ wget https:\/\/raw.githubusercontent.com\/junegunn\/vim-plug\/master\/plug.vim \r\n\u6216\r\n[linuxidc@linux:~\/.vim\/autoload]$ curl -O https:\/\/raw.githubusercontent.com\/junegunn\/vim-plug\/master\/plug.vim \r\n\r\n<\/pre>\n

\"\"<\/p>\n

\u5982\u4f55\u4e3aLinux\u6216Unix\u914d\u7f6evim\u7684\u63d2\u4ef6\u7ba1\u7406\u5668vim-plug\uff1f<\/strong><\/div>\n

\u5728 ~\/.vimrc\u4e2d\u8bed\u6cd5\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

\u6307\u5b9a\u63d2\u4ef6\u76ee\u5f55<\/p>\n

call plug#begin('~\/.vim\/plugged')  \r\n<\/pre>\n

\u63d2\u4ef6\u5141\u8bb8\u4f7f\u7528\u4efb\u4f55\u6709\u6548\u7684git URL<\/p>\n

Plug 'valid git URL'  \r\n<\/pre>\n

\u63d2\u4ef6\u7684\u7b80\u5199\u7b26\u53f7<\/p>\n

Plug 'linuxidc\/linux'  \r\n<\/pre>\n

\u521d\u59cb\u5316\u63d2\u4ef6\u7cfb\u7edf<\/p>\n

call plug#end() \r\n<\/pre>\n
\u793a\u4f8b\uff1a<\/strong><\/div>\n

\u5047\u8bbe\u60a8\u8981\u4f7f\u7528\u4e00\u4e2a\u540d\u4e3avim-airline\u7684\u5e95\u90e8\u72b6\u6001\u589e\u5f3a\/\u7f8e\u5316vim\u63d2\u4ef6\u3002\u60a8\u9700\u8981\u5728~\/.vimrc\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n

call plug#begin('~\/.vim\/plugged')  \r\nPlugin 'vim-airline\/vim-airline'  \r\ncall plug#end() \r\n<\/pre>\n

\"\"<\/p>\n

\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6\u3002<\/p>\n

\u542f\u52a8vim\u6587\u672c\u7f16\u8f91\u5668\uff1a<\/p>\n

[linuxidc@linux:~\/www.linuxidc.com]$ vim \r\n<\/pre>\n

\u8981\u5b89\u88c5vim-airline\uff0c\u8bf7\u8f93\u5165\uff1a<\/p>\n

:PlugInstall \r\n<\/pre>\n

\"\"<\/p>\n

\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\u72b6\u6001\uff1a<\/p>\n

:PlugStatus \r\n<\/pre>\n

\"\"<\/p>\n

\u8981\u66f4\u65b0\u63d2\u4ef6\uff0c\u8bf7\u8f93\u5165\uff1a<\/p>\n

:PlugUpdate \r\n<\/pre>\n

\u8981\u5347\u7ea7vim-plug\u672c\u8eab\uff0c\u8bf7\u5728vim\u4f1a\u8bdd\u4e2d\u952e\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n

:PlugUpgrade \r\n<\/pre>\n

\u6e05\u7406\u63d2\u4ef6\uff0c\u9700\u8981\u73b0\u5728 .vimrc \u91cc\u9762\u5220\u9664\u6216\u6ce8\u91ca\u6389<\/p>\n

\u603b\u7ed3<\/strong><\/div>\n

\u5f53\u7136\uff0c\u5982\u679c\u60a8\u559c\u6b22vundle \u6216 pathogen\uff0c\u5219\u65e0\u9700\u5207\u6362\u3002\u4f46\u662f\uff0c\u6211\u66f4\u559c\u6b22\u8fd9\u4e2a\u3002\u4f60\u5b66\u4f1a\u4e86\u5417\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5bf9\u4e8e\u6709\u5174\u8da3\u5b89\u88c5\u6b64\u65b0\u7248\u672c\u7684\u7528\u6237\uff0c\u53ef\u4ee5\u901a\u8fc7\u6839\u636e\u5176\u7cfb\u7edf\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4e4b\u4e00\u6765\u8fdb\u884c\u5b89\u88c5\u3002 [linuxidc@linux: […]<\/p>\n","protected":false},"author":370,"featured_media":48172,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-175516","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/175516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/370"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=175516"}],"version-history":[{"count":5,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/175516\/revisions"}],"predecessor-version":[{"id":175528,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/175516\/revisions\/175528"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/48172"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=175516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=175516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=175516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}