markdown guide
 

Learn vim by setting your default terminal editor as vim and download a vim keymapping for your favorite IDE. You can even further the experience by downloading vimium for Firefox or Chrome. It will get you far in most systems.

If vim isn't your thing, learn the shortcuts of your favorite IDE and of your OS.

If like me you typed for the last 20 years with weird bad habits, now is a good time to learn touch typing. It makes typing easier and you'll learn your shortcuts faster.

It is a habit thing, first week feels clunky but surprisingly you muscle memory builds up rapidly.

 

Definitely agree with turning on Vim emulation in your preferred editor. It can feel immobilizing at first, but it pays off quickly.

 

I mean it's the best of both worlds: You get all the awesome features of a modern IDE while using a powerful text input tool

 
 

First decide why you want to break your dependence on the mouse. Different goals will have different approaches.

Physical Concerns: Many people suffer from wrist/arm/shoulder/back issues due to using the mouse. I'm in this camp. I now use a left and right mouse to reduce one-sided stress. I try to only play games that use a game controller. I have a vertical mouse. I do stretches and exercises. I tried a controller->mouse pointer driver once, as well as keyboard driven pointer -- both difficult, but an option if necessary.

Speed: A lot of things are faster if done on the keyboard. The first of these are basic computer operations. Learn to do as much as possible in the console -- learning Bash helps. This also gives more flexibility when managing files. Learn shortcuts in apps. Learn about global shortcuts in your OS. Even before shortcuts, learn basic app operation, like menus, via the keyboard. And of course learn touch typing if you already haven't -- I consider this a prerequisite to be a programmer though, even if you're the mouse using type.

Both of these will take practice, but neither of them require a discrete switch -- they can be improved over time. Though it will take a conscious effort to do it, forcing yourself a bit in the beginning.

 

The most drastic option I can think of is to just unplug your mouse and put it away. That might not be super realistic though since you'll probably come across a website or software that just wasn't designed for use without a mouse. I did this when I first got a drawing tablet. Helps you get used to visualizing the area of your screen as the little rectangle sitting on your desk.

The most likely step would be to either print off or download all the keyboard shortcuts for whatever software you're using. Even Reddit and Twitter have keyboard shortcuts for navigating through posts, upvoting/liking, etc.

Knowing keyboard shortcuts keeps your hands on the keyboard which means less time moving back and forth and more time just working.

 

I'd say, 3 things:

  • Find ressources that shows shortcuts for your most used apps (IDE, web browser, OS). By reading through it, you might find some that you never thought could exist but are a huge time saver.
  • This might by hard at first, but try unplugging your mouse directly. You'll be more enclined to find workarounds that way. (I once had a half-broken mouse and was so annoyed with it that I became used to not use it at all)
  • Finally, embrace the almighty power of the TAB key
 

invest in a good mechanical keyboard. you'll enjoy the sound and feel of your typing so much that you'll naturally use your keyboard more.

bonus: mechanical keyboards can be customizable

 

Switch to using the mouse on the other side.

I recently started having issues with some of my fingers on my right hand. Probably CTS related or so. Anyway, because of that I started using the mouse with my left hand. It turned out that it's got rather cumbersome to use most keyboard combinations with my right hand, so this kind of forced me to switch to using just the keyboard more often than before.

 

My best advice is don’t learn everything at once. Identify the areas you use the mouse the most and learn those keyboard shortcuts first. Maybe it’s something as simple as saving OR maybe it’s text selection. Once you learn those shortcuts, find another one. Over time you can slowly build up a knowledge base that will help take you away from the mouse.

I still use the mouse more than I’d probably like, but I’ve started this approach and am seeing great success!

 

Crtl + shift + p

Opens up this command prompt type thing in VS Code. You can search files, run the program, debug, open files, convert spaces to tabs.

If it's something you can do in VS Code, you can do it within this tiny but awsome window!

Like Alfred, but specifically for VS Code!

If you have a Mac:
it's shift + command p. Taken from here code.visualstudio.com/shortcuts/ke...

 

I used to work in marketing and was the office MS Office expert, especially in Excel. Learning keyboard shortcuts saved me time and let me concentrate on the task rather than the process. But it takes time to really get to the point that the percentage of mouse time is notably smaller. Start out learning just a few at a time. Don't try to learn them all at once. Initially, concentrate on those 1) in menus since they will be marked what they are in the menu, and 2) you find yourself using the most. Easier to remember them when used as you work rather than trying to just memorize. The more you learn, the easier it gets to learn new ones. One of the most important KB shortcuts for ANYONE to learn are the app switchers (Mac: [Command] + [tab]; windows: [control] + [tab]). They both work exactly the same (well, except in the Mac OS you can click on the icons in the app switcher rather than having to tab, tab, tab, tab....). Next learn the selection/navigation modifiers ([shift], [option/alt], and Mac: [Command] & Windows: [control]). One thing I like better in Windows than the Mac is the use of [home] and [end] in the navigation cluster. In the Mac OS to do the same things you have to [Command] + [left] and [Command] + [right]. So to select from insertion to end of line in Windows is [shift] + [end], but the Mac OS makes you [Command] + [shift] + [right]. Minor but annoying when you switch between OSs often.

I apologize up front for the length of this, but here goes .... If not a Mac user, skip the rest of this ... novel.

The rest of the advice applies to the Mac OS. While I dual boot my Mac (I use W7 because it was the Windows OS closest to the Mac OS and I used it for over twelve years at work), I spend nearly all my time in the Mac OS these days.

Still with me? Good. Go to the keyboard preferences and turn on "Show Keyboard viewer in menu bar" to make it easy to open the KB prefs (albeit with the mouse). Then go to the Shortcuts tab. Go through and remove every default shortcut you don't use, but especially all those you likely won't ever use. You really will not need the vast majority of the items listed, and the removed keystrokes become available for the next step: making your own. Just keep in mind not all shortcuts are in that list so you can still run into conflicts.

Best way to learn a shortcut is to make it easy to use and make it make sense. There are a lot of tutorials online to walk you through the process of creating KB shortcuts. You add new shortcuts to Services and/or App Shortcuts, but you can modify the shortcut for anything in the list regardless of the section it's in. Some app-specific menu items without their own KB shortcuts you might find you use frequently can have a KB shortcut added in the App Shortcuts. For example, I use Notes ... a lot. I added two shortcuts to toggle the Folders sidebar (F19 for view and hide). I added shortcuts for bulleted lists ([Command] + 8), dashed lists ([Command] + [dash]), numbered lists ([Command] + 0), strikethrough ([Command] + [shift] + [dash]), and monospaced style ([Command] + [equal]) for code. Combined with the "shipped" or "out of the box" shortcuts for Title, Headline, and body I rarely need to click (menus or to make a selection) to modify text.

Extensively customizing the shortcuts only really makes sense if you spend all (or nearly all) of your time on one machine. If you use more than one machine and you can't customize the shortcuts because other people use them, too, just stick with the stock shortcuts. A Time Machine backup will put all your settings on a new machine, whether to duplicate or move on from an old machine.

Someone mentioned window management. For all my windows, not just Terminal, I use four apps but you can likely get away with just one of them. I use Magnet, Moom, Breeze, and Divvy. Magnet because how easy the initial setup is, Moom because it can remember and "play back" multiple app/window locations/sizes, Breeze for something called Saved States (I use for one window at a time that might not conform to the "standardized" sizes in Magnet), and Divvy for ad hoc window sizing and placement (tho Saved States works for odd sizes that have to be repeated). Most people can get away with just Moom. While not as easy to set up basic window placements and sizes as Magnet, Moom can be configured to do the same things: full screen (closer to maximize in Windows than to Apple's less-than-ideal, full-screen takeover), half screen, quarter screen, and vertical columns of one-third and two-thirds. I also created sixths (two rows of three) in Breeze.

I configured the window-management KB shortcuts to work logically off the keypad. [Command] + 1, 3, 7, 9 put a window in one of the corners. [Command] + 4 or 6 are left or right. [Command] + 8 or 2 are top or bottom halves. [Command] 5 is "maximize" (great for IDEs). [Command] + [equal], [divide], and multiply are three columns of thirds. Add [shift] to [Command} + [equal] and [multiply ] to get left and right two-thirds. [Command] + [pgup] and [pgdn] move the windows between screens (tho [Command] + 4 and 6 will do this too). [Command] + [shift] + 7, 8, and 9 are one-sixths across the top row. [Command] + [shift] + 1, 2, and 3 the bottom row. While running over to the keypad doesn't seem much better than the mouse, it still avoids having to grab a window, dragging it around, then grabbing a side or corner to resize; not to mention how much more accurate and neat the arrangement is versus manual arrangements.

Once I have a working configuration based on the project, I save all their positions with Moom and create an AppleScript to open all the Apps from the Services menu item from any app. That allows me to open, say, XAMPP-VM, Mail, Messages, FaceTime/Skype (or similar), Slack, VS Code (or similar), Firefox, Opera, Notes, and a Finder window (open to the XAMPP-VM https directory). The script pauses to ask if the lampp is running before it opens anything else because Firefox and/or Finder often open files on launch that don't exist until the VM "drive" is running. The slowest part is starting the XAMPP-VM (haven't taken the time to automate those clicks... yet). Then, I select the appropriate saved configuration from the Moom status icon to move them all where I need them. Almost regardless of the number of apps/windows required for a project, I can go from landing on my desktop after signing in to working in just over two minutes. Plus I don't slow my computer's startup sequence with numerous, possibly unnecessary, applications launching as I get to my desktop.

Finally, sometimes the mouse is best, but there are things you can do to make mousing more efficient. I'll spare you that dissertation (unless someone posts they want me to). Let's just say, the Dock was, but is no longer, a part of it.

Whew, SSL! I hope at least some of you made it this far ... and actually got something of value.

 

I'm a C guy using notepad++. I still use my mouse when "necessary". Sometimes it makes sense to just use the mouse. but trust me, using the keyboard is fast and enjoyable. Try to use your command prompt to do simple tasks like starting your code editor. That should get you started.

 

I'd recommend you switch your code editor to VIM or Emacs, the learning curve is a little bit steep but in the long run If you want to be less dependent on your mouse when you code it's a good start.

 

Change your mouse from right to left hand.
Try to slowly learn all the commands from all of the programs.
Use vim/emacs or vscode with vim/emacs plugins.

I personally did all of the three things.

I'm thinking about learning tmux. But haven't done it yet.

One additional thing: I start apps with either Ctr + windows and the name of the or Alt + F2 (I'm on manjaro at the moment, and I use xfce).

 

This is what I use:

 

Home row arrow keys, hands down.

An old colleague changed my life by turning me onto having home row arrow keys. You can achieve this pretty simply by remapping caps lock to something like fn or ctrl and then setting a macro so when that is held the ijkl keys they become arrow keys. This has made my productivity with a keyboard skyrocket! It works for all aspects of the your OS and you don't need to learn crazy new key combos or anything, just get used to not moving your right hand.

This app helps remap the keyboard for this:
github.com/tekezo/Karabiner-Elements

Feel free to reach out if you want my settings file for how to remap :)

 

I'm not an expert here but have had similar plans. I know you can do everything with Vim shortcuts. VSCode, Chrome, and then maybe learning mac keyboard shortcuts. And then put your mouse on the left side of your keyboard.

 

Look for tools that support keyboard-driven workflows (vim, tiling window managers, command-line over graphical tools, browser plugins like surfingkeys) and recognize that you're going to have to adapt how you've become used to manipulating a computer and that it's a process.

And take it slow! I think "unplug your mouse" is extremely bad advice, or at least shortsighted. Depriving yourself of a useful tool simply because you want to learn another in more depth breeds resentment and increases the odds of giving up. Use the keyboard because it's faster, use the keyboard because it's better on your wrists, but above all use the keyboard because you want to, not because you're forcing yourself to.

 

Try out a tiling window manager like i3 or BSPWM! Vim or vim-like bindings for your editor are also an excellent start. cVim inside Chrome means that the only thing I ever have to use a mouse for is clicking links.

Pro-mode: get a programmable mechanical keyboard (something that runs QMK) and bind browser/editor key combos directly into your keyboard

 

If you are using macOS and you are looking for a tiling window manager, you can look into chunkwm combined with skhd.

 

The easiest is to grab an application that shows you the keyboard shortcut every time you perform an action with the mouse. For example, if you use your mouse to click Edit > Copy, these programs will pop up the shortcut (Ctrl+C for Windows or Cmd+C for Mac). For Windows, there is Keyrocket and for Mac there is Eve.

 

Make using the mouse a thing that you notice, because you almost certainly don't notice it right now. Put something on your mouse like a post-it note. It'll feel a little uncomfortable to use, and each time you reach for it you'll notice.
Once you're aware (in more than a vague, goal-oriented way) of how much you're using it, think each time you use it, "did I need to use the mouse for this action?"

 

I've seen quite a few guides on VIM but I cannot for the life of it get it to show the same screen with file directories and all the other bells and whistles. Any good articles you might recommend in the sea of the ones out there already? I'm looking to make this switch as well asap.

 

Try spacemacs, if emacs doesn't work for you there is also spacevim :)

These two projects have very nice defaults so you don't have to worry about a lot of stuff.

 
 
 

Use the proven tmux+vim combo.

GitHub logo sayanarijit / .files

Just some files for my personal use

My Dotfiles

Here is the technique I use to automate setting up my dev environment in mac using dotfiles while keeping it up-to-date.

It's all based on Makefile.

Setup

cd && git clone https://github.com/sayanarijit/.files && cd .files && make

Sync

dotsync

Or

cd ~/.files && make sync



Update: consider using neovim. It's the modern vim.

 
 

In PHPStorm I’ve started using double shift to search everything rather than scrolling through files in the project tree

 
 
 
  1. unplug the real mouse
  2. stay at the command line more often
  3. use soft keyboard based mouse ( number pad keyboard mouse is my fav)
  4. avoid the gui (this is #2 again isn't it?)
Classic DEV Post from Mar 28

Joel is stepping down from Stack Overflow

Joel Spolsky @spolsky We’re looking for a new CEO for Stack Overflow. I’m s...

Ben Halpern profile image
A Canadian software developer who thinks he’s funny.
Sign up (for free)

dev.to is where software developers stay in the loop and avoid career stagnation.