Configuring Nano editor on Linux for Colour Syntax Highlighting and Bracket Matching for editing Config Files

Nano editor is always installed by default on any Linux distro, including Raspberry Pi's, and is probably the most used editor for simple config file editing. By default though it is black and white plain text. Two simple tips can get it into a very useful mode for helping you highlight syntax issues when editing config files for the various projects you need to set up.

  • First is to install NanoRC from the link below and configure according to guide there. This will highlight code for most languages used. For a Raspberry Pi this may be all taht is needed to execute:
    curl #^https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh | sh
    echo "include ~/.nano/*.nanorc" >> ~/.nanorc
  • When standing on any bracket you can use ALT-] to jump to the corresponding bracket to check if they match where they should.

See scopatz/nanorc

#technology #linux #opensource

Image/photo

Improved Nano Syntax Highlighting Files. Contribute to scopatz/nanorc development by creating an account on GitHub.



source https://gadgeteer.co.za/configuring-nano-editor-linux-colour-syntax-highlighting-and-bracket-matching-editing-config-files

Comments