11 ms·
As others pointed out, snippets are not macros. And in addition using macros for simple text transformation that was pointed out by @ethagnawl, below are other
by somezero 9y ago
As others pointed out, snippets are not macros. And in addition using macros for simple text transformation that was pointed out by @ethagnawl, below are other ideas all of which I use on an almost daily basis:
1. Macros can be shared with different buffers which enables you to a) do complicated transformations in a step by step manner and b) do transformations where the content of one buffer affects the content of another etc.
2. Macros can have state, typically demonstrated by having a counter. Imagine replicating your keys, but somewhere in between, a number is incremented or a word from a list is being chosen etc.
3. Extension of (2) is generative ones e.g. abo abo's `tiny` package.
4. Macros can act in arbitrary buffers. For example, If you're in `dired` or `ranger-mode` or alike, you could edit the file system the same way you were editing the code.
The common denominator of all these is the keyboard. Any GUI version would either be too complex to represent all the possible variations, or there are use cases that are not covered by GUI and those use cases -if they matter to you- would be the reasons you'd be gravitating towards keyboard based editors. For the case of notepad, the uncovered use cases are quite trivial. :)