Here’s another Vim tip that I find very handy. When using gVim on Windows, I can bind the escape key to caplock, but only for Vim. This method relies on using AutoHotKey, an excellent tool.
First install AutoHotKey
Once installed, right click the AutoHotKey icon in the system tray and select “Edit This Script”.
A text editor will open, with the default script that executes when AutoHotKey is running.
Add the following code snippet to the end of the script:
classname = ""
keystate = ""</code>
WinGetClass, classname, A
if (classname = "Vim")
GetKeyState, keystate, CapsLock, T
if (keystate = "D")
AutoHotKey is designed to run in the background. When Vim is running, a capslock key press will operate in an identical manner to an escape key press. Even better is the fact that the capslock status for Windows does not change when Vim is in focus.
I had a problem some ago after installing Ubuntu on a RAID array, my computer would not boot and displayed a Grub Error 17.
Here are some of the links that helped me to fix the problem:
had an error 17
had to rebuild the boot partition & then reinstalling grub2
put in livecd 10.4
mnt drives with \dev\mapper\nvide3gegj0 <– number at end
grub install pc might fail
if so, then
to update repository listings.
then install dp installer
Here’s a nice tip I’ve just discovered when using Vim on the Ubuntu OS on a computer equipped with a windows keyboard. Most PC keyboards have Windows specific keys on their bottom row, such as the Windows start menu key and the context menu key.
With the default key bindings in Vim, it can be a pain to reach up to hit the escape key to exit insert mode.
I discovered that you can bind the Windows key at the bottom row of the keyboard to act as the escape key.
To do this, you need to edit your ~.bashrc file and add the following line:
xmodmap -e “keysym Super_L = Escape”
The changes will come into effect once you restart your terminal. Then you’re good to go.
There are many alternative keybindings, and I was wary of swapping the escape and caps lock key bindings because of unintended side effects.
I had previously mapped typing
jj to exit from insert mode by adding the following to my .vimrc file
After about a year of using
jj I wanted to use something quicker and the windows key binding above was my solution.