bugGNU nano - Bugs: bug #45291, end-of-file, start-of-file are...

 
 

bug #45291: end-of-file, start-of-file are difficult to reach

Submitted by:  Codingforum <codingforum>
Submitted on:  Wed 10 Jun 2015 10:52:09 AM UTC  
 
Severity: 2 - MinorStatus: Wont Fix
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

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.

Codingforum <codingforum>
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.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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.

Codingforum <codingforum>
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.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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.

Codingforum <codingforum>
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".

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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!

Codingforum <codingforum>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by codingforum (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 14 Jun 2015 07:18:53 PM UTCbensOpen/ClosedOpen=>Closed
    Wed 10 Jun 2015 08:21:15 PM UTCbensSeverity3 - Normal=>2 - Minor
      StatusNone=>Wont Fix
      Assigned toNone=>bens
      SummaryEnd of file, beginning of file are difficult to reach in Nano editor =>end-of-file, start-of-file are difficult to reach

    Back to the top


    Powered by Savane 3.1-cleanup1