Questions tagged [autoload]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
79 views

Create an autoload alias for an autoload function

I have a function like this in autoload/foo/bar.vim: function! foo#bar#do_stuff(...) abort " do stuff return endfunction Is it possible to create an "alias" for this function, ...
shadowtalker's user avatar
0 votes
2 answers
530 views

How to list files in "autoload" directory?

I use some statusline plugin, which source theme files from <the-autoload-directory>/lightline/colorscheme/*.vim. Many color plugins also provide themes for that statusline. Switching the theme ...
Possum Gallo's user avatar
1 vote
0 answers
692 views

Autoloaded vs lua functions: which is faster/more efficient?

I'm creating a neovim plugin written in Lua, and I have to react to the BufAdd and BufUnload events with a function call. I have 3 options: write the function in Lua (like the rest of the plugin) and ...
noibe's user avatar
  • 179
1 vote
1 answer
2k views

Vim autoload doesn`t work

I've created a ~/.vimrc file that uses plug.vim. call plug#begin('~/.vim/plugged') Plug 'something' call plug#end() I also downloaded plug.vim and put in the folder ~/.vim/autoload. But when I open ...
Alexandre Saura's user avatar
4 votes
1 answer
11k views

VimPlug, Vim won't load plugins: E117: Unknown function : plug#begin;

On Macbook Pro, Terminal, standard Vim, VimPlug When I start vim I get the following message: Error detected while processing /Users/me/.vimrc: line 159: E117: Unknown function: plug#begin In my ....
Gabe Santos's user avatar
1 vote
1 answer
151 views

vim8 - why does my 0read not read? [closed]

I have the following function in an autoload file: function! closet#FindSkeletonForFile() if exists('b:closet_skeleton') return 0 endif let b:closet_skeleton = s:closet....
aghast's user avatar
  • 227
0 votes
1 answer
139 views

Why does autoload/myplugin.vim get sourced?

I noticed that when functions in plugin/myplugin.vim are named using the autoload convention, function! myplugin#myfunction(), the file autoload/myplugin.vim gets sourced on vim startup, even though ...
Rastapopoulos's user avatar
2 votes
1 answer
1k views

Why does `vim-plug` add the .vim file to .vim/autoload and not .vim/plugin?

I am new to Vim plugins and am looking to use the vim-plug plugin manager. The installation instruction advises me to download the .vim file and add it to ~/.vim/autoload. curl -fLo ~/.vim/autoload/...
dayuloli's user avatar
  • 121
5 votes
1 answer
9k views

How an autoload/file.vim is loaded?

I am on WSL trying to understand why my fakeclip.vim doesn't work. I've added let g:fakeclip_platform = s:PLATFORM into ~/.vim/bundle/vim-fakeclip/autoload/fakeclip.vim, but I can't access the ...
nowox's user avatar
  • 459
4 votes
1 answer
986 views

Autocmd event for `autoread`?

I've just developed a nice solution for automatically loading external changes made to a file, but I'd like a more obvious notification when autoread changes my buffer. Is there a way of having a ...
Tom Hale's user avatar
  • 2,631