Hacker News new | ask | show | jobs
by grozmovoi 1044 days ago
I wonder how the health of this project will be affected by cody/copilot? Genuinely wondering if it's wort spending time setting up ultisnips vs. learning to use copilot well.

Like, I prefer to have my own snippets and set them up the way I want, but hey - the convenience of LLMs... idk

5 comments

I like using UltiSnips to easily write lengthy commands, when typesetting mathematical notes using Vim as a text editor for the LaTeX software.

For example, if I want to add an image to a document, the necessary full command to type this might be `\includegraphics[scale=0.5]{Image_file_name}`, which is a lot to type for image-heavy documents.

But with UltiSnips, I can write any shortcut (e.g. by typing `img` and pressing the `Tab` key or alternatively letting it auto-complete depending on my snippet setting), then the whole command is typed out: `\includegraphics[scale=0.5]{$1}$0`. My cursor would immediately be placed at the $1 position, and pressing the `Tab` key would take me outside to the $0 position, so I can keep typing.

It's simple and predictable for myself as a user to easily write the full command, whereas I predict that a solution that uses an large language model (LLM) for this context may add complexity without making the task easier for my purposes (though LLM-based software may be more useful in other contexts).

It isn't worth considering LLMs for code, and I don't think they can ever solve the issue in a way that satisfies all the legal and ethical constraints.

Also, why wouldn't you just use both? Snippets let you quickly use known patterns, LLMs let you quickly write the more generic case of boilerplate that doesn't align well with snippet use.

Snippets are deterministic, so you can use them without having to check their output.
that's valid
One of these things needs an internet connection to function. The other does not.
point for utilsnips
There's plenty of snippets that are well known per language/framework, and might as well be instant AND consistent instead of spinning on an API call.