ultisnips
ultisnips copied to clipboard
UltiSnips does not handle some symlinks correctly?
Expected behavior:
I keep my configuration files on GitLab, and sync across systems. Thus I have a
/home/my_username/island/dot-files/vim/UltiSnips/
folder, which contains
tex.snippets text.snippets ...
if I symlink this folder into ~/.vim/,
$ file ~/.vim/UltiSnips /home/my_username/.vim/UltiSnips: symbolic link to /home/my_username/island/dot-files/vim/UltiSnips
it is not processed correctly.
Actual behavior:
$ vim /tmp/a.txt :UltiSnipsEdit
I get
UltiSnips was not able to find a default directory for snippets. Do you have a .vim directory? Try :UltiSnipsEdit! instead of :UltiSnipsEdit.
Workaround I found
if I create a regular folder
/home/my_username/.vim/UltiSnips/
and symlink files
tex.snippets, text.snippets, ...
there,
then everythng works as expected.
Steps to reproduce
- Create a folder Ultisnips somewhere with some custom snippets.
- $ ln -sf Ultisnips ~/.vim/Ultisnips
- Operating System: Ubuntu 20.04.4 LTS
- Vim Version: VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 01 2022 09:16:32) Included patches: 1-2269, 3612, 3625, 3669, 3741
- UltiSnips Version: 1edcb40ce749c47d5da42ab02dcdf21f9279bfbb
- Python inside Vim: 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]