2

nano shows the shortcut as ^/ Go To Line.

It seems that ^ stands for the Ctrl on an Apple machine: the other shortcuts having it can be used with Ctrl:

^O Write Out ^W Where Is ^K Cut ^T Execute etc.

However, when I press Ctrl+/, I get a system beep, as if the shortcut were invalid.

Same when pressing Cmd+/, Ctrl+Shift+/. Ctrl+Alt+/ actually inserts /.

Specs:

  • Machine: MacBook Pro, US physical keyboard and software layout

  • OS: macOS Monterey 12.4

GNU nano, version 6.3  
 (C) 1999-2011, 2013-2022 Free Software Foundation, Inc.  
 (C) 2014-2022 the contributors to nano  
 Compiled options: --disable-libmagic --enable-utf8

Bottom of the nano screen:

^G Help          ^O Write Out     ^W Where Is      ^K Cut           ^T Execute       ^C Location      M-U Undo         M-A Set Mark     M-] To Bracket   M-Q Previous     ^B Back          ^◂ Prev Word     ^A Home          ^P Prev Line
^X Exit          ^R Read File     ^\ Replace       ^U Paste         ^J Justify       ^/ Go To Line    M-E Redo         M-6 Copy         ^Q Where Was     M-W Next         ^F Forward       ^▸ Next Word     ^E End           ^N Next Line
10
  • 2
    ⌃ is Ctrl, not Cmd, which is ⌘. To complete the set,⌥ is Opt/alt. [I've no clue how that works in nano]
    – Tetsujin
    Commented Jun 19, 2022 at 14:34
  • 1
    Where does nano show ^/ ? I see search as ^W Help is ^G note that ^ is the control key. Just tryed on nano in Monterey
    – mmmmmm
    Commented Jun 19, 2022 at 14:50
  • @mmmmmm among the other shortcuts, at the bottom of the screen. I have added it to the question. You're right, ^ is Ctrl, even in nano. Correcting my question.
    – pyb
    Commented Jun 19, 2022 at 15:05
  • Your first line says ^/ and the prompt says ^\ which is not the same thing
    – mmmmmm
    Commented Jun 19, 2022 at 15:07
  • @mmmmmm I don't see it? I have mixed Cmd and Ctrl (now fixed). The issue is with the forward slash / and Go to line. I can use Ctrl + \ (Replace) fine.
    – pyb
    Commented Jun 19, 2022 at 15:09

2 Answers 2

2

I found the answer on StackOverflow: jump to line X in nano editor

Ctrl+- prompts Enter line number, column number:.

Ctrl+/ does nothing.

1

Ctrl+/ works on GNU nano 7.2 :

 GNU nano, version 7.2
 (C) 2023 the Free Software Foundation and various contributors
 Compiled options: --disable-libmagic --enable-utf8
1
  • 2
    Ventura doesn't include GNU nano any longer, running nano starts pico.
    – nohillside
    Commented Mar 7, 2023 at 7:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .