3 ms·
This is mostly a listing of packages and very known ones at that. One of the best features I like is undoing regions. That is, if you know the approximate loca
by molteanu 7y ago
This is mostly a listing of packages and very known ones at that.
One of the best features I like is undoing regions. That is, if you know the approximate location of the text that you want to undo, you just select a region that contains that location and call undo. It can be used as a quick git alternative. Say you modify the buffer all over the place. If you want to undo some text that you've modified an hour ago but you did other modifications to the buffer in countless other places, you can undo just that region and you don't have to go back throught the whole undo tree.
Another one that I've currently discoverd and I'm very excited about is yasnippet (the modern variant of abbrev). You can define a string that stands for an abbreviation for an expansion. Everytime you type that string, it is replaced by that expansion. The nice thing about yasnippet compared to abbrev is that, among others, you can specify where to leave the cursor after the expansion. One example: "lt" expands to (let ((_))), where _ is the cursor position after the expansion. This also saves typing of all the parantheses. Or "mcar" expands to (mapcar (lambda (_))). You can expand anything to anything, in short. With time, you can type less and faster.
- smabie 7y agoYasnippet is amazing. Being able to tab through different fields is a game changer. You could make a snippet for every lisp function and never have to enter a paren ever again! The only probablem is that yasnippet can’t handle multiple nested expansions: it only keeps track of the current expansion.
- celeritascelery 7y agoIf you set `yas-triggers-in-field` it will work with multiple nested expansions.
- admax88q 7y ago> you just select a region that contains that location and call undo. What the fuck, how did I not know this. I am now glad that I read this thread. So much time lost undoing a bunch of changes, killing the piece I want to restore, redoing the changes and then yanking.
- molteanu 7y agoHahaha! Nice! Exactly the reaction I was hoping to see. I'm really glad that that helped you.
- iLemming 7y agoIndirect buffers is another awesome feature of Emacs, that AFAIK no other editor is capable to do. You can basically clone a buffer of the current file and work in two (or more) buffers like they all belong to completely different files. It's handy when you're writing a function that uses things declared somewhere else in the same file. Instead of jumping back and forth you just clone the buffer and you can collapse and narrow things independently.