dustfinger an hour ago

My favorite way to move around in Emacs, and to move text around, is via avy-mode: https://github.com/abo-abo/avy. If you have not experienced avy-mode, give it a try, I think you will wonder how you ever got along without it.

  • globular-toast 25 minutes ago

    I don't think this was the first package to use the tree idea, but `avy-goto-char-timer` is amazing and is new since the first time I tried it. After activating goto with a key press you type as many characters as you like to get where you want. Often you can get straight there if it's something unique, but if not then it goes to the tree. It's amazing how quick you get at typing "def" or something to get to a Python function definition, for example.

    What I love about functionality like this is it's completely generic. It's just text. I don't need any lsp support to get me "go to def" or something. I can open a file in a language I've never seen before and use the exact same interface I'm used to to navigate around.

nine_k 2 hours ago

In short: turn Emacs navigation into Vim-like navigation, make the editing modal, and thus make navigation hyper-efficient. (If you like the idea, I would suggest taking a look at evil-mode if you come from Vim, or god-mode and devil-mode if you already are used to Emacs.)

A few useful pieces of advice beside that, too. The workflow the author describes is not how I prefer to do things, but the author mentions a number of important capabilities to be aware of: operating at sexp level, subword motion, etc. Narrowing and folding, which I like to use, are not mentioned.

No mention of LSPs or compilers, but these are their own large topic.

rickstanley an hour ago

Thanks for sharing. I've been off editor hopping for quite some time, nowadays I just use some pre-defined configuration like Doom Emacs, occasionally I try to build some environment, with AI help, from "scratch" for fun and curiosity.

I really like Emacs' flexibility + evil-mode and reactivity, recently I searched for something similar and found Lem: https://github.com/lem-project/lem, looks promising, I'll try it out and compare with Emacs when I have the chance and time.

mystifyingpoi an hour ago

I really like this, it's a bit hardcore, but for someone that really cares about efficiency (whether it is worth it or not - debatable), this is great.

Though I have one minor nit against one point, that I've seen basically in every similar article:

> This means no arrow keys and no mouse

I use Neovim daily, and there is no denying that 98% of the time, using mouse is less efficient than doing a fancy search or jump. But for the remaining 2%, it's provably true that mouse is better - like, selecting an arbitrary block of code (without {} or any keyword to hang on). So I always recommend leaving the mouse enabled. Just use it when it makes sense.

  • redpenguin101 15 minutes ago

    > But for the remaining 2%, it's provably true that mouse is better

    This is definitely true. The thing is that using the mouse is a habit, and until you break it, people find themselves instinctively using it in situations where it would be better to use the keyboard. So the 'hard' mouse disable is more of a 'going cold-turkey' type thing to try and break the habit. I agree that once it's broken it makes sense to relax this.

  • magackame an hour ago

    How using a mouse and incurring a context switch is better than just mashing j/k a couple of times in worst case scenario?

eichin an hour ago

Hmm, would be interesting to see a "race" between this and isearch; from the examples, it looks like this has an advantage only if you have lots of similar strings, so "the one you're looking at" vs. "typing more letters of the word" is an advantage? (externally timed, see The Humane Interface for details on how self-reporting doesn't actually work to measure this kind of thing)

OhMeadhbh 2 hours ago

Meh. I'm not a fan of modal interfaces. But if it works for you, then knock yourself out. I appreciate the write-up here. I'll give it a try to see if I can see what the author is talking about. The overwhelming majority of code I write now is in snippets inside text documents (think Knuthian Literate Programming) so I don't know how that would work w/ the author's modal setup. But they went to the trouble of documenting it, and it seems sort of like what `vi` people are always yammering about. Seems a decent idea to try to understand it.

emil-lp 2 hours ago

I've used Emacs for 20 years and I never learnt to navigate in a file except backwards and forwards search.

Is there still hope for me?

I think my biggest issue is that I am a slow coder and I never feel in a hurry.

  • redpenguin101 9 minutes ago

    If your workflow feels comfortable there's really no need to change it in my opinion. The reason I do this is to avoid the frustrating feeling that I'm spending all my time moving around in the text file rather than actually making the program. It's less about speed and more about feeling good while programming.

  • lvass 25 minutes ago

    Just type C-h t (help-with-tutorial) and work your way through it.

final_aeon 2 hours ago

In my opinion there's no reason to stick to the "old school" / classic emacs controls. They're archaic at this point.

I am an experienced emacs user and I still use CUA mode, arrow keys, and I wrote a package which completely overhauls built-in "word jumping" commands (called bbww on melpa.)

You don't need to worry about upholding traditional emacs orthodoxy

  • nothrabannosir 2 hours ago

    Disagree with this just because it makes everything else easier. The more you stick to common key bindings, the more intuitive various packages will be. Eg navigating lines vs blocks in a magit diff block is C-n and N respectively. Copying a full hash is M-w. All these bindings are intuitive “overlays” on conventional bindings.

    Emacs shines when packages combine to form a whole greater than the sum of its parts. Changing basic key bindings is the quickest way to vitiate that symbiosis.

    Unfortunately.

    And while they may be old school, traditional, and orthodox, they are by no means idiosyncratic. They’re widely supported: readline , bash, everywhere on macos, even modern browsers. Eg you can actually paste in bash: try killing something with C-w or C-k, and paste it back using C-y. Or transpose arguments using C-M-t. Navigate suggestions in Firefox using C-n and C-p. Bash even supports undo using C-/.

    All to say: learning emacs movement keys pays off.

    • v9v an hour ago

      Firefox opens a new window when I press C-n. Is this a setting that you have to enable?