Does anyone know if there's a way to make nano support auto-complete and auto-bracket closing?
Asked
Active
Viewed 2.1k times
2 Answers
13
As of at least Nano 2.9.8, autocompletion is supported.
Pressing ^] (C-]) will check for words beginning with the current prefix in the current buffer and grab the first one. Pressing ^] multiple times will cycle through the available matches. Regardless of how many times ^] is pressed consecutively, ^[u (M-u) will undo all of them as a unit.
Greg Nisbet
- 373
- 3
- 11
9
I just downloaded and perused the source of Nano with some grepping. I can say with 95% confidence that Nano doesn't support auto-bracket or auto-complete.
Meta-] will jump to the matching bracket under the cursor though.
Sorry!
-
Oh.. that's alright. Thanks for your time. Just one quick question though: What do you mean by Meta-]? – Legend Feb 20 '10 at 22:39
-
2Meta, in *nix is usually a single-tap of Esc or holding down Alt. Try this: put your cursor on a bracket then hold down alt and push ']'. Alternatively, you can just press esc and then press ]. This depends on how your terminal and/or terminal emulator are set up. Either way, once you do the sequence, nano will jump to the next matching bracket. – Feb 20 '10 at 22:43
-
1Note to new visitors: this answer is deprecated. See other answer below. – Tasos Papastylianou Apr 05 '20 at 12:42