Fri 12 Jun 2015 02:34:46 AM UTC, comment #7:
I had reassigned some key bindings as below.
bind ^A firstline main
bind ^E lastline main
These work fine. Thanks for your followup on these posts.Closing this thread.
|
Thu 11 Jun 2015 09:02:29 PM UTC, comment #6:
On my system, Ctrl+Home and Alt+Home produce the exact same keycode as Home by itself. Shift+Home produces no key code at all.
So it looks like that -- using ncurses -- there is no way to make ^Home and ^End (or Home and End with any other modifier key) distinguishable from Home and End by themselves. Sorry.
|
Thu 11 Jun 2015 09:27:06 AM UTC, comment #5:
Unfortuntately it is not possible (at the moment, at least) to rebind the standard cursor movement keys like <Left>, <Right>, <Up>, <Down>, <Home>, End>, <PageUp> and <PageDown>. This has been reported as bug #44688.
However, even if that particular issue could be fixed, I don't think it would work for ^Home and ^End, because it seems that under ncurses those combinations don't produce different codes than the ones without the Ctrl key. I will investigate later.
|
Thu 11 Jun 2015 08:26:29 AM UTC, comment #4:
I tried with
bind ^home firstline main
bind ^end lastline main
It seems like ^ should be appended at the beginning of each key binding. Somehow, there is no change in the editor. Could you tell the sytax for assigning CTRL-home for beginning of file, CTRL-END for end of file?
I edit code on remote shells over ssh2. The keybindings of nano work without any issues.
Thanks.
|
Thu 11 Jun 2015 07:51:51 AM UTC, comment #3:
As I've tried to explain in my previous comment, there is no need to do Ctrl+W followed by Ctrl+Y or Ctrl+V to reach the top or tail of the file, you can do Alt+\ or Alt+/ instead. I think those bindings are nice and short: a single key stroke each. Do they not work over ssh to a remote shell? If so, what precisely is your setup (manner of connecting, terminal type, multiplexer)?
Ctrl+A and Ctrl+E are by default assigned to start-of-line and end-of-line, but you can easily use <Home> and <End> for those, so rebinding the first two should not cause you any difficulty.
|
Thu 11 Jun 2015 07:40:28 AM UTC, comment #2:
Hello Mr. Schulenberg,
Thanks for providing information on key bindings. I will update the shortcuts as per your instructions. The existing key bindings are too lengthy and not so easy when accessing code on remote shells. That was the reason I had asked this change request. I would change the key bindings as follows if they are not already assigned.
CTRL-A - Beginning of file
CTRL-E - End of file
Many thanks.
|
Wed 10 Jun 2015 08:21:15 PM UTC, comment #1:
If you press ^G, you can see in the help text that there are default bindings for "Go to the first line of the file" and "Go to the last line of the file": M-\ and M-/. If these bindings are too awkward for you, you could put the following two lines in your ~/.nanorc: 'bind ^Y firstline main" and 'bind ^V lastline main' (without the quotes). Then the keys that you suggested will do what you want.
The default bindings in nano are the way they are in order to be fully compatible with pico. This is the first priority of nano, so this will not change. But the bindings are almost entirely customisable: see 'man nanorc' and search for "rebinding".
|
Wed 10 Jun 2015 10:52:09 AM UTC, original submission:
Hello,
I am using nano 2.2.6 on Debian 7 x86-64. While browsing a large file , it is difficult to go to beginning of file and end of file. At the moment, you have the keyboard control keys CTRL M- to see some more options where you can select CTRL-V or CTRL-Y to go to end of file or beginning of file. While going to end of file, a line is appended in the editor by the above process.
I request that you make browsing source files in the editor very easy and with less navigation. So, Here, End of file can be reached by CTRL-V and beginning of file can be reached by CTRL-Y without pressing CTRL M- first.
You can replicate the error on your computer to see if you think this change request can be implemented.
Many thanks!
|