Follow

TIL I can press F6 to search in Nano editor instead of almost closing the window with CTRL+W every time.

Makes mucking about it proxmox much better!

@peroty what is this witchcraft? I’ve been pressing CTRL+W like a heathen for years!

@kev @peroty woah... Did not know this. Consider my mind well and truly blown

@pswilde @kev @peroty

Have you never used ^G (or F1) in Nano?, there are useful default keybindings listed

^G (F1) Display this help text ^X (F2) Close the current buffer / Exit from nano ^O (F3) Write the current buffer (or the marked region) to disk ^R (Ins) Insert another file into current buffer (or into new buffer)

^W (F6) Search forward for a string or a regular expression ^\ (M-R) Replace a string or a regular expression ^K (F9) Cut current line (or marked region) and store it in cutbuffer ^U (F10) Paste the contents of cutbuffer at current cursor position

^T Execute a function or an external command ^J (F4) Justify the current paragraph

^C (F11) Display the position of the cursor ^_ (M-G) Go to line and column number ^P (▲) Go to previous line ^N (▼) Go to next line M-▲ (M—) Scroll up one line without moving the cursor textually M-▼ (M-+) Scroll down one line without moving the cursor textually

^▲ (M-7) Go to previous block of text ^▼ (M-8) Go to next block of text M-( (M-9) Go to beginning of paragraph; then of previous paragraph M-) (M-0) Go just beyond end of paragraph; then of next paragraph

^Y (PgUp) Go one screenful up ^V (PgDn) Go one screenful down M-\ (^Home) Go to the first line of the file M-/ (^End) Go to the last line of the file

M-◀ (M-<) Switch to the previous file buffer M-▶ (M->) Switch to the next file buffer

^I (Tab) Insert a tab at the cursor position ^M (Enter) Insert a newline at the cursor position

^H (Bsp) Delete the character to the left of the cursor ^D (Del) Delete the character under the cursor M-Bsp (Sh-^Del) Delete backward from cursor to word start M-} (Tab) Indent the current line (or marked lines) M-{ (Sh-Tab) Unindent the current line (or marked lines)

@pswilde @peroty @kev

You can even unbind the defaults and rebind the keys using a custom nanorc, check out ‘man nanorc’

@Jase @pswilde @kev Nope. I've been trained by year of pressing F1 only to be met with useless "help" from other operating systems.
Yesterday I finally got fed up and went searching for nano alternatives. Which led me back to F6 (via F1's help menu).

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.