Questions tagged [autoload]
The autoload tag has no usage guidance.
11
questions
0
votes
1
answer
48
views
Vim9script autoloading script results in undefined variable
I'm new to vim9script and taking reference from this section of the vim9 help file. However I keep on getting this error upon calling TermOpen: E121: Undefined variable: util
autoload/util.vim:
" ...
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, ...
0
votes
2
answers
557
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 ...
1
vote
0
answers
707
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 ...
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 ...
4
votes
1
answer
12k
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 ....
1
vote
1
answer
152
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....
0
votes
1
answer
143
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 ...
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/...
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 ...
4
votes
1
answer
996
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 ...