SirVer/ultisnips — pull request #414 by Pyrohh (2014-12-06 06:11:52+00:00)
Title: Check if Neovim is being used when setting snippet directory

Hello,

I wasn't really satisfied with the solution in #393, so I added a very simply check to see if Neovim is being used. I didn't update the documentation as it should be obvious to Neovim users to substitute instructions referencing `~/.vim` with `~/.nvim`, although I can still update it if you'd like.

I'm sure you realize it, but the current method of setting snippet_dir isn't very flexible. IIRC Neovim will support the XDG runtime spec (at least according to the milestone on the issue https://github.com/neovim/neovim/issues/78), so the current method would cause the creation of snippets in a possibly unwanted location.

I was thinking something like this could be used to get vim's root runtimepath, and it should work on both nvim and vim:

```
snippet_dir = os.path.join(_vim.eval("get(split(&runtimepath, ","), 0)"), "UltiSnips")
```