And likewise Ctrl+Left to prevword. I read the man page of nanorc and found
bind key function menu
So the line bind ^Left prevword main
would be what I want, the problem is that nano only accepts
an alpha character or the word "Space"
so Left
doesn't exist.
Is there a way to accomplish this? Right now I'm on natty (nano 2.2.2) but I will upgrade nano if a later (devel?) version can do this.
Sadly, I don't think this is possible. I've found a thread where a nano developer said:
On another, he added:
There is a solution to this problem. Redefine Ctrl-Left and Ctrl-Right in your Terminal program to seldom-used keys, such as F13 and F14.
Then in ~/.nanorc:
Now, a shortcoming, for me at least, is that it will only work when you're using the Terminal program you used for the key redefinition. For example, in my situation, this doesn't work when I'm at the physical console of my OS (in my case, FreeBSD). But I use QVT/Term from my desktop in the other room almost 100% of the time. Works like a charm.
Install the latest version of
nano
. They have addedctrl+left
andctrl+right
to move by words. (For sure v2.7.4 has this).Another option is to use the default
Ctrl-Space
andAlt-Space
commands.