reddit / emacs

What are your favorite packages for improving vanilla emacs text editing?

FluidDr1nker · 2022-10-27 19:35
They are all over the place and there are so many, which do you find are the most useful ones?
nv-elisp · 2022-10-27 19:45
evil
github-alphapapa · 2022-10-27 20:20
* expand-region * mosey * avy * aggressive-indent-mode * scrollkeeper * topsy
franburstall · 2022-10-27 20:44
* ivy * auctex * reftex
CorysInTheHouse69 · 2022-10-27 21:54
Not what OP asked
takeonrules · 2022-10-27 22:30
Expand region is one I use all the time. I didn't know how much until I just kept using it.
Pay08 · 2022-10-27 22:35
Not directly related to text editing, but swiper is much better than the built-in search.
tonicinhibition · 2022-10-28 00:06
Fantastic collection, I just found 4 great new features I didn't know I wanted.
easyEggplant · 2022-10-28 00:41
Unless you are recording a macro. :)
Pay08 · 2022-10-28 01:15
I don't quite understand?
egregius313 · 2022-10-28 01:58
Sometimes `swiper` doesn't behave properly when replaying a macro.
Hkyx · 2022-10-28 01:58
Dashboard, multi cursor, ephemeral theme, completion stuff, x509, etc
oantolin · 2022-10-28 02:14
I've tried to get into expand-region 2 or 3 times and always wind up uninstalling it. It always feels like I have to hammer on it like 5 times to get to what I want. I think I prefer memorizing more marking commands to mark directly what I want.
yuanbohan · 2022-10-28 02:16
- paredit and smartparens - expand-region - avy - projectile - swiper but in terms of coding, I use - eglot - magit - yasnippet
andyjda · 2022-10-28 02:42
how is dashboard related to text editing? (not trying to sound snarky, just want to check if there's some functionality I'm missing out on :-)
karthink · 2022-10-28 02:50
Besides packges mentioned in other posts (expand-region, avy etc) my most used packages are [goto-last-change](https://melpa.org/#/goto-chg) and [easy-kill](https://melpa.org/#/easy-kill).
karthink · 2022-10-28 02:51
expand-region is opinionated about what text objects are relevant in a given major mode. I've had to customize it a fair bit to not skip over regions of interest in org and latex-mode.
mattias_jcb · 2022-10-28 03:01
- smart-region (makes multiple-cursors, expand-region and rectangle-mark easier to use)
graduale · 2022-10-28 03:01
Care to share your customizations?
akirakom · 2022-10-28 03:04
- auto-yasnippet: I don't use yasnippet nowadays, as I have almost switched to the built-in tempo library, but auto-yasnippet still sticks. - symbol-overlay: This is useful for navigating the source code and renaming symbols. - link-hint: This is not about editing but useful for browsing documents - embark: This one has replaced expand-region - lispy
Hkyx · 2022-10-28 03:25
It show my agenda and help schedule my work at some point, the other use I have is to set shortcuts access to codes projects folders and files. It help me back faster to last files edited when I start eMacs too
Hkyx · 2022-10-28 03:26
I mostly use ladicle config too with some custom usage
FluidDr1nker · 2022-10-28 03:27
I don't think that is how one is supposed to use it. You move the cursor to the object you want to mark(because it knows about various objects) so you can mark it with one keystroke (M-h for me), way more ergonomic than doing `Ctrl-spc` + some marking command(which most have horrible bindings), if you are very close to the object you want to mark then `M-h h`, but hammer more than two times and you loose the ergonomic part.
thetemp_ · 2022-10-28 03:36
I guess the "vanilla emacs text editing" category means packages that assist with moving the cursor, marking, killing, or inserting text. * Avy: (Everybody loves Avy!) However, after a couple tweaks to isearch, I find myself using it a bit less often. * Meow: It's modal editing, so I don't know if it fits in the "vanilla" category. But as far as selecting and editing text goes, it's amazing. And it doesn't change Emacs as much as Evil does. I also like the way its leader key uses mode-specific-map but also provides a way to reach "C-x" bindings. It's a little bit like God-mode in that way. * Mwim: A simple and focused enhancement of the built-in "C-a", "C-e", "M-m" commands. You can jump between various points on the current line by repeating any of the included commands. Especially appreciate this one when my "a" pinky starts feeling sore. I just tap "C-e" twice instead. Of course the behavior is customizable. Usually, if I want a little enhancement like this, I'll write some elisp for it, but this little package is put together real well. * Tempel: Recently discovered this one. It's a lighter-weight alternative to YASnippet with (IMO) a much nicer syntax. It uses the same syntax as tempo.el (a built-in package), but Tempel is more featureful. * And of course, my favorite: [Emacs](https://www.youtube.com/watch?v=RiXK7NALgRs)! The best features are the ones you make yourself. But the foundation of all of Emacs features and packages, be they built-in or external, home-grown or from Elpa/Melpa, vanilla or Space/Doom, is Emacs.
bhrgunatha · 2022-10-28 04:32
A common macro use is to search for "something" e.g `isearch-forward` and then act on it. Repeating the macro will then find the next "something" from y0ur current position. This works well with `isearch-forward`(by default bound to `C-s`)because if there are multiple matches on a single line it will find the matches one by one. People using swiper generally bind `C-s` to `swiper` which only lets you choose the line, not individual matches on a line. You can only skip over 1 match per line and then move to the next line. However the swiper package also has 'swiper-isearch' which behaves like `isearch-forward` and will let you move match by match rather than line by line. Default emacs binds `C-s` to `isearch-forward` and `C-M-s` to `isearch-forward-regexp` and helpfully translates `C-S-s` to `C-s`. That means `C-S-s` is free to re-bind. So I bound `C-S-s` to `swiper-isearch`. I also bound `C-s-s` to `isearch-forward` - note lower case s - `super` - the windows/apple key. So I have C-s swiper C-S-s swiper-isearch C-s-s isearch-forward C-M-s isearch-forward-regexp Those bindings are a little awkward, but I don't use them very often so I'm willing to put up with them.
AsterOps · 2022-10-28 04:42
Icomplete vertical (built-in)
holgerschurig · 2022-10-28 04:52
Can you elaborate on embark having replaced expand-region? How? Did you add your own mode-specific mark functions to carious keymaps?
mysockinabox · 2022-10-28 05:01
Yeah, who uses key input for text editing?
akirakom · 2022-10-28 05:17
I mostly used expand-region for marking a symbol at point and saving it into the kill ring. You can do the same by running embark-act and then `w`. Also, running embark-act multiple times can switch the region to defun etc., so it somewhat corresponds to expand-region. Embark is not a complete replacement for expand-region, but it covers some of the use cases of the latter package.
dawran6 · 2022-10-28 05:51
iedit
Silentroar23 · 2022-10-28 05:52
Swiper cannot be used during macro recording but the built in isearch can
thoomfish · 2022-10-28 06:30
Mwim sounds very handy. Definitely working that into my config. I've been learning Meow for a few weeks and I'm reasonably comfortable with it, though nowhere near as comfortable as I am with Evil. There are a lot of things I like about the design, and some things I'm less thrilled about. I love seeing what text an operation will effect before I commit to the operation. I love `meow-pop-selection`. I love the numeric hint system (and deeply miss it in org-mode buffers). I love how insert mode is effectively vanilla Emacs, which neatly solves Evil's issue of clashing keymaps. I'm not as wild about how awkward noun-verb grammar makes repeating more complex actions. For example, in Evil you can do `ci(<text><ESC>` to change the contents of a set of parentheses, then move to a different set and use `.` to make the same edit again. The same kind of operation in Meow is (as best as I can figure out) a lot more awkward. I think you'd actually have to record a kmacro to get the same behavior, which adds a bunch of extra steps. Beacon mode is also a bit of a mess. It feels like it mingles two different batch editing modes, one that's based on making the same edit to each line in a region, and one that's based on affecting *everything* in the region that matches a movement command (not always using the normal semantics of that movement command, either), and a lot of commands that you would want to use in the first mode end up being diverted to the second with no escape hatch. For example, "replace the second word of each line" is an edit I'd expect to be able to make, but can't (because `w` selects based on the text of the word under the cursor rather than its position, and `e`/`b` do... something I can't figure out). > I also like the way its leader key uses mode-specific-map but also provides a way to reach "C-x" bindings. I've definitely got some mixed feelings about the keypad. It is a simpler and more elegant solution than defining a bunch of hydras, but you end up having to rebind a lot of stuff to make it ergonomic anyway. Emacs' default bindings aren't very consistent about whether whether you're more likely to want a C-<something> or just <something> when you're deep in a keymap, and I find it hard to remember when I do and don't have to insert that extra SPC (getting `list-buffers` when I wanted `switch-to-buffer` was the most maddening offender and I did end up rebinding that).
phundrak · 2022-10-28 07:33
Or modal editing?
mysockinabox · 2022-10-28 07:36
I only edit videos in emacs.
RepublicWorried · 2022-10-28 08:00
why not fido-vertical then?
RepublicWorried · 2022-10-28 08:18
All packages I am using are &#x200B; (use-package rg :config (rg-enable-default-bindings)) (setq rg-default-alias-fallback "everything") (use-package expand-region) (bind-keys* ("C-'" . er/expand-region) ("C-;" . er/contract-region)) (use-package whole-line-or-region) (whole-line-or-region-global-mode t) (use-package window-numbering :config (window-numbering-mode t)) (use-package move-text) (bind-keys* ("M-n" . move-text-down) ("M-p" . move-text-up)) (use-package avy) ;; C-j C-j for goto-line (bind-keys* ("C-j" . avy-goto-char-timer)) (setq avy-timeout-seconds 0.2) (setq avy-style 'words) (setq avy-case-fold-search nil) (setq avy-all-windows t) (use-package amx :hook (after-init . amx-mode) :bind ("M-x" . amx)) (use-package mood-line :init (mood-line-mode)) (load "~/.emacs.d/my-manoj-dark-theme.el") (use-package goto-last-change :bind ("M-m" . goto-last-change))
pushqrex · 2022-10-28 08:22
I think fido vertical is more recent so less people know about it
poiu- · 2022-10-28 09:30
!remindme 1 week
RemindMeBot · 2022-10-28 09:31
I will be messaging you in 7 days on [**2022-11-04 09:30:27 UTC**](http://www.wolframalpha.com/input/?i=2022-11-04%2009:30:27%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/emacs/comments/yf14tl/what_are_your_favorite_packages_for_improving/iu3o3iz/?context=3) [**1 OTHERS CLICKED THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fyf14tl%2Fwhat_are_your_favorite_packages_for_improving%2Fiu3o3iz%2F%5D%0A%0ARemindMe%21%202022-11-04%2009%3A30%3A27%20UTC) to send a PM to also be reminded and to reduce spam. ^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%20yf14tl) ***** |[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)| |-|-|-|-|
oantolin · 2022-10-28 09:36
Maybe because fido-mode imposes a particular completion style, namely `flex`, while icomplete lets you use whatever `completion-styles` you want.
AsterOps · 2022-10-28 10:31
I had a problem with completion of my hosts defined on in ~/.ssh/config file in TRAMP connections using fido-mode.
PriorOutcome · 2022-10-28 11:17
Found [https://github.com/mkcms/interactive-align](https://github.com/mkcms/interactive-align) fairly recently. Also the built in rectangle commands are really useful.
waxbanks · 2022-10-28 12:15
This thread is great.
deaddyfreddy · 2022-10-28 13:38
Actually, it can
deaddyfreddy · 2022-10-28 13:39
did you try `swiper-isearch` command?
deaddyfreddy · 2022-10-28 13:43
- ivy/swiper/counsel - avy - link-hint - smart-comment
_artua · 2022-10-28 14:26
\+++ Ye It's cover 90% use cases for vim/evil text objects
AlanYx · 2022-10-28 14:32
If you're editing prose, typo.el is worth using. It gives you smart quotes, easy access to different types of dashes, etc.
alga · 2022-10-28 14:52
I would just use `M-x isearch-forward RET` when recording a macro in your stead. I tend to forget all these rarely-used key bindings.
agumonkey · 2022-10-28 16:35
multiple-cursor whitespace-cleanup on save-file-hook
PivAd-2 · 2022-10-28 17:03
symex with evil Animated demos: https://countvajhula.com/2021/09/25/the-animated-guide-to-symex/ https://github.com/countvajhula/symex.el
github-alphapapa · 2022-10-28 17:18
For me it's the opposite: I like only having to remember one command, and I just keep pressing it until the region covers what I want.
karthink · 2022-10-28 17:52
[general](https://github.com/karthink/.emacs.d/blob/e0dd53000e61936a3e9061652e428044b9138c8c/init.el#L2413), [org-mode](https://github.com/karthink/.emacs.d/blob/e0dd53000e61936a3e9061652e428044b9138c8c/lisp/setup-org.el#L102)
yyoncho · 2022-10-28 19:07
I wouldn't go that high.
graduale · 2022-10-28 19:28
thanks!
AKmatiAK · 2022-10-28 19:57
olivetti-mode and maybe not exactly for text - valign for org tables. also, not a package, but font is also important for me, I use liberation serif
AKmatiAK · 2022-10-28 20:01
I also use meow, but I configured it the way that insert mode is default behavior. Imho this should be default or easily configurable.
AKmatiAK · 2022-10-28 20:02
meow better :P
[deleted] · 2022-10-28 20:34
[deleted]
thetemp_ · 2022-10-28 22:18
Do you mean that you start it in insert mode? Or something different?
thetemp_ · 2022-10-28 23:15
I see what you mean wrt repeating commands. It seems like that would be a pretty complex feature to implement, since it has to figure out how far back in history to repeat. Obviously doable, since Evil does it. I like things to be more minimal, but if I'd gotten accustomed to having that level of repeatability, I would miss it too. As for the keypad, I think most of the heavily-used commands in the C-x prefix use a control-modified second key. The important ones that don't use the Ctrl key can be bound in `mode-specific-map`, making them available directly under SPC. I've only done that for 5 bindings. "b" is probably the one I use the most. > I love seeing what text an operation will effect before I commit to the operation. Yeah, I think that's my favorite part about it. In fact, I'm a bit on-and-off with modal editing, and it would be really nice to have that feature even with regular Emacs bindings.
JDRiverRun · 2022-10-29 03:09
>I've tried to get into expand-region 2 or 3 times and always wind up uninstalling it. Actually I find embark often does a nice job of marking a local region of interest. Sometimes I wish there were a quick way to set point and mark from an embark selection. **Update**: as it always seems to go with embark, you already thought of that ;). Just hit SPACE.
DogLooksGood · 2022-10-29 08:06
For the use case: `ci(<text><ESC>` Besides kmacro, you can just copy the text after `meow-change`, then use `meow-replace` for following places. If there are some patterns(e.g. `foo(...`), you can use beacon state + `meow-visit`. For the leader key map, it's configurable. For example, if you have to rebind keybinds like `C-x b`, `C-x p`, `C-x n`, etc. Then how about setting `ctl-x-map` as the leader map.
xenodium · 2022-10-29 09:29
http://endlessparentheses.com/hungry-delete-mode.html Hungry delete mode. Got used to it pretty quickly.
hmelman · 2022-10-29 13:38
Things I haven't seen mentioned already: - wrap-region - which pairs very nicely with expand-region - visual-regexp - to clearly see changes from replace-regexp And I use outline-minor-mode, flyspell, and visual-line-mode
thoomfish · 2022-10-29 13:58
> If there are some patterns(e.g. foo(...), you can use beacon state + meow-visit. I could swear that `meow-visit` didn't work with Beacon mode, but I just tried it again and it worked, so that must have been some ephemeral config issue. That will definitely help. > For the leader key map, it's configurable. For example, if you have to rebind keybinds like C-x b, C-x p, C-x n, etc. Then how about setting ctl-x-map as the leader map. This is an interesting idea. I'll have to do some thinking/reading to understand the implications.
AKmatiAK · 2022-10-30 19:58
yes, and I set it the way that pressing esc takes me back to insert mode
Solatle · 2022-11-03 08:52
[aas](https://github.com/ymarco/auto-activating-snippets) with tempo (built-in). I use these to replace yasnippet and cdlatex for inserting templets and latex. Pretty neat.
tdavey · 2022-11-03 17:17
I have not tried swiper, so I can't comment on its superiority to isearch, but I can say that I have abandoned isearch() in favor of occur(). I like the ability to identify all the possible targets of a search at once. In the \*Occur\* buffer, one can use avy to go directly to the target match. Or, in the case of an overwhelming number of matches, one can narrow the search by running occur() on the \*Occur\* buffer itself. An occur() search can be repeated as many times as one wishes on the successive \*Occur\* buffers to drill down to the one desired match. Mickey has a very nice article on the conveniences built into occur(), such as renaming \*Occur\* buffers for future use and editing matches directly in \*Occur\*: [https://www.masteringemacs.org/article/searching-buffers-occur-mode](https://www.masteringemacs.org/article/searching-buffers-occur-mode). Not least, Emacs provides multi-occur(), for searching multiple buffers.
Pay08 · 2022-11-03 17:31
>I like the ability to identify all the possible targets of a search at once. That's pretty much what swiper does too but in the minibuffer.
tdavey · 2022-11-03 17:54
Thanks, did not know that.
trae · 2022-11-04 17:48
Thanks for linking to the packages.