Hot Key Help
Lately I’ve been attempting to become more proficient with the keyboard so that I can be more productive. As the theory goes, the less time spent between even the small context switches (such as taking your hands off the keyboard to work the mouse), the faster you will become at the task – not just from the mechanics of it but because your visual mind doesn’t have to wander into navigating menus and GUI controls.
But learning shortcuts to a point of being very proficient is much easier said than done. The first step is to have a handy reference to the actual shortcuts, and taking a cue from the days of old when people would have WordStar and Lotus 123 templates sitting on their keyboards, I created some lovingly handcrafted shortcut references and placed them all around my workstation.
Realizing that this would not scale beyond one computer and that updating it would be a nightmare, I decided to take a different approach: hot-key help.
The idea is simple: assign a hot-key sequence (or shortcut sequence) to pop up a help screen. As I wanted it to contain the shortcuts for the applications I use most often and that I wanted to be able to update the help file as my needs changed, I opted for an easily edited text file (pictured at the top).
While the desktop manager I use is Gnome 3, this will work in any desktop environment where shortcut keys can be assigned to run a program.
So I configured Gnome, through the settings program, to understand
<super>/ (super being the Windows key on some keyboards) to run the following
gnome-terminal \ --geometry=120x40+300+0 \ --name \"my_help\" \ --class \"my_help\" \ -e 'view -u /home/rcode3/help.vimrc /home/rcode3/help.asciidoc'
Breaking this down, gnome-terminal is being launched, given a specific size and placement on the screen, and then told to run Vim on the help file.
--geometry=120x40+300+0instructs gnome-terminal that it wants to be 120 characters wide by 40 characters tall, and to be placed at pixel 300 x 0 on the screen.
--classoptions instruct the window manager on how to label the window, which is important for certain desktop application switchers.
- and finally
-e ...launches Vim in read-only mode (
view). Vim is passed a stripped down .vimrc simply because my regular vimrc contains to much flair that interferes with the task of viewing help.
The actual file is an ASCIIDoc file (.asciidoc) simply because Vim knows how to do syntax highlighting with that type of file. And the outline of the file is drawn with the Vim extension DrawIt, the purpose of which is to help understand the boundaries of the file while displayed in the gnome-terminal geometry.
If you find this helpful or have good suggestions to improve this, please feel free to comment below or contact me on the Fediverse at @email@example.com.