Page 1 of 1
Problems with snippets macros
Posted: 13.05.2026 03:44
by egfips
Hi,
I just installed version 1.234.3.0 on Linux amd 64
Snippets seem to work fine, but fall a little short. I need to be able to insert the file name. Just the file name, no path and no extension. All combinations of this are offered, except for the one I need.
In theory this should not be a problem, because that feature is provided by the set of supported Sublime macros ($TM_FILENAME_BASE). But as far as I can see, none of the Sublime macros actually works.

I tried both ways of entering them. I would not expect you advertise this feature without implementing it, so it's probably a regression.
It would be nice if both of these issues could be fixed. Thank you for providing a nice text editor.
Re: Problems with snippets macros
Posted: 13.05.2026 16:31
by main Alexey
I updated plugin Snippets in the addons-manager now. Update it from 'plugins / addons manager / update'.
changes
2026.05.13
+ add: new macro ${fname_base} to place filename without extension
+ add: all previously implemented macros from Sublime are now also supported for user-made snippets (before they supported only for snippets from VSCode)
Pls test.
Re: Problems with snippets macros
Posted: 13.05.2026 17:30
by main Alexey
Re: Problems with snippets macros
Posted: 14.05.2026 05:00
by egfips
before they supported only for snippets from VSCode
I didn't realize that. So I was actually asking for more than I was aware of. Thanks a bunch.
FYI, the use case for this is a template I have for new Java files. I create the file and save it with its intended name and then have the Java snippets available. The new file template then takes the file name (obviously without extension) and inserts it as the class name (possible since each class must have the same name as the file it is implemented in) and also as the name of the constructor template.
Re: Problems with snippets macros
Posted: 14.05.2026 17:49
by main Alexey
You use Java. Hm, for Java it's important to have good autocompletions. So you use LSP plugin and server, do they work good?
Re: Problems with snippets macros
Posted: 16.05.2026 03:03
by egfips
Interesting assumption. I never liked auto completion, so I don't actually use these plugins. In general I am very selective about automation support. I use almost none of that. In my opinion automation has a number of problems. One is that it is generally written based on the assumptions of the author. Those in turn are generally strongly informed by personal work habits. These may or may not sit well with any given user (me in this case). Another problem is that with almost all automation I have encountered, it works quite well in many situations. However, there are far too many situations left, where it gets in the way. In my opinion the tradeoff is generally not worth it. Most of the time it seems my work habits differ strongly from those of other people. therefore most automation tools make life harder for me, not easier.
The editor I am using until now (for probably about 20 years) was annoying me in may ways. One of these was that most of the automation stuff is turned on by default and there is lots of it. I had to spend a considerable amount of time locating where all these things get configured in order turn them off.
Snippets are a big exception here, and I would not see them so much as automation. But I think a big part of what makes them work for me is that I am in control of content actually gets inserted and which key words trigger the insertion.