Showing line and column in nano

Another missing feature in nano is showing the line (an also the column) while we are editing a file. There’s two possible solutions:

1.- Opening nano with the -c option

[codebox 1]

2.- … or modifying .nanorc:

[codebox 2]

And then add this line to the beginning:

[codebox 3]

Syntax highlighting in nano

We are used to some great pieces of software like Gedit, Notepad++, Brackets or Atom for writing our code. Among their multiple advantages, the syntax highlighting is one of their most useful, as it help us to quickly identify the blocks of our code.

However, sometimes we need to use the terminal, for example, for editing a file that is being through ssh.

Thanks to scopatz we can easily modify our nano to show our code in colours and highlight the syntax:

[codebox 1]

Screenshot from 2014-05-30 14:05:48

Take a look to his nanorc‘s github for more details.

Note:

If you are using a version of nano under 2.1.5, your .nanorc should look like this to avoid compatibility problems:

[codebox 2]