13 ms·
I never really felt faster eliminating mouse from my coding workflow. Point and click to navigate things is pretty powerful. Why some devs try to avoid the mous
by msoad 5y ago
I never really felt faster eliminating mouse from my coding workflow. Point and click to navigate things is pretty powerful. Why some devs try to avoid the mouse?
- smoldesu 5y agoModal editors in particular can be a mixed bag, they do seem a little out of place in the world of IDEs and Visual Studio Code, but I'd be lying if I said I don't use them heavily. The main appeal for something like this is to keep your hands on the keyboard so you can focus on writing. > Why some devs try to avoid the mouse? Because a keyboard is a much better peripheral to use when you're SSHing into your server. A mouse also has a much higher latency ceiling to execute most commands because it requires much more spacial awareness and brainpower to perform the task than just invoking the keybind. When you move your mouse to hover over a "send" button on an email client, your body is performing subconscious inverse kinematics to try to figure out how far to push the mouse, and when to stop. You can then only click once your mouse successfully lands in the designated area, at which point an additional 50-500ms of latency will ensue, depending on what UI framework your text editor is based off of.
- fpoling 5y agoFor me the appeal of Vim-type editors is that I do not need to learn new shortcuts when switching between Mac, Linux and Windows that I have to do at work periodically. This is a reason I use a Vim plugin with VS-Code with few custom keybindings to minimize the usage of Ctrl key.
- paxys 5y agoIMO part of the reason is cultural. Computing became mainstream only after the mouse and GUI were invented, but programmers have been at it since well before that. So now it's somewhat of a badge of honor that you can be as productive without the newer conveniences. This apples to any new tools or processes like IDEs or linting as well. There was a very distinguished engineer at my company who chastised young engineers for using graphical step-through debugging.
- mixmastamyk 5y agoSome actions are more productive at the keyboard. Other times I use the mouse.
- SuboptimalEng 5y agoI made a video[0] explaining why it is beneficial to use Vim commands. You can watch from 00:48 seconds to 03:53. TL;DR: Moving away from the home row to arrow keys or mouse can cause wrist pains. [0] https://youtu.be/h-epcklOC_g?t=48 https://youtu.be/h-epcklOC_g?t=48
- soperj 5y agoThere's no muscle memory in point & click, and it is a lot slower for a lot of things. For instance, you wouldn't type on an on-screen keyboard with point & click. Once you've been using VIM for a while, pretty well any mouse interaction feels like doing just that.
- gnull 5y agoWatch a skilled Dota player in action, you will find a lot of muscle memory with the mouse there.
- vladvasiliu 5y agoI'm not familiar with Dota, but I'd guess that like other games whatever interface elements a player has to click are always in the same place and they're probably already having their hand on the mouse so know exactly where the cursor is. Now compare this with an usual "desktop session", where you may have multiple windows which aren't always in the exact same place, the cursor moves around, maybe even hidden because you've been typing, etc. Now you have to spend some extra time to 1. locate the cursor, 2. locate the button to click, 3. move the mouse over. It will probably not be slow but it clearly takes you out of the flow compared to keeping your hands where they were and knowing that whatever your shortcut you have to press will do what you expect.
- gnull 5y agoYes, I agree. What you say reminds me of synchronous-asynchronous analogy I just made in another branch of this thread.
- gnull 5y agoEven though I'm a big admirer of keyboard-driven interfaces, I don't think mouse should be eliminated. Mouse can be better than keyboard for some tasks. The problem I see is: a lot of things that non-modal, GUI interfaces use mouse for can be better done with a keyboard. For example, all sorts of drop-down menus and icons that you click on to launch programs. This kind of interface is inherently synchronous: the computer suggests, you pick. To me, it's way more natural to asyncronously type in what I want without having my attention hijacked by whatever suggestions my machine has (sometimes those actually make me forget what I was trying to do in the first place). I love the related metaphor ESR came up with in his Unix Coans [1]. [1]: http://www.catb.org/~esr/writings/unix-koans/gui-programmer.html http://www.catb.org/~esr/writings/unix-koans/gui-programmer....
- vladvasiliu 5y ago> To me, it's way more natural to asyncronously type in what I want without having my attention hijacked by whatever suggestions my machine has Yes, especially when the suggestions change all the time, like when you go to click something and the icon is replaced by something completely different.
- cvak 5y agoMoving your hand from keyboard to mouse 1000 times a day is really good recipe for RSI. Ask yourself this question after doing this 10y+ in a row.
- Vhano 5y agoomg I realized this recently after using Android Studio for a short while. Keyboard+mouse workflow is objectively horrible for the wrists. Unfortunately no other alternatives exist for these IDEs.
- brabel 5y agoAndroid Studio is based on the Jetbrains IDE, IntelliJ, and you don't need the mouse to do anything with them. If you don't know how, I recommend you watch some guides on https://blog.jetbrains.com/idea/category/tips-tricks/ https://blog.jetbrains.com/idea/category/tips-tricks/ or find some presentations on Youtube (after I watched one many years ago, I've been feeling like I have superpowers and can do anything with a couple of shortcuts).
- Vhano 5y agooh cool thanks mate
- hota_mazi 5y agoActually, that's not true. What causes RSI is mostly centered around tendon and their sheath tension. For example, if you use a straight keyboard (don't! Ergonomic all the way!) that is raised toward you as opposed to away from you, keeping your hands on that keyboard for multiple hours in a row without ever reaching for the mouse is pretty much guaranteed to give you RSI. Reaching for the mouse will actually bring relief to your tendons. Another keyboard habit that will put a great deal of stress on your hands and wrists is leaving the Control key at the bottom left of the keyboard. Typing a control key with this configuration will bring great stress on your pinky and other tendons in your hand. Recommendation: map Control on Caps.
- the-smug-one 5y agoGood key chords matter. Here are some of mine: M-. jump to source M-, pop back to previous source C-x f r Find References C-x f i Find Implementations C-x f t Find Type C-x r v Rename Variable C-x c a Code Actions And a bunch more. I'd like to have an analogue to jump back with my C-x stuff like I do with M-. and M-, - any emacs people have suggestions on how to do that? I don't know how fast you are with the mouse, but I've watched my co-workers jump into source and they can be so slow. I believe that I can answer questions I have regarding the codebase faster than they can, I don't have to rely on my memory for trivialities.
- brabel 5y ago> I'd like to have an analogue to jump back with my C-x stuff like I do with M-. and M- Use IntelliJ, it's trivial to do that with `Cmd+B` (on Mac).
- hota_mazi 5y agoI don't find them particularly good. All these \C-x that emacs forces on you introduce extensive risks of RSI, especially if your Control key is still at the bottom left of your keyboard. Better chords would be simple shortcuts for actions you do often (for example, "Go to symbol" in IDEA is \C-b).
- hvis 5y ago> I'd like to have an analogue to jump back with my C-x stuff like I do with M-. and M-, - any emacs people have suggestions on how to do that? If you use Xref UI for "Find References/Implementations/Type", M-, should work in those cases too. There is a more general question: how to "jump forward" again, without re-invoking the previous navigation command with the exact arguments. IDEA, already mentioned in comments, has key bindings for that. There are several third-party packages which attempt to solve it as well. I'm using this one: https://github.com/tcw165/history https://github.com/tcw165/history You can also add "jump back" to your other navigation commands, even if they don't use the Xref UI.
- karthink 5y agoJumping "forward" is sort of built into Emacs with C-x C-SPC, pop-global-mark. The objective and this command are fairly but not completely aligned, so it may require multiple presses of C-x C-SPC. To be clear, you only need to press C-SPC after the first invocation to repeat the command.
- yonl 5y agoPoint and click to navigate is pretty slow compared to keyboard driven approaches. Realized after switching to vim. Probably because, after certain point, it just the reflex which drives vim.
- eitland 5y agoHere's my view: When I have my hands on the keyboard I prefer to keep them there so I use ctrl - w to close tabs, ctrl-t to open a new tab etc. When I have my hand on the mouse I prefer to keep it there so I used to love mouse gestures on older Firefox versions at least.
- stinos 5y agoThis. Using both (and touch as well sometimes), the right tool at the right time for the job at hand, is what is the fastest for me. Doesnt matter whether it's editing or browsing or ... What do you mean with older FF? I've been using mouse gestures for decades (Opera anyone?) and I still use the same ones today on FF. Different extension/plugin of course, but works the way it should?
- frob 5y agoAgreed! I have a keyboard full of OS-level macros and I've rebound the extra buttons on my mouse to ctrl+c, ctrl+v, and enter. If I'm leaning back and browsing through docs, I want to be able to move text around and execute commands without reaching for the keyboard.
- Un1corn 5y agoI found a nice solution to this with an MMO mouse. I have a Logitech G600 with 12 keys on the side and I mapped them to my most common operations like opening and closing tabs or moving between workspaces.
- thomasahle 5y agoMy view: Use vim shortcuts in all the programs, so you never have to use the mouse or learn new keyboard shortcuts. For Firefox something like Vimium works well.
- cosmojg 5y agoQutebrowser is one of my dearest loves. I wish every browser was Qutebrowser. <3
- dmos62 5y agoBecause we don't want to move the hand around. With keyboard-only solutions your wrist stays pretty much put. That's mechanically more fluid and faster.
- SkyMarshal 5y agoIt's all about avoiding context-switching from keyboard to mouse and back.
- mro_name 5y agoand also in your brainz (no context switching)
- foldr 5y agoWhen there’s a trackpad below the keyboard you only have to move your hand slightly to use it.
- pjerem 5y agoI don't get why you are being downvoted. A good trackpad under a keyboard (like on the Macbooks) is probably the (or at least, my) best input method. I would pay high price for a desktop keyboard with a qualitative touchpad right under the keyboard.
- foldr 5y agoIndeed. If the challenge is to move to an arbitrary location visible on screen, then it’s logically almost certain that a good trackpad is more efficient than any combination of keyboard shortcuts. Keyboard shortcuts can be more efficient in some specific cases of course (e.g. moving to the beginning of the next word, or something like that). But I see no point in memorizing the more obscure shortcuts when the trackpad works so efficiently and requires no thought or memorization.
- imiric 5y ago
- city41 5y agoI don't find it's about speed, but rather about staying in the zone. vim enables very intricate navigation and editing that is much more tedious to pull off with a mouse. Since I have these commands memorized and very strong muscle memory, I just do them by instinct and my focus on what I'm doing never drifts.
- dwoot 5y agoThis is a fair thought. It's why some wonder why people use Vim, emacs, or keyboard shortcuts in general... However, one of my reasons is that I work out of coffee shops a lot. Not having to bring an extra piece of hardware that takes up space is a big deal for me and not taking my hands off the keys is a big deal. I was a gamer (Counter-strike), and as precise as I believe my mouse-clicking to be, it is far less precise than the correct sequence of keystrokes to get to some parts... Readline shortcuts available in most shells, i.e., ctrl-a (beginning of line), ctrl-e (end of line), meta-b (back a word), meta-f (forward a word). In Vim - I can delete entire code-blocks with a quick sequence and have my cursor ready to type, and I can move chunks of code with their delimiters far more easily than my fairly precise mouse clicking and highlighting then moving my hand back to the keyboard to hit backspace. I can also switch to a "tab" (buffer in Vim) with a few keys without having to cycle through tabs or use a mouse to find the tab I'm looking for with a mouse. There are many benefits, it's why even though text editors have come so far, people still continue to write Vim plugins for them -- think VS Code, Atom, and all the IDEs that Jetbrains produces...
- lights0123 5y agoVim still has visual mode, so if you want to use a mouse, you can use it, although only for selecting text and changing cursor position.
- glaukopis 5y agoI’m always a bit disappointed that people making the case for mouse-lite workflows stop at “it makes you faster.” In many cases, this is patently false at a global scale - I’ve been using Emacs for a month and I’m certain that I’ve already spent way more hours customizing and researching than I’ll ever make back from saving a couple deciseconds every time I use a keyboard shortcut instead of a mouse. For me, using Vim keybindings and Emacs shortcuts is valuable because reaching for a mouse or navigating menus adds mental overhead. I view the moment-to-moment practice of programming as largely being an exercise in working memory. You’re trying to hold an abstraction in your head and implement it in an existing codebase that’s filled with other abstractions and interacting parts. Personally, removing a mouse from my workflow does wonders for ensuring that all my mental resources are dedicated to the task at hand. Going mouse-lite might save a trivial amount of time in the moment, but (for me) it makes programming more seamless and natural - which makes it not only more fun, but more productive.
- tartoran 5y agoTo add to this, some shortcuts favorite to some users are used millions of times. Think of all that mental overhead that is saved in the long run. I am a heavy user of shortcuts and a lot of the times I don't even know what the shortcut is, it's all muscle memory. Intent turns into an action and feedback is both tactile and visual and there is usually an easy way to get back of that also with shortcuts. Using the mouse in some scenarios is like looking through a keyhole. That is not to say that using the mouse is bad all the time, because the mouse beats shortcuts in other scenarios. To me scrolling using the mouse scroll wheel or using keyboard keys are somewhat similar. Where the mouse workflow is eating the mental overhead is aiming a fly on a small landing 200th the size of the screen thousands of times or more daily.
- gnull 5y agoI'm not sure if Emacs qualifies as an editor for saving time. As you say yourself, Emacs people tend to play a lot with customization (and Emacs didn't seem useful with default config to me; what the hack is C-x 2?). At the same time, it doesn't add anything useful to editing itself. It's basically scriptable MS Notepad. Try a text editor that does something for text editing, not scripting. Vim is an option. I personally used Kakoune with (almost) default config for some 3 years and I'm sure it saved me a lot of time. I never redefined default keys, they were good enough, I only added a few user mode bindings. (Although I felt a lack of some features over that time; Kakoune with no plugins is a bit too minimalistic.) Recently I spent a few days setting up LSP and some useful plugins, now I'm going to forget about customization for few more months again.
- the_cat_kittles 5y agoyou wont know until you know. if two people can both use a mouse, but only one can do it all with the keyboard, you have to decide if they are being pretentious or if its actually better. i personally think its better for almost all code related tasks, but the mouse still has uses elsewhere
- jamespwilliams 5y agoAutomatic refactoring etc is still a long way off being good in Vim. But I’ve recently started using a combination of Neovim + treesitter + LSPs, and have found it incredibly powerful. Extremely responsive automatic compilation that feels instantaneous, good inline error messages, very good and fast syntax highlighting through treesitter... At what it does, I’d go as far as saying as it achieves more than any other IDEs I’ve tried. But of course, what it does is more limited. At the moment I rarely even touch a mouse. I work primarily in Vim, with DWM as a window manager and a Vim extension in the browser. When I have to work in a different environment and use a mouse again, I find the constant context switching very distracting
- fourseventy 5y agoI'm yet to dive into treesitter. Was it hard to get it installed for nvim. Also, was it hard to get the language plugins installed?
- jamespwilliams 5y agoI found it straightforward to install based on the documentation in the READMEs of both: - https://github.com/nvim-treesitter/nvim-treesitter#quickstart https://github.com/nvim-treesitter/nvim-treesitter#quickstar... - https://github.com/neovim/nvim-lspconfig#install https://github.com/neovim/nvim-lspconfig#install Just by following the instructions I had a pretty good setup already, but I made a couple of further changes, like setting up autoformatting on save, which was a bit trickier. `vim.lsp.buf.formatting` was useful there, but I had to do a bit of research to figure out how to use it (it wasn't immediately available on the READMEs).
- littlestymaar 5y agoI'm a mouse user, but moving you hands out of your keyboard to get to the mouse is annoying, and can cause shoulder strain.
- thefz 5y agoBecause once a keypress gesture enters your muscle memory, you are a fraction of a second away from doing what you intend to.
- fourseventy 5y agoUsing the mouse to highlight text in order to copy/paste it has always been a pain for me. Especially if the text is wider than the screen. I'm constantly highlight too much or too little. For me its way easier to use vim commands to grab the text I want. Its just one small example, but I can say for certain that I'm faster at editing text in vim than I ever was in a Jetbrains or VSCode editor.
- z3t4 5y agoI have always used a "gaming" mouse, eg. high precision, high refresh rate and super smooth, with a mouse mat with just the right amount of friction. It however broke a few month ago and I got a cheap replacement, since then I have been subconsciously avoiding using the mouse, because the experience with the cheap replacement mouse is so bad. So I think the reason people don't like using the mouse is because they don't have a good mouse and mouse pad, and because they haven't spent years playing first person shooters - making it possible to hit a spot on the screen with pixel-precision using just muscle memory...
- Raigasm 5y agoNo... it's because it's just a LOT faster not to have to move your hand between the keyboard and the mouse. Unless you are typing one handed then there is inherent inefficiency in using a mouse vs. a keyboard command. Example: ctrl/cmd+c ctrl+v vs right click copy/paste. Context: I've competed at a high level in CS/Valorant and voltaic platinum... mouse accuracy is not my issue. Once you achieve relative fluency with using a given text editor or IDE then it is natural to gravitate towards using keyboard shortcuts. Eventually, if you type decently fast (70wpm+, though that's slow by my standards but I'm not here to boast about the size of my epeen) many will find it frustrating moving between keyboard and mouse constantly.
- vbezhenar 5y agoThat's my main issue with terminal emulators. Why can't I click anywhere to put a cursor in there? Why can't I delete a selected text? Some hotkeys work as expected (e.g. Ctrl+Delete), but others don't (e.g. Ctrl+Backspace). Those are simple things from a user standpoint. Terminal could be so much more usable. I'm not even talking about integrating real GUI into terminal, for example pressing Tab should open dropdown list, not emulate it with text.
- SpaceNugget 5y agoYou can use the mouse to select things in the terminal. In vim/neovim `:set mouse=a` and you can scroll around, select things and move the cursor just like you can in a regular GUI editor.
- kbenson 5y agoThanks for this, you finally got me to look at the mouse options in vim, which I've always preferred off, as it's extremely annoying when using multiple windows and a click to focus window manager (like explorer, for the most part) when it places me somewhere else. Now that I know how to enable it for specific modes, I'll definitely be using it for visual mode, and maybe insert mode (we'll see how much that annoys me). Now I'm off to see if I can get the mouse wheel to work at all times but click to place cursor off except when I want it, which would be ideal.
- Per_Bothner 5y agoIn DomTerm, you can click to move the cursor. This is simulated by converting the click to a series a arrow-keystrokes. If you set up "shell integration" (https://domterm.org/Shell-prompts.html https://domterm.org/Shell-prompts.html) it just works with a regular click (for bash, fish, or zsh). Otherwise you can can do Alt-click (to avoid risk of mass confusion if you accidentally click outide an application that can handle arrow-key movement). Deleting selected text works if you're in line-editing mode. It could be made to work in normal char mode, but it's a bit tricky. Setting mouse-reporting by the application (emacs, vim, mc, etc) works pretty well, but it means the application has to simulate the selection (which may or may not be integrated with the desktop selection), context (right-click) menus, etc.
- TacticalCoder 5y ago> Why some devs try to avoid the mouse? I use the equivalent of "easy motion" aka "ace-jump" or "avy" under Emacs to move to any character on screen about 4 to 5 keypresses. Two to invoke that "jump to any character on screen" command, one to tell which character I want to jump to, then one or two depending on how many occurrences of that character there are on the screen. I'll put it simply: my cursor is where I want it before you have even grabbed your mouse. And that is the reason why I avoid the mouse. Same for "menus" and commands: shortcuts are faster than using the mouse. Once a list of potential candidates shows up, I use the same "select any candidate using the minimal possible amount of keypresses" command.
- colordrops 5y agoI hate the analog-like nature of the mouse - having to move where you want, then slow down until you get to the right spot, then click, then click again because the cursor is a character or two off; and going through menus is a pain. And it's worse when you are hungover or tired. I just want a discrete and quick way to move around, and after using vim for a long time, it's not even a question that it's way faster and easier than a mouse. A mouse is a huge drag once you are strong with key bindings
- didip 5y agoReducing mouse usage certainly helped my RSI (tendonitis) problem but I am not sure if I am any faster.
- dkarl 5y agoYou've received so many replies already, but mine is different. The older I get, the less I want to deal with the video game-like elements of hand-eye coordination, intense visual attention, and timing. I'm tired of things going wrong because I clicked a few pixels off or clicked on the wrong thing because I was surprised by a UI element appearing in a slightly different place or with an unexpected delay or with slightly unexpected contents because of a software update or just something I didn't predict. With keyboard commands, I don't have to verify the accuracy of my mouse movements, and I don't have to react to the timing, location, content, and focus changes of UI widgets. I just press the keys in the right order. It requires so much less vigilance, it's a big relief.
- mjhagen 5y agoSurprise OS update popup with focus on "OK", you press enter at just the wrong moment and you're now rebooting. OK, that wouldn't happen as far as I know, but there have been plenty times where I was typing away, glancing over, and the focus had changed and now I'm typing into nothingness (or something worse like in my not too likely example). With the mouse at least I'm actually looking at the screen.
- qxga 5y agoFor most people, it isn't; using the mouse only feels slower. https://9p.io/wiki/plan9/mouse_vs._keyboard/index.html https://9p.io/wiki/plan9/mouse_vs._keyboard/index.html In Plan 9's Acme, the mouse is your edit mode, the keyboard is your insert mode. I find I'm about as fast for most tasks in Acme as I was in Vim (after using it for years).
- hakube 5y agome too. I'm not getting any younger and obviously my movements became slower on the keyboard as I ag
- mmgutz 5y agoMany editing operations involving the the mouse can be reduced to a few key strokes in Vim and become second nature. As an example, how many coders reach for the mouse when they cut text in "modern" editors? I don't think they need to be convinced Ctrl+X/Cmd+X is faster than the mouse.
- thomastjeffery 5y agoPeople often talk about "faster" as if it's their main goal. For me, it's all about "more comfortable". Not needing to move my hand back and forth means not needing to make a context switch that puts a little extra stress into my workflow.