According to the Debian documentation about vim, a Debian package (Ubuntu, really, in my case) is expected to place <name>.vim
files under:
/usr/share/vim/addons/...
Syntax files go under a sub-directory named syntax:
/usr/share/vim/addons/syntax/my-syntax.vim
However, it does not look like vim
recognized that directory.
In my .vimrc
file I have something like so:
syntax on
if !exists("my_autocommands_loaded")
let my_autocommands_loaded=1
au BufNewFile,BufReadPost *.cpp setf my-syntax
endif
Just in case, I also tried :setf my-syntax
manually and I lose the syntax (which I know is what happens when a file is not found). Looking around, it sounds like the only path to a system syntax folder would be the path to /usr/share/vim/vim<version>/syntax/...
.
I also replaced the setf ...
with so /usr/shared/vim/addons/syntax/my-syntax.vim
and that works perfectly.
Is it not possible to use that addons
directory? Do I need to add it in a variable? Is it necessary to have a corresponding plugin which properly activates the addons
syntax?
'runtimepath'
since the structure you mention above doesn't have the required{packdir}/start
. Take a look at the page that you're taken to when you hit thePrev
link./varr/lib/...
:runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vim80/pack/dist/opt/matchit,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
/usr/share/vim/addons
everything should be picked up.:scriptnames
). At this point I don't have plugins, only syntax files. The rest is in my.vimrc
file.