[HN Gopher] UltiSnips - Snippet Solution for Vim
       ___________________________________________________________________
        
       UltiSnips - Snippet Solution for Vim
        
       Author : hggh
       Score  : 15 points
       Date   : 2023-08-16 11:04 UTC (1 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | mrzool wrote:
       | I might be old fashioned, but I think that if you learn the Vim
       | way you'll have no use for a snippet manager. Also, that using a
       | snippet manager will prevent you from learning the Vim way.
        
         | rustyminnow wrote:
         | Could you elaborate? Are you talking about :abbreviate and
         | such?
         | 
         | As a heavy vim user for years, I've found myself getting more
         | value out of snippets as of late.
        
         | dbalatero wrote:
         | Which vim way are you refering to? I'd like to check it out but
         | I have no idea what to look for.
        
       | grozmovoi wrote:
       | 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
        
         | imran-iq wrote:
         | One of these things needs an internet connection to function.
         | The other does not.
        
         | jyunwai wrote:
         | 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).
        
         | DiabloD3 wrote:
         | 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.
        
         | dbalatero wrote:
         | 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.
        
       | freeplay wrote:
       | If you're using Neovim, check out LuaSnip:
       | https://github.com/L3MON4D3/LuaSnip
        
       ___________________________________________________________________
       (page generated 2023-08-17 23:01 UTC)