Установка разъема Vim на Ubuntu 16.10

Я - новый пользователь Ubuntu, и я хотел бы определенную справку с плагинами. Согласно этому веб-сайту, я установил vim-plug с curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim команда. Я также создал каталог ~/.vim/plugged как предложено. До сих пор я знаю, что должен установить свои плагины внутри (в ~/.vimrc файл):

call plug#begin('~/.vim/plugged')

call plug#end()

Обозначается, что я должен сделать контент "Загрузки plug.vim" доступным в каталоге 'автозагрузки'.

Вопрос 1: Каков каталог 'автозагрузки' здесь?

На самом деле я хочу установить vim-plug устанавливать несколько плагинов как nerdtree. Путем я понимаю, что процедура должна пробежаться через веб-сайт https://github.com/scrooloose/nerdtree и принять только участие scrooloose/nerdtree устанавливать плагин:

call plug#begin('~/.vim/plugged')

Plug 'scrooloose/nerdtree'

call plug#end()

затем выполнитесь :PlugInstall.

Вопрос 2: кто-либо мог смочь сказать мне, где у меня есть проблема (если существует)?

1
задан 16 January 2017 в 04:41

1 ответ

От :h autoload :

AUTOMATICALLY LOADING FUNCTIONS 
                                                        autoload-functions
When using many or large functions, it's possible to automatically define them
only when they are used.  There are two methods: with an autocommand and with
the "autoload" directory in 'runtimepath'.

...

Using an autoload script 
                                                        autoload E746
This is introduced in the user manual, section 41.15.

Using a script in the "autoload" directory is simpler, but requires using
exactly the right file name.  A function that can be autoloaded has a name
like this: 

        :call filename#funcname()

When such a function is called, and it is not defined yet, Vim will search the
"autoload" directories in 'runtimepath' for a script file called
"filename.vim".  For example "~/.vim/autoload/filename.vim".  That file should
then define the function like this: 

        function filename#funcname()
           echo "Done!"
        endfunction

The file name and the name used before the # in the function must match
exactly, and the defined function must have the name exactly as it will be
called.

Так, autoload каталог, где можно отбросить файлы, которые определяют функции, и файл только читается, когда функция вызвана впервые. Это делает запуск быстрее.

0
ответ дан 8 December 2019 в 07:02

Другие вопросы по тегам:

Похожие вопросы: