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:

git clone git@github.com:scopatz/nanorc.git ~/.nano
cat ~/.nano/nanorc >> ~/.nanorc
									

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:

include ~/.nano/apacheconf.nanorc
include ~/.nano/asciidoc.nanorc
include ~/.nano/asm.nanorc
# include ~/.nano/awk.nanorc
include ~/.nano/c.nanorc
include ~/.nano/cmake.nanorc
# include ~/.nano/coffeescript.nanorc
include ~/.nano/colortest.nanorc
include ~/.nano/conf.nanorc
include ~/.nano/csharp.nanorc
include ~/.nano/css.nanorc
include ~/.nano/cython.nanorc
include ~/.nano/dot.nanorc
include ~/.nano/email.nanorc
include ~/.nano/fish.nanorc
include ~/.nano/fortran.nanorc
include ~/.nano/gentoo.nanorc
include ~/.nano/git.nanorc
include ~/.nano/gitcommit.nanorc
include ~/.nano/glsl.nanorc
include ~/.nano/go.nanorc
include ~/.nano/groff.nanorc
include ~/.nano/haml.nanorc
include ~/.nano/html.nanorc
# include ~/.nano/ini.nanorc
include ~/.nano/inputrc.nanorc
include ~/.nano/java.nanorc
include ~/.nano/javascript.nanorc
include ~/.nano/js.nanorc
# include ~/.nano/json.nanorc
include ~/.nano/keymap.nanorc
include ~/.nano/kickstart.nanorc
include ~/.nano/ledger.nanorc
include ~/.nano/lisp.nanorc
include ~/.nano/lua.nanorc
# include ~/.nano/makefile.nanorc
include ~/.nano/man.nanorc
include ~/.nano/markdown.nanorc
include ~/.nano/mpdconf.nanorc
include ~/.nano/mutt.nanorc
include ~/.nano/nanorc.nanorc
# include ~/.nano/nginx.nanorc
include ~/.nano/patch.nanorc
include ~/.nano/peg.nanorc
include ~/.nano/perl.nanorc
include ~/.nano/php.nanorc
include ~/.nano/pkg-config.nanorc
include ~/.nano/pkgbuild.nanorc
include ~/.nano/po.nanorc
include ~/.nano/pov.nanorc
include ~/.nano/privoxy.nanorc
include ~/.nano/python.nanorc
include ~/.nano/reST.nanorc
include ~/.nano/rpmspec.nanorc
include ~/.nano/ruby.nanorc
# include ~/.nano/sed.nanorc
include ~/.nano/sh.nanorc
include ~/.nano/sql.nanorc
# include ~/.nano/systemd.nanorc
include ~/.nano/tex.nanorc
include ~/.nano/vala.nanorc
include ~/.nano/vi.nanorc
include ~/.nano/xml.nanorc
include ~/.nano/xresources.nanorc
# include ~/.nano/yaml.nanorc
include ~/.nano/yum.nanorc
include ~/.nano/zshrc.nanorc

									

Pimp your Fedora

Although the use of Fedora is not as extended as Debian/Ubuntu/Linux Mint, it’s a robust distro and it’s really wide-distributed and easy to use. Unlike Ubuntu and Linux Mint, Fedora is not based on Debian, but on Red Hat, and it includes Gnome 3 as the default desktop.Guidelines-fedora-logo.jpg

If you are thinking about giving a chance to this great distro, for sure these utils are going to save a lot of time and effort:

Fedy: Installs codecs, software, repositories…

su -c "curl https://satya164.github.io/fedy/fedy-installer -o fedy-installer && chmod +x fedy-installer && ./fedy-installer"
									

Gnome Tweak Tool: Customize advanced Gnome 3 options.

sudo yum install gnome-tweak-tool
									

dConf Editor: Editor for low-level settings.

sudo yum install dconf-editor
									

Gnome Extensions: add plugins and extra functions to your Gnome 3 desktop.

PostInstallerFedora: simplify and automatize the installation of a long list of available software.

 

 

Fedora 20 not booting after installing nvidia drivers

After installing the propietary nvidia drivers from the RPM Fusion repository, probably Fedora 20 is not going to finish the booting process… However, pressing [CTRL]+[F2] we can log in the text-only terminal and fix the problem.

  1. Remove the installed drivers:

    sudo yum remove xorg-x11-drv-nvidia* nvidia-settings nvidia-config
    									

  2. Reboot:

    reboot
    									

  3. Now you should have a basic graphic interface. Go to /etc/X11 and remove any xorg.conf files. You will need superuser permissions.
  4. Clean and update yum:

    sudo yum clean all; sudo yum update
    									

  5. Install nVidia:

    sudo yum install kernel-devel akmod-nvidia xorg-x11-drv-nvidia-libs
    									

  6. Force akmod:

    sudo /usr/sbin/akmods --force
    									

  7. Reboot.

That should be enough to solve the problem.