Thursday, 11 May 2017

epic retardedness fix - enabling mru tabbing in chrome

since the launch of chrome back in 2008 i have been annoyed with the lack of mru (most recently used) tabbing. i believed, for a long time, that the feature would be implemented. now, nine years later, i have given up waiting for google. yesterday i spent some time searching the net for a fix to this major annoyance, or epic retardedness, in this web browser. below is the result.

my previous solution
i have for years been using the extension "tab stacker". with tabs being moved to the left it has been a suboptimal solution. but i learned to live with it since it allowed me to use the windows default 'ctrl' + 'tab' shortcut for mru switching.

the fix
below is a step by step description of what i did to enable mru tabbing in chrome in a proper way.

download and install autohotkey (i went for version 1.1, AutoHotkey_1.1.25.01_setup.exe, as i was unsure if the script i found would work with version 2).

in a smart place on the os do creat a file named 'chrome_ctrlTab.ahk', and added the following content:
#IfWinActive, ahk_class Chrome_WidgetWin_1

right click that file and click 'compile', to turn it into a .exe file.

press 'win' + 'r' and type in 'shell:startup'.

make a shortcut to 'chrome_ctrlTab.exe' inside the startup directory.

install the chrome extension "CLUT: Cycle Last Used Tabs".

open chrome://extensions/, scroll to end of the page, click "keyboard shortcuts" and set the quick switch shortcut of the extension to "ctrl + q".

stackoverflow for the rescue, once again
an alternative script
a quora discussion
another possible alternative could have been using a macro recorder
chrome_mru on github

update: atom editor issue
running the above script is messing with the atom editor/ide. by some reason unknown to me the autohotkey script triggers when atom is the active window. the fix is to edit the shortcut for mru in atom to also use ctrl+q.

in `keymap.cson` add the following lines:

    'ctrl-q':       'pane:show-next-recently-used-item'
    'ctrl-q ^ctrl': 'pane:move-active-item-to-top-of-stack'


  1. UPDATE:
    the above fix messes up with atom editor. after running the autohotkey script, ctrl + tab in atom is no longer working.

    1. the fix is to edit keymap.cson, and add the lines:

      'ctrl-q': 'pane:show-next-recently-used-item'
      'ctrl-q ^ctrl': 'pane:move-active-item-to-top-of-stack'

      will update above post with this info


Allowed HTML tags:
<a href="">hyperlink</a>

Please, show the courtesy of identifying yourself when adding a comment. Anonymous comments will, most likely, be removed.