You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you very much for your amazing plugin, it works like a charm with vim-lsp.
I think, it might be useful to add one more command for creating a symlink to a dedicated snippet file that exists in other directory, than g:vsnip_snippet_dir.
Also, It would be great to have a variable with an absolute path to a symlinked external directory. I'll explain later, what I mean.
First of all, I am aware of a very useful feature of your plugin that merges snippets from another plugins with snippets from g:vsnip_snippet_dir.
However, in my case (and I hope somebody will face with it also) I want to have several comfy features:
Develop my favourite plugin with snippets, e.g. my snippets installed locally on my machine in ~/Documents/my-snippets. Let's call it my-snippets directory.
Have g:vsnip_snippet_dir variable set to ~/.config/nvim/snippets. Let's call it root-snippets.
Have my-snippets plugin installed via Plug in my init.vim, e.g. Plug 'zorgick/my-snippets'
I don't want to change root-snippets variable in my init.vim config each time my-snippets directory changes. Furthermore, my-snippets directory might not even exist on my other virtual machine.
Experiment with snippets in root-snippets and have precedence of root-snippets over my my-snippets plugin.
Update my-snippets with changes that I favor in root-snippets, commit them and push to my repository, so that I could use them later as Plug 'zorgick/my-snippets'
What I am doing currently as a workaround to achieve a similar result
I have g:vsnip_snippet_dir variable set to ~/.config/nvim/snippets
I have my-snippets installed locally on my machine in ~/Documents/my-snippets
If I want to add a typescript snippet to my-snippets, I symlink this file to root-snippets
I check if the snippet works correctly, commit changes in my-snippets directory and push them to my repository.
Alas, It requires a lot of typing in the terminal each time I want to add another snippet for another language.
How I see the improvements of your plugin to make the above work out of the box:
You may find it useful to add another variable, e.g., g:vsnip_external_dir, that will be a prefix for external snippet files. It will give a user an ability to type in only filename of the lynked snippet, instead of the full path.
I kindly suggest you to add one more command, e.g., VsnipLink, that will behave similar to VsnipOpen, but with extra step. On this additional step VsnipLink will prompt the user to type in either full path to an external snippet file, e.g., /home/zorgik/Documents/my-snippets/javascript/typescript.json, or just a filename if the previous item in this list is implemented, so that this filename will be appended to the g:vsnip_external_dir path.
Hope, you will find this idea usefull for your plugin.
The text was updated successfully, but these errors were encountered:
vim-vsnip/plugin/vsnip.vim
Line 29 in b05641c
First of all, thank you very much for your amazing plugin, it works like a charm with vim-lsp.
I think, it might be useful to add one more command for creating a symlink to a dedicated snippet file that exists in other directory, than
g:vsnip_snippet_dir
.Also, It would be great to have a variable with an absolute path to a symlinked external directory. I'll explain later, what I mean.
First of all, I am aware of a very useful feature of your plugin that merges snippets from another plugins with snippets from
g:vsnip_snippet_dir
.However, in my case (and I hope somebody will face with it also) I want to have several comfy features:
~/Documents/my-snippets
. Let's call it my-snippets directory.g:vsnip_snippet_dir
variable set to~/.config/nvim/snippets
. Let's call it root-snippets.Plug 'zorgick/my-snippets'
Plug 'zorgick/my-snippets'
What I am doing currently as a workaround to achieve a similar result
g:vsnip_snippet_dir
variable set to~/.config/nvim/snippets
~/Documents/my-snippets
Alas, It requires a lot of typing in the terminal each time I want to add another snippet for another language.
How I see the improvements of your plugin to make the above work out of the box:
g:vsnip_external_dir
, that will be a prefix for external snippet files. It will give a user an ability to type in only filename of the lynked snippet, instead of the full path./home/zorgik/Documents/my-snippets/javascript/typescript.json
, or just a filename if the previous item in this list is implemented, so that this filename will be appended to theg:vsnip_external_dir
path.Hope, you will find this idea usefull for your plugin.
The text was updated successfully, but these errors were encountered: