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


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.


| improve this answer | |
  • 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
  • 2
    Meta, 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 Feb 20 '10 at 22:43
  • Note to new visitors: this answer is deprecated. See other answer below. – Tasos Papastylianou Apr 5 at 12:42

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.