norcalli / snippets.nvim

GNU General Public License v3.0
277 stars 13 forks source link

Autoexpand #10

Open kovetskiy opened 4 years ago

kovetskiy commented 4 years ago

Hi, do you have any plans to implement a feature for automatically expanding snippets? For example, snippet cl would automatically convert to class <HereAutomaticallyObtainedClassNameFromFileName>.

salkin-mada commented 4 years ago

Hi. Do you mean a feature that makes it possible to just expand the whole snippet without having to advance through all the ${*:}?

Take this snippet as an example. As of now, as I understand it. With snippets.nvim we would have to advance 3 times for succesful expansion. (practically press the advance/expand keybinding 4 times just to get the snippet with default values)

["if"] = U.match_indentation [[
    if(${1:banana == mango}, {${2:"\n\tyeah!".postln}}, {${3:"\n\tbuuh!".postln}})
]];