junegunn / vim-plug

:hibiscus: Minimalist Vim Plugin Manager
https://junegunn.github.io/vim-plug/
MIT License
34.07k stars 1.93k forks source link

E492:Not an editor command:PlugInstall #1234

Closed AIYES-XD closed 1 year ago

AIYES-XD commented 1 year ago

Explain the problem here ... I can't use vim-plug. It just not work

" Plugins will be downloaded under the specified directory.
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')

" Declare the list of plugins.
Plug 'tpope/vim-sensible'
Plug 'junegunn/seoul256.vim'

" List ends here. Plugins become visible to Vim after this call.
call plug#end()
AIYES-XD commented 1 year ago

During the copying process, there may be a problem of adding symbols at the beginning of a sentence. I successfully used the function after deleting the additional symbols at the beginning of the sentence

tongyaopu commented 1 year ago

This happened to me as well. I think my problem was, after I typed in call plug#begin(), call plug#end(), I wrote to the init.vim file (by :w), but did not quit and reopen it, so maybe my system did not recognize that I have call plug#begin() and call plug#end()