DEV Community

Cover image for How to never touch your mouse again 🐭

How to never touch your mouse again 🐭

Olivier Guimbal on August 18, 2020

VIM ? Well... no thanks. You may already have met one of those extremists which have explained to you how productive VIM is compared to ...
Collapse
 
rad_val_ profile image
Valentin Radu • Edited

TL;DR I think the advantages of using the keyboard peak at one point (i.e. basic editing + a couple of commands you use often in your IDE) and everything beyond is more trouble than it worths.

I was one of those "geeks" obsessed with Vim. Here's what I think 10 years later:

  1. There are lots of other things easier to learn with greater impact on my productivity than the way I edit/navigate code.

  2. Never touching the mouse is overrated. With all the options we have now, from multi cursors support to trackpads, using the "mouse" + a couple of keyboard shortcuts might be faster than forcing yourself to the keyboard alone.

  3. Finally (and this might be either crazy, either just me, or both 😅 because I never heard anybody complaining about it), I found that many of the keyboard only solutions out there are engaging my "conscious" part of the brain. For example, Jumpy, when you choose the letter combination to jump to: search, read the combination on screen, press the combination on keyboard. For a split second there, it breaks my line of thought, whereas using the trackpad doesn't. It's as if my hands are autonomous, but picking/reading that combination is not.

Collapse
 
oguimbal profile image
Olivier Guimbal • Edited

I agree, there are things that have greater impact on your productivity to learn.
But my experience was that at one point, when I started to really master most of the technology I use, not breaking my flow started to matter, and mouse was harming that.
Moreover, its not only about productivity, its about comfort. And sometimes, both are related.

As @leob mentioned, when I write "never touch", I dont really mean "never", but rather "almost never when writing code". We're not dealing with a lot of shortcuts to learn there, its only kind of arrow keys that you would place in the middle of your keyboard, plus a handful of other really useful stuff I do quite often (launching unit tests, ...). It's quite fast to learn, and it really changed the way I write code.

But again, I agree, there is an invisible line somewhere not to be crossed between "enough shortcuts" and "too many shortcuts", and I believe there is no one good answer for where it lies. I guess it depends on your feeling and your experience.

Collapse
 
gregorywitek profile image
Gregory Witek

I found that many of the keyboard only solutions out there are engaging my "conscious" part of the brain

Interesting! For me it's the other way around - because normally I keep both hands on the keyboard, using most of my usual shortcuts is very mechanical. When I want to use a mouse though, I need to move my hand away from the keyboard, put it on a mouse, and then find the mouse cursor on my screen - and I believe it's the last part that distracts my train of thought, because I need to actively look around the screen to notice it.

Collapse
 
rad_val_ profile image
Valentin Radu

Ah, but that's not what I meant. I was not talking about the regular, run-of-the-mill, shortcuts that definitely live in the subconscious (after you practice enough), but of the few solution out there that make you dynamically pick keys to complete a task (have a look at how Jumpy works for reference). Also, long combination of keys (usually in Vim) can't live in my subconscious either. It's like, I always visualized the sequence before tapping it.

Thread Thread
 
gregorywitek profile image
Gregory Witek

Oh, I get it now, thanks for clarification!

Collapse
 
leob profile image
leob • Edited

Cool post, but "How to never touch your mouse again" is a bit exaggerated - "How to touch your mouse less" would be more realistic :-)

P.S. case in point, interesting exercise - can you browse dev.to, and do anything you need, without ever touching your mouse? I guess you can, but I predict that doing so would take 2 or 3 times longer because there aren't good/quick keyboard commands for every conceivable action ...

Collapse
 
oguimbal profile image
Olivier Guimbal

I plead guilty. We're in a world of clickbait titles (which I despise) like "the 5 things you should know"... I guess I must have been influenced somehow :)

I must confess: I use vimium to navigate, but only use it moderately. I still use my mouse most of the time when not writing. But I switch between keyboard & mouse less often.

Collapse
 
gmeben profile image
Grant Eben

j, k, d, u all day

Thread Thread
 
oguimbal profile image
Olivier Guimbal

x, o and H also :)

Collapse
 
leob profile image
leob

Haha it's okay, yeah the title was a bit on the click-bait-y side but nothing too bad ... I guess it is possible (theoretically, and even practically) to work mouse-free, but I tend to stick to a middle ground, I'm a reasonably proficient keyboard user but I do reach for the mouse from time to time.

Collapse
 
ledux profile image
ledux

So you are telling us, instead of memorizing the shortcuts for the well known and widespread used vim key bindings, just come up with with your own set of keybindings to move around in the file by keyboard?

Moreover you suggest a bunch of other tools, which come with their own set of key bindings to memorize.

In the end you come back to vimium for navigating the browser, so you have to memorize vim key bindings anyway.

I use vim plugins for vscode (and whereever available), vimium for navigating the web, wasavi for editing input field in the browser (like writing this comment).

For everywhere else I bought the ultimate hacking keyboard, which only have letters and the number row. In return it has a modifier key, which allows for remapping keys to arrows, page-up, alt-tab, or even makros.

Collapse
 
oguimbal profile image
Olivier Guimbal • Edited

No, I am not telling you to use my shortcuts, I am showing you how I built mines. The difference being that you can use this article to craft yours if like me you dont like vim shortcuts.

Moreover, I specifically mentioned that for those who like vim shortcuts, there are vscode extensions that replicate them out of the box.

Collapse
 
ledux profile image
ledux

Sorry, I misread your intend then.

I am advocate of the vim bindings myself. One advantage of using these bindings is the wide spread of them. I don't need to memorize other bindings when I'm using vim, vscode, sublime text, the browser, or whatever.

That's why I stick to these and don't come up with a set of my own.

But everybody to his liking.

Collapse
 
jackmellis profile image
Jack

I still dont get it. I'd say I spend 1/3 of my day writing code, 1/3 thinking and planning, and 1/3 reviewing other's code. And then that 1/3 of code writing is only partly "in the zone" coding. I've never found myself thinking I was writing code too slowly...

Collapse
 
oguimbal profile image
Olivier Guimbal

For me, it's not about coding faster. It's about having one thing less to think about.

Like you said, I spend most of my time thinking and browsing through code. Not writing it. But using my mouse less often actually helps to do that with fewer distractions.

Collapse
 
gmeben profile image
Grant Eben

For me, the ergonomics of staying on the keyboard is a matter of health. My wrists and forearm (especially on my dominant arm) are prone to what might be described as repetitive strain injury. I find using a keyboard is less severe than a mouse.

Vimium is great. I've used a Vim plugin with IntelliJ for years and I just started using a Vim extension for VSCode. For development, I don't know if there's anything better than Vim shortcuts in a proper IDE.

Sometimes, it's a balance. I'll often use applications that are better suited to mouse interactions because there's no better alternative. A good example is git: I cannot stand looking at the green and red spaghetti of git diffs in a command line so I prefer to make the sacrifice and use the GitHub Desktop client instead.

Collapse
 
oguimbal profile image
Olivier Guimbal

Just to mention a git GUI I like: Fork :)

Collapse
 
pkubik profile image
Paweł Kubik

I was making the same argument about Vim and tried few interesting alternatives in VSCode, e.g. WASDMap (basically Alt + WASD for navigation). The problem I had was that I'm working on 2 machines with both VSCode and IntelliJ. It became too burdensome to synchronize all my ideas across both two machines and two editors.

Eventually I realized that Vim is such a neat standard. It's so popular that it's available almost everywhere. Plus Normal/Insert mode idea is quite appealing once you remap CapsLock to Escape.

At the beginning, I was actually quite fond of using mouse and arrow keys in the editor, but it suddenly changed when I started to enjoy working on a laptop from my balcony chair. Selecting text with a touch-pad seems completely wrong.

Collapse
 
andrewbaisden profile image
Andrew Baisden

Good post lots of useful info. If my Apple Mouse was still my main driver I would try to use it as less as possible because its just not that comfortable. However this new MX Master 3 is so ergonomic 😁

Collapse
 
vasilisplavos profile image
Vasilis Plavos

I use Listary listary.com/ and I am very happy of the free version.
It is like Switcheroo and on stable release.

Collapse
 
oguimbal profile image
Olivier Guimbal

Its more like a launcher, isnt it ? (Switcheroo is only a task switcher)
Seems interesting though.

Collapse
 
vasilisplavos profile image
Vasilis Plavos

With Listary you press Ctrl+Ctrl and you have a bar in front of you (like Switcheroo). With this bar you have access everywhere in the computer.

If you find the file you want and you press right arrow (→) it appears the right-click menu. It is really useful, I think that Microsoft has to implement a similar solution in Windows 10

Collapse
 
bartzalewski profile image
Bart Zalewski

Oh my god, I love this post! ❤

Thank you so much for sharing!

Collapse
 
fultonbrowne profile image
Fulton Browne

To add to what you said, if your on Linux I would recommend a tilling window manager such as i3wm, dwm, or xmonad. Those really helped me get to an almost mouse free work flow.

Collapse
 
calag4n profile image
calag4n • Edited

In fact, an autohotkey-like is available on Linux.
Don't know about macOs.

I'll try Jumpy, it seems to be the one I needed to finaly get rid of the mouse, thx 🖖

EDITED.

Collapse
 
oguimbal profile image
Olivier Guimbal

Really ? Where ? I'm interrested... I only found broken equivalents.

Collapse
 
calag4n profile image
calag4n • Edited

I use autokey-gtk available on Ubuntu's package manager , it has same features as autohotkey and some more.

Collapse
 
alexcavazos profile image
Alex Cavazos

Switcheroo looks great! Thanks for the share

Collapse
 
mjforclaz profile image
Marcelo Javier

Great article.
I always thought that Chrome should have a "switch to prev used tab" function such VS code and others editors do pressing CTRL + TAB. Do you know any extension capable to do this?

Collapse
 
oguimbal profile image
Olivier Guimbal • Edited

Oh yea, I do... I use it everyday, I dont know how I missed it when writing this article. See my edit !

And thanks :)

Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

Switcheroo is amazing! I wish I'd found it sooner. Thanks!

Collapse
 
oguimbal profile image
Olivier Guimbal

I'm not really the one to thank, but you're welcome :)

Collapse
 
yogiwisesa profile image
Yogi Wisesa

Great articles! thank yoU!