vim+plug.vim, 为什么不加载~/.vim/autoload/文件夹下的 plug.vim 文件呢 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
BBCCBB
V2EX    Vim

vim+plug.vim, 为什么不加载~/.vim/autoload/文件夹下的 plug.vim 文件呢

  •  
  •   BBCCBB 2017-09-30 23:28:48 +08:00 5545 次点击
    这是一个创建于 3002 天前的主题,其中的信息可能已经有所发展或是发生改变。

    有大佬遇到过这样的问题吗,之前一直在 Windows 上使用这样的配置,没有出现过任何问题, 不过 Windows 上是放在$VIM/vimfiles/autoload/下的,我看了 plug.vim 的官网,unix 上面也是放在~/.vim/atoload/文件夹下 vim 就会自动加载。

    启动 vi m 的时候, 提示 Plug not a command, 这就是没加载到 plug.vim 文件?

    15 条回复    2017-10-02 21:49:35 +08:00
    TimePPT
        1
    TimePPT  
    PRO
       2017-09-30 23:44:26 +08:00 via iPhone
    " Specify a directory for plugins
    " - For Neovim: ~/.local/share/nvim/plugged
    " - Avoid using standard Vim directory names like 'plugin'
    call plug#begin('~/.vim/plugged')
    TimePPT
        2
    TimePPT  
    PRO
       2017-09-30 23:45:16 +08:00 via iPhone
    Plug 'xxxxxxxx'

    " Initialize plugin system
    call plug#end()
    TimePPT
        3
    TimePPT  
    PRO
       2017-09-30 23:47:27 +08:00 via iPhone
    Usage

    Add a vim-plug section to your ~/.vimrc (or ~/.config/nvim/init.vim for Neovim):

    Begin the section with call plug#begin( )
    List the plugins with Plug commands
    call plug#end() to update &runtimepath and initialize plugin system
    Automatically executes filetype plugin indent on and syntax enable. You can revert the settings after the call. e.g. filetype indent off, syntax off, etc.


    https://github.com/junegunn/vim-plug/blob/master/README.md#usage
    582033
        4
    582033  
       2017-10-01 08:01:51 +08:00
    runtime 装了么
    582033
        5
    582033  
       2017-10-01 08:03:17 +08:00
    如果是在非标准 linux 环境下, 比如 openwrt entware 之类的,确保你装的是 vim-full, 而不是 vim
    quinoa42
        6
    quinoa42  
       2017-10-01 10:18:20 +08:00
    看看`set runtimepath?`的输出
    BBCCBB
        7
    BBCCBB  
    OP
       2017-10-02 14:07:36 +08:00
    @582033 我是在 macOS 下面, 用 brew 编译的 vi m
    BBCCBB
        8
    BBCCBB  
    OP
       2017-10-02 14:15:07 +08:00
    @TimePPT 嗯,我的配置文件里写了 call plug#begin(xxx)的
    BBCCBB
        9
    BBCCBB  
    OP
       2017-10-02 14:16:55 +08:00
    @TimePPT 配置文件都是写了的, 我不是小白啊。。。。。只是 macOS 上出现这个问题,太蛋疼了
    BBCCBB
        10
    BBCCBB  
    OP
       2017-10-02 14:21:14 +08:00
    @quinoa42 你好,我用 e cho &runtimepath 查看,我的~/.vim 目录是包含在内的。
    BBCCBB
        11
    BBCCBB  
    OP
       2017-10-02 14:23:30 +08:00
    @582033 macOS 下面也需要装 vim-runtime 吗?
    TimePPT
        12
    TimePPT  
    PRO
       2017-10-02 14:29:44 +08:00 via iPhone
    @BBCCBB 完全没遇到过……
    BBCCBB
        13
    BBCCBB  
    OP
       2017-10-02 14:34:19 +08:00
    @TimePPT 好吧,谢谢了,这就尴尬了
    582033
        14
    582033  
       2017-10-02 19:04:24 +08:00 via Android
    那你试试我这个看看能加载不,我的也是在 mac 下面,记得改下 install.bash; 不要创建 bashrc 的软连接

    https://github.com/582033/vim.git

    如果不能那看来是环境问题,再逐步排除
    BBCCBB
        15
    BBCCBB  
    OP
       2017-10-02 21:49:35 +08:00
    @582033 t/394956#reply2

    谢谢了,我找到问题了,是我犯了个错误。。。。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2788 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 31ms UTC 02:49 PVG 10:49 LAX 18:49 JFK 21:49
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86