HNHacker News
TopNewBestAskShowJobs

johnvaluk

320 karma · joined January 14, 2017

submissionscomments
johnvaluk··on FizzBuzz in J, Explained
If the string 'FizzBuzz' appears in your code, you have failed FizzBuzz.
johnvaluk··on Vimperator: a Vim-like Firefox
The 2 killer features for me are:

    1. Vi(m)-like keybindings
    2. Portable configuration (dotfile)
Like Vi(m), there are standard keybindings mapped to common commands, plus the ability to create your own. My fingers never have to leave the keyboard to navigate the Web, unless I have to interact with certain plugins.

Vimperator reads its configuration from a ~/.vimperatorrc file when it launches. I keep this in version control like the rest of my dotfiles, so I can deploy it to any machine for a reproducible environment. It supports setting Firefox preferences (about:config settings), bookmarks, search engines, etc. I have mine set to remove all the browser chrome, so Firefox has looked almost exactly the same to me since 2009.

For example, I have a bookmark defined for Hacker News in ~/.vimperatorrc:

    bmark -keyword=h -title="Hacker News" https://news.ycombinator.com/
Now I can open Hacker News by typing 'oh' ('th' if I want it to open in a new tab), then 'f<n>' to follow a link where <n> is the number highlighted over the link (which decreases if you start typing some letters found in the link text).

I can create searches, as well:

    bmark -keyword=g -title="Github" https://github.com/search?q=%s
Now I can type 'ogvimperatorrc' to find interesting configurations on GitHub.

The tab completion is great, so don't feel you have to limit keywords to a single letter.

I'll be really sad if/when Vimperator becomes incompatible with Firefox. At least there are other extensions or browsers that provide some of the same functionality.

johnvaluk··on After 1 minute on my modem (2016)
You can get similar results by toggling usermode:

    map s :set invusermode <CR>
Then you can just use the same key to switch back and forth.
← PreviousPage 4 of 4