145 points · by signa11 · 3y ago · 100 comments
EDIT:
More on topic: I tried, but the percentage of times when my stroke wasn't recognized was way too high for me. There's a customization variable that could help, but I have enough programmable buttons on my physical mouse[1] to get by with just them:
- scroll up/down
- tilt wheel left/right
- two small buttons for back/forward to the left of the left button
- dpi change button under thumb (can be made to send other events with Solaar)
So I can directly bind 5-7 commands that will work every time without risking the "stroke was not recognized" problem. And that's without modifiers and clever hacks like mouse3.el, which allow for (almost) directly exposing even more functionality. Strokes/gestures are slower and less reliable than this. They probably can be helpful in some configurations (I wonder if Emacs on Android would be the perfect use case?), but I don't feel the need for them in my setup.[1] https://www.logitech.com/en-us/products/mice/mx-ergo-wireles...
Fully open source, the mouse (that I own) uses QMK for its firmware. Which means I can use key binding layers rather than single buttons. In other words, one button acts like a shift button that modifies the action of the other buttons. So I have easy access to page up/down, mission control (what was exposé in macOS), paste plain (shift+option+cmd+v), etc etc. I don't have anything Emacs specific on the mouse, but my keyboard (Keychron Q10) has several macro keys that I have meta-x and ctrl-g bound to.
> Fully open source, the mouse (that I own) uses QMK for its firmware. Which means I can use key binding layers rather than single buttons.
On this topic, I bought a System76 laptop this year, and I'm in love with its keyboard-configurator. The firmware for the keyboard is also fully open source, and the GUI configurator is really excellent. It's a little limited in WHAT you can bind (without going down the rabbit hole too deep), but there are no limits at all on WHERE you can bind it, and it's beautiful. I made both left ctrl and fn work as ctrl (I could have made fn into hyper, too) and this is the first keyboard where I was able to do that (my previous laptop, Thinkpad, could only swap ctrl/fn functions).
Open source firmware FTW! :)
> Unlike claims by either keyboard or mouse advocates, when I do experiments myself, the results are mixed. Some tasks are substantially faster if I use the keyboard and some are substantially faster if I use the mouse. Moreover, most of the results are easily predictable (when the results are similar, the prediction is that it would be hard to predict). If we look at the most widely cited, authoritative, results on the web, we find that they make very strong claims that the mouse is much faster than the keyboard but back up the claim with nothing but a single, bogus, experiment.
In other words: it depends, and common sense is still the best guide. :)
> The stopwatch consistently proves mousing is faster than keyboarding.
I like to think that the goal of optimizing my editing workflow is not (necessarily) making it objectively faster, but rather making it feel faster so that the frustrations are removed and the experience is smoother.
This is, of course, my entirely subjective take.
In practice: if, while in deep focus, I can e.g. navigate the project via muscle memory, this means I can keep thinking about the problem domain. As opposed to pausing to hunt and peck an icon or a token.
Note: I use IntelliJ IDEA that has full keyboard navigation and mouse navigation.
When coding, reaching for the mouse is an irritating distraction. When reading, though, if you have enough actions bound to the mouse, I find mousing to be much more convenient. Mainly because I can eat my sandwich with one hand while still navigating and making minor changes with the other hand. Many mice and trackballs (my preference) offer just enough distinct buttons/events to bind almost everything you'd need to do during a review of some code, for example.
Default bindings for the mouse in Emacs are all wrong for this - most useful things are bound to C/M-<mouse-x>, and pressing C or M with a hand holding a sandwich is neither convenient nor hygienic. I'm now trying to remap the useful things so that they are accessible with only a mouse.
Apparently a lot more claiming evidence exists than sharing of actual evidence. One of the few things shared was a pseudoscientific explanation that stated precisely the opposite of your (and my) subjective experience: That using the mouse is less distracting and can be better committed to muscle memory than "command keys".
I think that is patently false, and don't thing Tog should be taken as anything but a marketing hack.
Disclaimer: my knowledge of Tog is limited to what is presented in that Dan Luu article.
This pretty obviously wrong unless measured on very specific audience for very specific tasks. You need not to be an Emacs/Vim afficionado to know that e.g. ctrl-s, ctrl-c etc. are faster vs moving mouse to an icon, or clicking out a context menu. That's why like everyone with an experience of using a desktop of more than a year uses at least a few hotkeys
So I would take those quote as selection biased.
Now I guess I need to say this, if you find yourself intimidated or put-off by keyboard-centric workflows THATS FINE. I think the real problem is we assume that keyboard workflows are necessary for mastery, especially when we first start, and so people get all defensive about not jumping into vim/emacs. On the flip side, if you did embrace this way of life and actually do look down on people who don't, stop, you're making it harder for everyone and giving us keyboard warriors a bad name.
I got the bug after years of playing sc2. It gave me an innate sense for how to do a series of actions quickly and mechanically while leaving my mind free to do more strategic thinking. I just can't get enough of this mindset which is why I try to cram it into every app I can.
But I'm having to come to terms with the fact that new generations of programmers don't know how to touch type, let alone adopt emacs or neovim. Hell, people are starting to use chatgpt to just yell at their computer to create code with their damn voice, which would make keyboard-centric workflows akin to writing in cursive, an overly-specialized skill that will be seen as increasingly obsolete as new forms of communication overtake them.
I won't lie, that makes me sad on a level, but it would be unrealistic of me to expect others to go through the same training I did when it simply isn't as relevant to their lives.
I don't buy that at all when a human being is involved. There are tons of actions I know perfectly well how to achieve with either the keyboard or the mouse, and which of those I unconsciously choose at a given instant varies based on what else I'm thinking about, precisely how I'm physically positioned, and just how I'm feeling. There no problem with that.
I've realized recently that (for me) mouse interactions come more naturally for more exploratory or creative work. I'm happy with my mouse! and yet for straight coding, or writing, I would rather keep my hands on the keyboard. It's fun to get good with all the tools(toys)!
(with-eval-after-load 'evil-mc
(global-set-key (kbd "C-<down-mouse-1>") 'evil-mc-toggle-cursor-on-click))
You would just click, click, click while holding Ctrl and then you can edit a bunch of things simultaneously.It's in the context of inconsistent keybindings across different apps, and the pertinent detail is, "It takes two seconds to decide upon which special-function key to press".
Contexts where you instantly know the keys to press are different from what the $50MM research studied.
Some other gestures are puzzling, like
> Middle click to paste a link from the clipboard. (This is only for clarity, it’s unrelated to the actual action.) Then use a mouse gesture to git-clone from that link to a prespecified directory.
I wonder how many times per day one has to clone repositories before one could remember that the gesture for that exists and how to perform it in the right way. It takes training.
I clone repositories not every month, maybe I even spent at least one full year without cloning anything (long running projects.) But OK, I'm sure there are people that have to work with many different repositories at least every week.
(That said, my workflow involves cloning as often as a couple of times a day if things are going well; SSD space is basically free, and --reference-if-able means a clone-per-branch is cheap, and my "work on this" script spins up a docker image and a fresh build too, after cloning and switching. So, while the described shortcuts would make sense in my "world", I've already automated way beyond that :-)
(I've actually had mouse-based workflows sometimes - I normally prefer a trackpoint, not as a mouse substitute but as "save me from doing weird contortions to keyboard-orient absolutely everything" - but the times when I've been a tech lead and spending excessive time in spreadsheets and planning apps, I've hooked up a relatively fancy mouse and started to develop more mouse-oriented shortcuts. Fortunately I've escaped from that :-)
I suspect that, despite it all, there's something very useful about being able to see a bit of text and to physically "go to it" like one might with a pen or a highlighter, that for many has less overhead than trying to "think your way towards describing where it is?"
A few months ago, I redid my emacs config, and decided to allow mouse interaction again. Honestly, besides occasionally scrolling in a long document, I haven't felt the need to use the mouse at all. The keyboard just works.
I didn't gain the ability to use the mouse to interact with Emacs till 2010 because before then graphical Emacs on Linux had bit-mapped text that I hated to look at (the main issue's being that it clashed horribly with the text in all the other apps I was using, including my browser). When text rendering in graphical Emacs improved and I started being able to use the mouse in Emacs, I realized I had made a big mistake in not taking the trouble to acquire the ability to use the mouse in Emacs earlier: the MacOS port (called "Carbon Emacs" IIRC) had had satisfactory text rendering (and mouse support) for many years and even if I wanted to avoid switching to a Mac, I could have switched to graphical Emacs years earlier if I was willing to compile Emacs from source (and setting a flag to choose the GTK front end, not to be confused with the more recent PGTK front end).
The point is that I regret letting myself be influenced by the comments on this site to the effect that the pointing device is unimportant.
(Also, in a survey of Emacs users a few years ago, 80% report using graphical Emacs rather than using Emacs via a terminal interface.)
A large part of the emphasis of "keep your hands on the keyboard" is aimed at beginners. Well, at least in the case of Vim bindings. Learning such keybindings has a steep cost; while learning them, it's always going to be more practical to just use a mouse. But, once you learn them, then it's often quicker.
For keyboard-driven programs, I'd say a (well-configured) Emacs is the gold standard.
OP makes the suggestion that using the "strokes" package functionality will have some advantages over keyboard binding. -- If it works for the user, sure. But, I'd worry about stroke recognition.. and it doesn't seem to me that memorizing a mouse stroke is going to be easier than memorising some key sequence.
In Emacs, if there's some command I want to run, I'll invoke the "execute-command" with "SPC-:", find the command, then look at the keybinding next to that so I can rehearse using the keybinding.
I don't think I can remember the last time I needed to resize a window in Emacs. I think. Also selecting window with a mouse simply would never work for me, because I need to select them by title in most cases. This claim OP makes is just absurd. If OP was honest, then they'd wrote "in some very special and simple cases, which don't happen in practice" using mouse for selecting and resizing windows may be faster." Which doesn't have the same ring to it, obviously.
> and drag and drop support
I don't feel like I'm missing something if I don't have this feature. Whenever I'm faced with this feature in other programs, I'm very much annoyed I cannot accomplish the action associated with this interface in a different way (unless performing the action precisely is somehow rewarded, as in maybe it's a part of the game where you have to prove you can do things very precisely)
> are very intuitive
I don't care. The point of using professional tools is that you learn and practice how to use them. Intuitive is for buy-in, it's not for being good at.
> The stopwatch consistently proves mousing is faster than keyboarding.
Did this measurement incorporate precision? I seriously doubt that. Most importantly, mouse is only a solution for things that are or can be made visible on the screen, and it also requires paying attention to what's going on on the screen. You cannot use your mouse while at the same time looking away from the screen (which I often do), or by trying to access functionality that isn't already on the screen (which is very often what I need to do, like, accessing a particular buffer, or calling a particular command).
In fact, mouse is so rarely a solution for anything I need to do during editing that even if it was faster for a very few things it can do, I still wouldn't care because I'd value uniformity of interface over negligible speedups in very few cases.
> When working on something that involves Emacs and one of these mouse driven applications, having to move over to the keyboard for the Emacs bit is exactly the friction we’d like to avoid.
This is some cooked-up case. No. This isn't needed. No, I don't feel like I need to botcher the way I use Emacs because I also like to play video games or do some digital drawing every now and then. There's absolutely no need for that. All the cases OP describes already work well without needing a mouse, or are just worthless. For example, when you want to clone a Git repository, you need to either set the current directory appropriately, or specify the directory you want to clone it to. In either case you'd be dealing with Emacs navigation in your preferred way, which would be the bulk of work necessary to accomplish the action. Then pasting something like a link to a Git repository is just one keypress (eg. Shift+Ins) and you are done.
Basically, someone got excited about Strokes library, even though it doesn't do anything useful. Maybe it was fun to write, or fun to theorize about how it could be useful in some counterfactual world... but, in reality, I'd never use that and wouldn't feel like I'm missing it, even after I've learned that such a thing exists and what it does.
In most cases windows resizing, moving and usually selecting and scrolling (with chiral scrolling) are faster and more convenient by an order of magnitude.
And reaching out to a (central) touchpad takes about as much effort as reaching any keyboard key.
People should really give them a chance; unfortunately many are mislead by the Emacs and Vim's docs, but when they were written touchpads didn't even exist.
Emacs's docs are updated constantly, up to this day. And in there are mentioned both "touchpad" (5 hits) and "mouse" (660 hits).
Have they updated just some simple references or the spirit of the docs?
I actually realized that the current Emacs docs have less old cruft than they used to (e.g. about the meta/alt thing).
I should have said docs, guides and articles anyhow (which were not written before the invention of touchpads but usually carry on the keyboard-exclusively myths).
Could you please expand on this?
Some laptops' keyboards are not bad at all, although it comes down to personal preferences
i'm 26 now and cannot imagine life without it
Then what do you do with it? Is the UI reproduced anywhere else? Does it have LSP/intellisense support? Can it be automated through various means, such as macros? Etc.
I love using acme spread across the two big monitors on my desktop machine. I can keep so much code, so many files open and visible and easily-interacted-with. However, on my laptop, I use emacs, even though emacs' frame management NEVER does what I want (go to definition? Opens in the current frame. Ugh.)
If you need to do anything aside from what this video suggests acme is capable of, do it with something else.
As a concept, acme was definitely ahead of its time.
* Which is often not where I need the cursor to be for some vim commands
I am really fast and precise with a real mouse. Not so much on a trackpad and trackpoint. Easymotion is a good middle ground.
“Select text” seems (IMO) like something where these microbenchmarks have an obvious flaw. If you set up an artificial test like select a continuous line of text from an arbitrarily formatted file, the mouse might be better. But we’re programmers, right? We make our code nice and tidy. Usually I want to select a whole line in a file that has line numbers. So for line 10, 10ggyy in vim. That’s pretty quick.
Or I want to select the first couple columns of multiple rows. Ctrl-v, repeat j as many times as you’d like. I actually have no idea how to do that with a mouse.
Anything more complicated, I begin to wonder if we want a macro, find-replace, or something else.
A mouse might be better for interacting with GUIs and images but those things simply shouldn’t be done. Text is the correct way to communicate.
better call your mom and tell her to replace all your baby photos with textual descriptions since those are the "correct" way to communicate and one simply should not interact with images
...
if the comment I'm replying to was sarcasm, it went completely over my head. Poe's Law applies here for sure.
Baby pictures, I don’t think they communicate much. They evoke feelings that are already in the mind of the viewer.
I mean, it is basically a universal experience, to be shown pictures of other people’s kids and nod along understanding that they are justifiably excited about the objectively boring things their kids are doing, right? This is because they are excited about the ongoing journey that picture acts as a landmark for, which we aren’t a part of.
So, I suppose there must an example of an image that communicates something useful out there, somewhere, but the two of us haven’t found it yet.
Though even for text-based development, it's worth looking at Bret Victor's "inventing on principle" talks - it's more about the discrete vs continuous boundary (and that more things are honestly continuous than you might assume.)
” We’ve done a cool $50 million of R & D on the Apple Human Interface. We discovered, among other things, two pertinent facts: Test subjects consistently report that keyboarding is faster than mousing. The stopwatch consistently proves mousing is faster than keyboarding. – Bruce Tognazzini ”
The question one needs to ask from oneself - am I a poweruser or do I just enjoy yak shaving.
I used to configure everything ”so it’s exactly right for me”. At some point I switched to mostly using default options for everything, and if given the option, choosing what ever had best default options (for myself). I like my computer use much more nowadays as stuff tends to ”just work” and I can focus on actually just doing stuff.
I'm not going to try to prove the opposite, but after some number of DECADES it's worth checking on followup research. Here are some good places to start:
https://ux.stackexchange.com/questions/30682/are-there-any-r...
https://skeptics.stackexchange.com/questions/4355/is-using-a...
https://news.ycombinator.com/item?id=2657135
the keyboard vs mouse controversy is an evergreen
Why people love blaming Emacsians for having an obsession with configuring everything "so things are exactly right for them", I will never understand.
It's not about configuring for the sake of configuring. It may feel that way in the beginning, but after a while, it becomes simple to make stuff "just work," as you say.
Take this simple case of dealing with URLs, for example. I share tons of URLs with my colleagues, and I have to consume tons of URLs shared with me. Every single day. So, I have a way of sharing the exact places in the code. What it does is it figures out all the relevant information:
- The repo
- The Git branch
- Fully qualified name of a function or a line number
And then it creates a Markdown Link with a description and the exact place on GitHub for that line of code. It takes me a single keystroke to share that with my teammate and I don't even have to leave my editor.
My teammates may not bother with doing the same thing manually. They would just share a link without a description. And when the URL looks something like: https://github.com/foo/bar/blob/fbf7e86b8e8372e460af5a283c05... it's impossible to tell what that thing is about without opening it in the browser. Well, again using a single keystroke, I can convert it to Org-Mode or Markdown. It goes to GitHub, logs in using my token (because it's in a private repo), and figures out what that thing exactly is, giving me a URL with a description. I can store it in my notes and search for it later.
So the question you really need to ask yourself - are you a power user or a programmer? I am the latter, so I don't feel that writing code that makes the computer do exactly what I meant it to do is a waste of time. I write code so I can focus on actually doing stuff. And if I need to spend an hour to write some code that makes me just 0.01% more efficient, well, fuck it, why not?
this must be the impulse behind the yoda and similar[1], but these still don't do it for me: i could not comfortably daily drive anything that solders into a cherry mx footprint, and any mech switches i like would demand a costly, time-consuming from-scratch build.
some mac accessory makers have put out a wrist rest that mounts a magic trackpad in front of an apple keyboard, which sounds like it could be really cool adapted to fit a “proper keyboard”, but user testimonies are that the lack of palm rejection drives them nuts.
for reference, a trackpad to the right of the keyboard defeats the purpose from my point of view, as if i'm going to perform a whole-arm motion to access a different input device, i may as well have my hand land on my trusty wireless mouse: if it's good enough for getting headshots it's good enough for selecting text, plus i get proper mouse chording, which i must admit to missing over in trackpad land.
so, laptop it is. here's hoping my spine doesn't hate me when i'm fifty.
Can you set it up to:
1. have tabs (like in Vim)
2. have the command bar/line/whatever it's called at the top
? :-)
> have the command bar/line/whatever it's called at the top
I think what you mean is called a mode-line: https://www.gnu.org/software/emacs/manual/html_node/emacs/Mo... (or do you mean the thing where you type commands, like C-S-p in VS Code?)
To make it display at the top of the buffer window you'd need to repurpose a header line with some custom config. There might be a package for it. Do you have a screenshot of how you'd like it to look like?
And I'd want the results to drop down not to climb up.
Whereas, a trackball is roughly the same as a mouse. (Albeit, much more comfortable to use, IMO).