Is there a way to make Nano support auto-complete and auto-bracket closing?

4

1

Does anyone know if there's a way to make nano support auto-complete and auto-bracket closing?

Legend

Posted 2010-02-20T22:02:05.107

Reputation: 704

Answers

5

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!

Sam

Posted 2010-02-20T22:02:05.107

Reputation: 848

Oh.. that's alright. Thanks for your time. Just one quick question though: What do you mean by Meta-]? – Legend – 2010-02-20T22:39:12.463

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. – Sam – 2010-02-20T22:43:50.750

4

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.

Gregory Nisbet

Posted 2010-02-20T22:02:05.107

Reputation: 225