I am trying to write a plugin and I observed that I have identical ftplugin
files. e.g. ftplugin/python.vim
and ftplugin/julia.vim
have exactly the same content and it looks like the following:
vim9script
import autoload "../myfunctions.vim"
b:some_var = g:plugins_some_var[&filetype]
augroup my_group
autocmd! * <buffer>
autocmd BufEnter <buffer> myfunctions.MyFunc()
augroup END
How can I re-arrange my code structure to avoid such repetitions?