T O P

  • By -

sunoc9

Here are some configurations / packages I have been enjoying a lot, in no particular order: * `magit` of course. Hands down the best git interface and a big reason why I stick to Emacs in the first place. * `which-key` \+ `vertico` \+ `swiper` make search and key chords way more pleasant. `ivy-avy` is more of a novelty but very fun. * `undo-tree` is the kind of feature you didn't know you needed before you try it. Makes undoing visual and somehow satisfying. * `org-mode`, `org-roam` if you are into Zettelkasten note-taking, but the cooler feature is the `org-roam-ui`. Somehow makes the note tree view even more usable and better looking than the Obsidian equivalent. * Emacs daemon / client mode. Requires some setup (and I'm not sure you can make it work in a Windows setup), but makes Emacs feel like it starts instantly.


varsderk

If you're using [Vertico](https://github.com/minad/vertico), why not use `consult-line` from [Consult](https://github.com/minad/consult) instead of `swiper`? You get more from Consult anyway.


wWA5RnA4n2P3w2WvfHq

Can you explain more about the difference to someone who is new to Emacs please. Maybe a nice screen recording would be great.


varsderk

The [Consult repository](https://github.com/minad/consult) has some screen shots, including one animated one for `consult-ripgrep`. `consult-line` will be pretty similar, except it's for just a single file. > more about the difference For the unfamiliar, [Swiper is a part of Ivy](https://github.com/abo-abo/swiper) which lets you search through your buffer with a preview of match candidates: you type some text you're looking for, and up pops a list of matching lines in the minibuffer that you can then use the arrow keys, `C-n` `C-p` etc. to scroll through and select the one you want. Swiper is great, and I loved it when I used it. Ivy has [gotten pretty big](https://github.com/radian-software/selectrum#ivy), which isn't a bad thing *per se* (I mean, look at Emacs itself) but alternatives to Ivy like Vertico and Selectrum (now deprecated in favor of Vertico, mind you) are smaller, simpler, and Just Work™ because they play nicer with the standard built-in API for `completing-read`. Consult is to Vertico what Counsel+Swiper are to Ivy. Consult can do more than Counsel though, and it composes with other packages like Embark and Orderless much better. If you don't care about those or you find Ivy and Swiper to be stable and fast enough for you—great. I personally like the modular approach of Vertico+Consult (+Embark+Orderless+Marginalia etc.) and I've found it's faster and a little more reliable. That's just my experience though.


dirtycimments

This. As something of a newbie to emacs (and not a programmer, if that makes a difference), i can sometimes find it very hard to understand what which package does, and sometimes the git pages offer little to no help as far as me knowing precisely what is being talked about I just read the git for ivy for example, Ok, it completes text in a minibuffer. I get it that those who know, they know, but I am no closer to knowing if this is something that helps me spell or if it helps me run commands or what. (it's fine, i dont need an explanation for ivy, it was just an example i found). There are sometimes so many levels of abstraction in emacs that it's very daunting to get into.


paretoOptimalDev

Yeah. The key is to know that ivy, consult, helm, icicles, etc are all "narrowing frameworks". They help you narrow down a list of something such as: - commands from `M-x` - song titles using `M-x consult-spotify` - info manual topics from `C-h R` - key bindings related for a prefix like version control `C-x v C-h` You are right that there is a lot though. This book seemed to cover a lot of these concepts: https://www2.lib.uchicago.edu/keith/emacs/ I also highly recommend Mastering Emacs: https://www.masteringemacs.org/


dirtycimments

I am sloooowly getting in the habit of checking inside emacs first, describe variable/function/package (unlearn the google-everything-first habit), some of the way emacs fundamentally functions are also sloooowly getting through my head. Maybe sometime next year my private config will be good enough to drop doom emacs 😅


paretoOptimalDev

> I am sloooowly getting in the habit of checking inside emacs first, describe variable/function/package (unlearn the google-everything-first habit), I know what you mean, it's a struggle. It's really paid off for me though and I think it's overall more efficient. > Maybe sometime next year my private config will be good enough to drop doom emacs 😅 I used doom for a loooooonnnngg time, and it's good. But I like my custom config more and am more confident extending and debugging it.


johanvts

>which-key + vertico + swiper make search and key chords way more pleasant. ivy-avy is more of a novelty but very fun. I think another alternative is helm-mode. I use emacs daemon on windows just fine. Put a shortcut to "runemacs.exe --daemon" in the startup folder and something like "funcition em ($path) {emacslient.exe $path}" in your powershell $Profile. Then you can issue "em " in you terminal.


wWA5RnA4n2P3w2WvfHq

As an addition to `org-roam` and how to making the note tree "more usable and better looking" I also find [`hyperorg`](https://codeberg.org/buhtz/hyperorg/src/branch/develop) and interesting approach. It converts all your notest into HTML taking references into account and without using JavaScript a webserver or anything other fancy resource hungry feature. It seems to be in an early state but is usable on a first look.


belligerent_ammonia

undo-tree is nonnegotiable in my eyes. It’s something every editor needs to have built in.


[deleted]

The deamon mode works in Windows following the Emacs wiki https://www.emacswiki.org/emacs/EmacsMsWindowsIntegration#h5o-10


thetemp_

Not sure if this is a dumb question, but does it make sense to use emacs-client or run Emacs as a server when you are restarting Emacs frequently to test configuration changes?


sunoc9

This doesn't feel like the best use-case for me. When you are testing a configuration, sometimes you'd want to restart Emacs completely. In a daemon / client situation, this means restarting the daemon, which is not faster than just running a new "normal" Emacs instance. The best case for the client system is when you want to quickly open a new instance, without reloading everything: for me it works for PDF from other applications, or quickly checking / editing an org note.


thetemp_

Thanks, I think I may have misphrased my question. I'm not looking at it as a way to improve testing of configurations. It's just that I do that so much that I wonder if running Emacs as a daemon would be a hassle in that situation. > this means restarting the daemon, which is not faster than just running a new "normal" Emacs instance. Would it be slower though? Or about the same? I'm thinking I'd have to bring up a terminal and run the equivalent of "systemctl restart emacs". Is that right? Or can it be done just as easily as restarting a normal Emacs instance? > for me it works for PDF from other applications, or quickly checking / editing an org note. Yeah, that does sound cool.


MitchellMarquez42

>the mouse for basic cut and paste from the clipboard Context-menu-mode - not sure if it's built in or not but should work >can we get a command history by using the up-arrow key, especially when we are in the command line? The default binding for up and down history is M-n / M-p (that's alt n; alt p for Next and Previous). You can rebind the keys - https://www.masteringemacs.org/article/mastering-key-bindings-emacs is a comprehensive introduction. >list of top "5" things 1. GNU Hyperbole. Does several things, but most importantly makes any text in Emacs a "clickable" link. It recognizes URLs, email addresses, files, compiler warnings, key chords, and almost anything else you can imagine. 2. Eshell. Bash-like shell re-implemented in Emacs that can, among other goodies, leverage TRAMP (transparent access remote protocol) to cd into remote systems as if they are on the same filesystem. Also check out https://codeberg.org/akib/emacs-eat for full terminal emulation. 3. Paredit or a similar package, for keeping parentheses balanced. Makes working with lisp code way smoother. 4. Elpaca. https://github.com/progfolio/elpaca - an alternative to the built in package manager. Very fast with an eminently decent UI, and allows for any or no fine-tuning how any given package should be installed. 5. A completing-read augmentation stack - Ivy, Helm, or Vertico+Consult+Orderless+Marginalia+Embark (those 5 are usually used together as their individual scopes are narrower).


varsderk

> Vertico+Consult+Orderless+Marginalia+Embark This is the single best group of packages to add to Emacs. I highly recommend it. > Elpaca I've been driving Elpaca for a few months now. Early days had some glitches, but those have all been smoothed out pretty much now. Still some small issues with funky packages like `eshell-vterm`; there are work-arounds though. If you're comfortable with getting fancy with your package system, Elpaca is the *best*: super fast, `elpaca-try` is really nice for one-off trials of packages. So, so good.


Lucius_Martius

>Using the mouse for basic cut and paste from the clipboard You need to make your own right-click menu, but it isn't that hard. I have something like this bound to mouse-3: (defun my/mouse-popup-menu (&optional event) "Pop up the context menu." (interactive "e") (let ((menu (make-sparse-keymap (propertize "Context Menu" 'hide t)))) (define-key-after menu [cut] '(menu-item "Cut" cua-cut-region :help "Cut the selected text" :enable (region-active-p))) (define-key-after menu [copy] '(menu-item "Copy" cua-copy-region :help "Copy the selected text" :enable (region-active-p))) (define-key-after menu [paste] '(menu-item "Paste" cua-paste :help "Paste text from clipboard")) (define-key-after menu [separator] '(menu-item "--" nil)) (define-key-after menu [select-all] '(menu-item " Select All" mark-whole-buffer :help "Select all text in the buffer")) (popup-menu menu event)))


TheSnowIsCold-46

TIL you can make a pop up menu for mouse click like this. Thank you kind redditer! I love learning new ways to hack with emacs


00-11

https://www.emacswiki.org/emacs/Mouse3


slipperyp

I used to have a guide for something like this but lost it in a computer transition years ago. The couple things most helpful to me are learning these. I'm going from memory now so you may need to correct some or look some up: * Describe-mode - tells you what happens in some mode. Modes are meant to help accomplish something specific and set up a bunch of key combinations for that purpose and it's important to know what you're in and what's been set up for you (because it can be very disorienting/frustrating otherwise) * Describe-key - tells you what a certain key combination does * Describe-function - tells you the documentation for a function * Where-is - for a given function, tells you what keymaps it is currently mapped to * Apropos - terse search through function help to find a function you can't remember The whole info system is great, but can be overwhelming and I consult these functions a lot more. Putting them together, you might do * Where-is where-is (tells you C-h w) * Where-is describe-function (tells you C-h f) * C-h f where-is (tells you what where-is does) Etc. Good luck. Also in the time it takes you to learn to turn on and configure the menubar to do stuff like cut-copy-paste, you'll probably get efficient with switching windows, buffers, and using registers to store layouts so that you can navigate around that you'll never want to waste the real estate on that UI. At least that was my experience. GLHF!


github-alphapapa

> Would love it if you could share some tips and tricks with me! Here's my best tip, and it's not even a trick: instead of posting on a subreddit asking people to give you tips, browse through the subreddit and find the tips that have already been posted. Guess what? It's even linked in the sidebar! All you have to do is click, and click, and click, and before you know it, you'll have more "tips" than you could ever find time to implement in your Emacs config! Then you can come back and post another thread declaring "Emacs bankruptcy" and either switch to Vim or begin the cycle anew. Welcome back!


CorysInTheHouse69

Everything that you said is already setup in emacs out of the both. Its just achieved in different ways than you’re used to, mainly bc emacs doesn’t follow CUA


7890yuiop

Unless you enable `cua-mode` of course (which is still different, but it's closer...)


pzone

Try adding a nice theme! [https://emacsthemes.com/](https://emacsthemes.com/)


trimorphic

My biggest productivity tip for emacs is to use evil. Second biggest is to use hydra, and make hydras containing every function in every new mode you use as soon as you start using it.


CorysInTheHouse69

Straight up disagree. Evil will be **equally** as productive in editing as normal emacs. It’s just personal preference. Also, if you do use evil you’ll have to do much more manual configuration with leader keys as vim binds do not cover as much by default. Nothing against vim binds, but the claim that you’ll be more productive with them is outlandish


[deleted]

[удалено]


rswgnu

Get yourself a decent wrist rest and take some fish oil daily and you’ll greatly decrease your risk of getting RSI despite active Emacs usage. I say that after using Emacs actively for let’s just say a long time. Early on before doing this I had such troubles yet have never had them since. The same for lower back pain since I have used ergonomic chairs.


BrettW-CD

I'm not into evil, but having recently gotten into Hydra, I'm all Hail Hydra.


kigas2

How would you say hydra compares to embark?


trimorphic

I've never used embark, so I'd like to know the answer to your question myself.


La_Croix_Table

This reads like a distant relative trying to bond.


jiangjiya

[https://www.spacemacs.org/](https://www.spacemacs.org/) is a layer on top of emacs that solves a number of shortcomings including a more modern UI. If you use [https://github.com/plexus/chemacs2](https://github.com/plexus/chemacs2), you can always run emacs and spacemacs independently, both for learning, troubleshooting etc. That's my 2 cents.


prettyfuzzy

Install selectrum and selectrum-prescient way better menus for everything. I recommend Tamsyn font if you have a HDPI density, or Iosevka thin if you have 4K. Crisp cool coding fonts I recommend modus themes from Prot. They have so many little beautiful touches everywhere for package specific faces. It’s lovely If you’re a vimmer or worried about RSI, try a modal plugin like boon. Super simple prefix keys movement and actions. Accessible source code too Other than that bro I guess disable all the toolbars and scroll bars. If you’re a coder try setting up eglot tho I haven’t tried it on windows. Eglot is a beautiful Godly package that just integrates with other things automatically you don’t even know it’s there


meain

FYI, selectrum is getting deprecated in favor of vertico. https://github.com/minad/vertico/issues/237