When I am wearing my programming hat, there are two killer features I need: brace matching and syntax highlighting. I was recently jarred by how much I had come to depend on syntax highlighting when opened a source file on a foreign computer where highlighting was not configured. I thought, how am I supposed to make sense of this? Then I remembered that I didn't always have highlighting and managed to get by.
Anyway, I dug into the current release of nano and found brace matching can be enabled with this .nanorc setting:
set matchbrackets "(<[{)>]}"
A matching brace can be found by putting the cursor on one and using Alt-].
Syntax highlighting has to be defined in the .nanorc file for each type of file. In Red Hat Linux and CentOS, a lot of languages are available to be included in the .nanorc file in
/usr/share/nano/
. For example,## RubyGo nano!
include "/usr/share/nano/ruby.nanorc"
No comments:
Post a Comment