[HN Gopher] Look ma, no mouse: Vimium
       ___________________________________________________________________
        
       Look ma, no mouse: Vimium
        
       Author : code-faster
       Score  : 97 points
       Date   : 2020-10-06 18:18 UTC (4 hours ago)
        
 (HTM) web link (codefaster.substack.com)
 (TXT) w3m dump (codefaster.substack.com)
        
       | tao_oat wrote:
       | I love the idea of Vim shortcuts in the browser, but I'm becoming
       | increasingly uncomfortable with the permissions these extensions
       | require. I get why it's necessary for them to work, but giving
       | access to all history/tabs/browser data feels a bit intense.
        
         | pacamara619 wrote:
         | Which is one of the many reasons why people should seriously
         | consider using only free software.
        
         | WorldMaker wrote:
         | At least current browsers now show/ask for such permissions
         | individually. You probably don't want to know how many
         | permissions things like old XUL/XPCOM extensions would have
         | required had they been forced to ask the user for them
         | individually.
        
       | rickyc091 wrote:
       | I'm in love. I was able to navigate to hacker news, use F to
       | click into the comments. Use J to read a bit, then jumped back to
       | the top of the page and used F to highlight the text box to start
       | typing this comment. Pair Programming is about to get a whole lot
       | more interesting.
        
       | krmbzds wrote:
       | I settled with Surfingkeys after I tried Vimium, Vimium C,
       | Pentadactyl and Vimperator.
       | 
       | Here's my Surfingkeys configuration as an ex-Vimium user:
       | map('F', 'gf');       Hints.characters = "asdgqwertzxcvb";
       | 
       | It makes _open in new tab_ behave like Vimium and _f_ work like a
       | toggle.
       | 
       | Hope this helps someone looking for a better option migrating
       | from Vimium.
       | 
       | [0] https://github.com/brookhong/Surfingkeys
        
       | Sodman wrote:
       | I love vimum, use it myself, but my biggest gripe with it (also
       | half-addressed in the article) is that sites with good power-user
       | focused keyboard shortcuts built-in are almost always going to
       | beat a generic plugin like vimium. So you're left with choosing
       | one of two compromise options:
       | 
       | 1) Ignore the nice app-native keyboard shortcuts and just use
       | vimium everywhere (Frustrating when single-key shortcuts in the
       | app are multiple drop-down menu clicks with vimium)
       | 
       | 2) Disable Vimium on shortcut-rich apps, but deal with the
       | inconsistencies. (Eg clicking on the link in the body of an
       | e-mail in gmail now needs a mouse again)
       | 
       | I really wish vimium had some kind of modifier for "send next key
       | to website", so I could have my cake and eat it too.
        
         | bovine3dom wrote:
         | > I really wish vimium had some kind of modifier for "send next
         | key to website", so I could have my cake and eat it too.
         | 
         | Tridactyl has this, bound to ctrl-v by default. Implementation
         | is here [1] if anyone wants to try to add it to Vimium.
         | 
         | [1]:
         | https://github.com/tridactyl/tridactyl/blob/5e8f94ff06bd5f14...
        
         | wcoenen wrote:
         | > I really wish vimium had some kind of modifier for "send next
         | key to website", so I could have my cake and eat it too.
         | 
         | I thought that was what "insert mode" was used for. Hit i to go
         | into insert mode, ESC to get out.
        
           | Sodman wrote:
           | As a daily vim (editor) user, I had no idea that's what
           | insert mode did in this context! I had never used it in
           | vimium before. Thank you!!!
        
           | _ikke_ wrote:
           | Yes, exactly. It also allows you to specify keys that it
           | should ignore per site (so that the webapp always receive
           | them), or even completely disable vimium for a site (or just
           | specific pages on a site). By default, it's not active on
           | gmail for example.
        
       | jrockway wrote:
       | I'm glad this was posted. I really liked how they introduced only
       | one feature; that was enough to push me to install and get past
       | "I don't know vim, why would I like this". I can press 'f' and
       | type letters to follow links. No vim-ness. Just a nice feature.
       | (You can press "?" to see more features.)
       | 
       | (I used an XUL-based web browser with Emacs keybindings many
       | years ago and loved it. But I had to switch to Chrome, and XUL
       | went away, so I kind of gave up.)
        
         | JoshTriplett wrote:
         | > I can press 'f' and type letters to follow links.
         | 
         | You can get this with standard Firefox, no extension needed.
         | For instance, on the HN main page, hit ' (single-quote) then
         | "vi" then [enter] and you'll follow the link to this article.
        
           | code-faster wrote:
           | Oh that's cool, thanks for the tip
        
       | jyoshi wrote:
       | I've been using vi-like shortcut plugins (vimperator,
       | pentadactyl, vimium, vim vixen and many others, currently using
       | tridactyl) for quite a few years now, and its never been quite
       | the smooth experience I hoped for.
       | 
       | Not even talking about interfaces where you'd expect to need to
       | use mouse (javascript components and others), but there is always
       | the page in which the shortcuts will fail, or some input which
       | will be blocked because the plugin is fighting the webpage for
       | focus. Its pretty much what the article says at the conclusion,
       | it helps reducing, but I still view it as a hassle.
       | 
       | Browsers developed with vi-like modes built-in (vimprobable,
       | vimb, qutebrowser) fared better for me, but then there's other
       | issues like incompatibility or lack of plugins which keeps me
       | from fully using them.
        
       | zoltar wrote:
       | For the second time this week on here, I feel compelled to
       | recommend https://krabby.netlify.app/
       | 
       | Ever want to copy all the links in a column of a table to the
       | clipboard? https://www.youtube.com/watch?v=PJXCnRBkHDY
        
       | rideontime wrote:
       | Pro tip: Set your hint characters to keys you can hit with your
       | off-mouse hand. (e.g., being a right-handed qwerty user, mine are
       | asdqwerzxcvtgb) Now you can keep one hand on the keyboard, the
       | other on your mouse (or coffee, or whatever).
        
         | [deleted]
        
       | djklanac wrote:
       | It's the best extension I've installed. I only wish it would
       | permit single hand navigation as a setting (e.g. left hand only
       | with right on mouse all the time)
        
       | stevebmark wrote:
       | This is a good reminder that even engineers who think they are
       | analytical and evidence based are subject to dogma. There has
       | never been any study showing that not using your mouse improves
       | coding speed. Use Vim if you want, I do, but don't state it's
       | more efficient at writing code.
        
         | barbs wrote:
         | The article is about a browser plugin, it doesn't state
         | anywhere that Vim is more efficient at writing code.
        
       | gitgud wrote:
       | Vimium is actually quiet a stable project since it's creation in
       | 2009.
       | 
       | Side note: going back on the git history of the project is a
       | great way to see the code evolve. [1] Originally it started with
       | 2 files, but now has blossomed into a project with 100's of files
       | 
       | [1]
       | https://github.com/philc/vimium/commit/aff9db2640db9aa02858d...
        
       | preommr wrote:
       | I absolutely love vimium. Such a great tool.
       | 
       | [Vimium + i3 + vim + vscode/vmplugin] Means that I rarely have to
       | reach for the mouse, have a tonne of desktop real estate that's
       | easy to navigate and is way more comfortable.
       | 
       | Just having search, simple navigation and the 'f-feature' in
       | vimium is enough for like 99% of my use cases.
       | 
       | It's such a pleasant and seamless experience to code in the
       | editor, hop on over to the terminal to do w/e, skip on over to
       | the browser to look something up, and go back to code. The muscle
       | memory just takes over. Not to mention all the other benefits
       | like having to track down small icons, sometimes changing window
       | state (e.g. unmaximize, moving things around), and how much more
       | effort using a mouse is over 2-3 keystrokes.
        
         | paulintrognon wrote:
         | What do you mean by "vmplugin" ?
        
           | RMPR wrote:
           | Not OP but they are probably talking about the vscode
           | extension that provides Vim keybindings
           | https://github.com/VSCodeVim/Vim
        
         | aszen wrote:
         | I use the exact same setup. Although I switched to only this
         | year after spending time revisiting my workflow. Its indeed
         | quite a bit faster for doing serious work although when I'm
         | just browsing casually I do use the mouse just to give my
         | fingers a rest.
        
         | SuperPaintMan wrote:
         | My setup is pretty close to yours, I've found this tool to be
         | absolutely invaluable as an alternative to digging through
         | menus :)
         | 
         | https://github.com/Zren/plasma-hud
        
       | as_keyof_typeof wrote:
       | Hm, I like this a lot. However in regard to RSI, is it more
       | intensive to stay on the keyboard or to frequently use the mouse?
       | Or is it the act of switch from keyboard to mouse that causes
       | injury, and that maybe if you could do everything with the mouse,
       | that could work to?
        
       | floitsch wrote:
       | I wrote a Chrome extension with a similar purpose.
       | 
       | https://chrome.google.com/webstore/detail/ctrl-access/glmoeh...
       | 
       | The idea was copied from Konqueror.
        
       | hs86 wrote:
       | I showed this once to a non-techie friend, and they were excited
       | to use it. My little demo covered the difference between F and
       | Shift+F to show how it is case sensitive, and I navigated through
       | multiple pages without using a mouse. I assured them that they
       | don't need to learn all of its commands, and they can open a
       | cheat sheet on any page just by typing a question mark.
       | 
       | This non-disruptive introduction into Vimium made me think about
       | my old Firefox setup. Back in the XUL days, I was hoarding dozens
       | of add-ons that altered the Firefox UI to the extent that others
       | could not use my browser anymore. They would click on a link and
       | wonder why it is not working while my browser would amass many
       | new tabs at a customized, designated place. The browser worked as
       | I intended, but the extent of my customizations made it unusable
       | for regular Firefox users.
       | 
       | Therefore I think that these new, more limited extension APIs
       | offer an overall better experience for end-users. Maintaining
       | usability for "regular users" should be the upper bound for the
       | amount of customization an extension API provides. If it goes
       | beyond that, it seems to get out of control.
        
         | stevenhuang wrote:
         | I don't agree. Regular users simply won't know to install those
         | plugins in the first place. Leave the advanced APIs in for
         | those that seek it. Security and maintenance concerns aside, of
         | course.
        
       | diehunde wrote:
       | I use a lot of shortcuts when browsing and when I have to switch
       | from MacOS to Linux is always a pain in the ass because they
       | change and is not easy to remap all of them.
       | 
       | Maybe trying something like this would alleviate this issue for
       | me.
        
       | tjchear wrote:
       | Along the same vein, I made a vi-like editor for editing webpages
       | - not to minimize mouse usage, but to increase productivity with
       | tons of shortcut keys and commands. https://vivpage.com/
        
       | GrantZvolsky wrote:
       | I used vimium before switching to Surfingkeys for its editor.
       | Turning any text input into a vim box is one of these features
       | that you can't do without once you're used to their convenience.
       | 
       | Note that these extensions have access to all your data on the
       | sites you visit, and while you may trust their developers, a
       | dependency might go rogue without anyone noticing.
        
       | asselinpaul wrote:
       | anyone know how vimium compares to tridactyl on firefox?
       | 
       | [0] https://github.com/tridactyl/tridactyl
        
         | YorickPeterse wrote:
         | I've tried Tridactyl, Vimium, Saka Keys, Vimium C, and Vim
         | Vixen. Of these, I found Vimium C to work the best and have the
         | least overhead. Tridactyl added a consistent overhead of around
         | 100 milliseconds when loading page, while Vimium and Vimum C
         | added only about 20 ms of overhead.
         | 
         | In terms of features, I think Tridactyl is the most feature
         | complete, but I found Vimium C to be more enjoyable to use. For
         | example, Vimium C seems to produce better hints (e.g. fewer
         | cases of hints for something you can't click on), when compared
         | to Tridactyl. I also prefer Vimium C's "Vomnibar" over the
         | Tridactyl interface, especially with a bit of tweaking to the
         | theme.
        
           | bovine3dom wrote:
           | FWIW - mostly for other interested readers - in Tridactyl we
           | made hints which might be useless grey recently. They
           | correspond to JavaScript events and are sometimes the only
           | way to click a button.
           | 
           | If you want Vimium-style behaviour where these elements are
           | not hinted you can just do `:bind f hint -J`.
           | 
           | We also have a Vimium-style theme which you can access with
           | `:colours shydactyl`. The theme could do with some polishing
           | if anyone's interested.
        
             | hsbauauvhabzb wrote:
             | I'm curious about your first paragraph but I don't
             | understand it, can you rephrase?
             | 
             | DOM elements which trigger JS event on click which are not
             | identified by shortcut tools has always annoyed me, us much
             | that I even tried to fix it myself so I'm very interested
             | if tridactyl has
        
               | bovine3dom wrote:
               | Disclaimer: I didn't write this code.
               | 
               | This runs at page load - https://github.com/tridactyl/tri
               | dactyl/blob/5e8f94ff06bd5f14.... If you keep pulling that
               | thread you'll find we use it to populate an array of
               | elements with interesting event listeners on them. We can
               | then put hints on those elements. We simply fire fake
               | mouse events on those elements if they are chosen.
               | 
               | The code could definitely be improved - a major annoyance
               | to me is that the JavaScript hints ignore CSS selectors.
        
         | berkes wrote:
         | If it is anything like Pentadactyl was, the difference is
         | mainly that Vimium changes very little in Firefox. You, your
         | spouse or your co-worker can still open Firefox and use it, as
         | used to. Yet with pentadactyl, everything is gone: the
         | addressbar, back-button, menu's etc. This might be what you are
         | looking for, though.
         | 
         | That was one reason for me to ditch Pentadactyl (and also
         | vimperator), and use vimium instead. It allows you to keep
         | using Firefox as normal, gradually sliding into the habit of
         | using the keys.
        
           | bovine3dom wrote:
           | Tridactyl is much less extreme than Pentadactyl, at least out
           | of the box. Probably the "worst" thing we do is override
           | Ctrl-A and Ctrl-F.
        
       ___________________________________________________________________
       (page generated 2020-10-06 23:00 UTC)