## Colors Talk: A Colorful Terminal / Console

If you’ve ever used a GNU Gentoo or Funtoo Linux variant, or a live version of any of them, you may have noticed their eye-catching colorful terminal or console. Whether you’re on a virtual console or one of KDE, GNOME, XFCE, LXDE terminal apps.

When I’ve migrated from Funtoo to FreeBSD, the one thing that I’ve missed so badly was its colorful terminal. The nice thing about these colors is taht they always give you some valuable hints, e.g., currently you’re root user or a regular user, the file is a symlink (Symbolic link), executable or just a regular file.

Well, it’s pretty easy to have your own colorful terminal or console, once you’ve found out how Gentoo and Funtoo did that. Fortunately, it works on *BSD and all other Linux distros as well. So, stay with me and I’ll describe the process in the following.

[Read More...]

## nano, Syntax Highlighting

GNU nano is my favorite text editor while I’m on console. Although, it doesn’t offer syntax highlighting by default, it comes with a decent set of syntax highlighting files. Usually, these files are exist in /usr/local/share/nano or /usr/share/nano, depending on your distro’s preference. You can enable syntax highlighting for your prefered language(s) by including related file(s) with .nanorc extension in your ~/.nanorc file.

~/.nanorc - FreeBSD
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28  include "/usr/local/share/nano/asm.nanorc" include "/usr/local/share/nano/awk.nanorc" include "/usr/local/share/nano/c.nanorc" include "/usr/local/share/nano/cmake.nanorc" include "/usr/local/share/nano/css.nanorc" include "/usr/local/share/nano/debian.nanorc" include "/usr/local/share/nano/fortran.nanorc" include "/usr/local/share/nano/gentoo.nanorc" include "/usr/local/share/nano/groff.nanorc" include "/usr/local/share/nano/html.nanorc" include "/usr/local/share/nano/java.nanorc" include "/usr/local/share/nano/makefile.nanorc" include "/usr/local/share/nano/man.nanorc" include "/usr/local/share/nano/mgp.nanorc" include "/usr/local/share/nano/mutt.nanorc" include "/usr/local/share/nano/nanorc.nanorc" include "/usr/local/share/nano/objc.nanorc" include "/usr/local/share/nano/ocaml.nanorc" include "/usr/local/share/nano/patch.nanorc" include "/usr/local/share/nano/perl.nanorc" include "/usr/local/share/nano/php.nanorc" include "/usr/local/share/nano/pov.nanorc" include "/usr/local/share/nano/python.nanorc" include "/usr/local/share/nano/ruby.nanorc" include "/usr/local/share/nano/sh.nanorc" include "/usr/local/share/nano/tcl.nanorc" include "/usr/local/share/nano/tex.nanorc" include "/usr/local/share/nano/xml.nanorc"
~/.nanorc - Funtoo or Gentoo
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28  include "/usr/share/nano/asm.nanorc" include "/usr/share/nano/awk.nanorc" include "/usr/share/nano/c.nanorc" include "/usr/share/nano/cmake.nanorc" include "/usr/share/nano/css.nanorc" include "/usr/share/nano/debian.nanorc" include "/usr/share/nano/fortran.nanorc" include "/usr/share/nano/gentoo.nanorc" include "/usr/share/nano/groff.nanorc" include "/usr/share/nano/html.nanorc" include "/usr/share/nano/java.nanorc" include "/usr/share/nano/makefile.nanorc" include "/usr/share/nano/man.nanorc" include "/usr/share/nano/mgp.nanorc" include "/usr/share/nano/mutt.nanorc" include "/usr/share/nano/nanorc.nanorc" include "/usr/share/nano/objc.nanorc" include "/usr/share/nano/ocaml.nanorc" include "/usr/share/nano/patch.nanorc" include "/usr/share/nano/perl.nanorc" include "/usr/share/nano/php.nanorc" include "/usr/share/nano/pov.nanorc" include "/usr/share/nano/python.nanorc" include "/usr/share/nano/ruby.nanorc" include "/usr/share/nano/sh.nanorc" include "/usr/share/nano/tcl.nanorc" include "/usr/share/nano/tex.nanorc" include "/usr/share/nano/xml.nanorc"

Note: If the file doesn’t exist, you should create it first:

$touch ~/.nanorc [Read More...] ## nano, Do Not Wrap Text GNU nano is my favorite text editor while I’m on console. However, there’s one thing about nano which annoys me: automatic text wrapping! Hopefully, there are two simple ways to overcome this. By using either -w command-line argument, or set nowrap configuration command within the file ~/.nanorc. 1. The temporary solution by using -w command-line argument, which should be used each time you run nano: $ nano -w /path/to/file

2. The permanent solution by setting off automatic text wrapping using the configuration command set nowrap, in the ~/.nanorc file:

~/.nanorc
 1  set nowrap

Note: If the file doesn’t exist, you should create it first:

\$ touch ~/.nanorc