6 ms·
How do you navigate text in nano?
by bigdict 5y ago
How do you navigate text in nano?
- pphysch 5y agoSlowly
- 28175022 5y agoAs much as we all enjoy low effort posts, there are a number of shortcuts to move around, as well as the general "find" option. https://www.nano-editor.org/dist/latest/cheatsheet.html https://www.nano-editor.org/dist/latest/cheatsheet.html
- pphysch 5y agoIf we're gonna learn a stack of key combo shortcuts, why not go with a editor that was designed with that in mind (i.e. key combos organized into a hierarchy rather than a huge flat mess)?
- gravypod 5y agoNote: I'm not saying nano is perfect but these are some nice features. The key bindings are at the bottom of the screen. Example: https://imgur.com/tFVNFc4 https://imgur.com/tFVNFc4 ^ is CNTRL. > why not go with a editor that was designed with that in mind (i.e. key combos organized into a hierarchy rather than a huge flat mess)? Nano has a tree-like structure. There are a a few root commands for common things but a menu like "replace" has these options shown: https://imgur.com/5IKRyeC https://imgur.com/5IKRyeC In this screen you can see "M" which means the ALT key. These names (^, M) are not ideal but they have their roots in the originally common teletype names (control, meta). It's not the best but it's easy once you remember those two things since you need to remember nothing else. An important note about these menus: they remember your previous insert. If you click the up arrow key you can go back in time to previous searches just like your terminal. It's how I could say that 4 searches ago I looked for `affinity_test`. Also, nano supports all of the standard navigation you will be used to. Things like: - Page Up/down: Go up/down an entire page of text. - Arrows: Navigate text one character/line at a time. - Scroll Wheel: Move cursor up/down for each input. - ctl + left/right arrow: Move one "word". - Home / End keys: beginning and end of line. So, the things you already know from all other programs directly apply. The things that aren't the same that you will use are at the bottom of the screen or behind a "CNTRL+G" menu that is at the bottom of the screen. All for giving up ~3 vertical lines of text. I just checked and at my default font size I can fit 57 lines on my monitor so I'm giving up 5% of my screen so anyone, regardless of skill level, can sit down at my computer and know how to operate the text editor.
- gruez 5y ago* arrow keys * pg up/down * find (^W) * go to line (^_) the first two are standard across applications, and the last two are in the help menu that shows up by default.
- bruce343434 5y ago> (^_) Confusingly, this is actually not a ctrl (^) shortcut at all. It is alt-g.
- tpoacher 5y agono, it is control underscore alt g is another binding for the same.
- rahimnathwani 5y agoNot confusing. ^_ is ctrl and underscore underscore is shift and minus So ^_ is ctrl and shift and minus. On my computer, doing ctrl+shift+- brings up 'Enter line number, ...'.
- RandallBrown 5y agoctrl + underscore is go to line, column for me Am I misunderstanding what you mean?
- techrat 5y agoHell, even the mouse scroll wheel works.
- Palomides 5y agolesser known nano fact: with -m it supports mouse clicks for cursor movement