MW

Tag configuration

Recent Posts

syntax highlighting for *.ini files in nano (February 27, 2011)

Use the snippet below in your ~/.nanorc or /etc/nanorc file to highlight *.ini files like php.ini in Nano.

    # ini highlighting
    syntax "ini" "\.ini(\.old|~)?$"
     
    # values
    color brightred "=.*$"
    # equal sign
    color green "="
    # numbers
    color brightblue "-?[0-9\.]+\s*($|;)"
    # ON/OFF
    color brightmagenta "ON|OFF|On|Off|on|off\s*($|;)"
    # sections
    color brightcyan "^\s*\[.*\]"
    # keys
    color cyan "^\s*[a-zA-Z0-9_\.]+"
    # comments
    color brightyellow ";.*$"

continue reading...

Syntax Highlighting in Nano (August 04, 2009)

When I’m messing around with config files on the command line my editor of choice is Nano. It’s simple, fast and pretty much straight forward. You don’t have to learn any commands and can use keyboard shortcuts just like in GUI programs.

Settings

Today I had a look on the project website and saw that there are tons of settings which I really missed before. Just have a look into your /etc/nanorc for a default config file with all settings and their default values. Here are those I like most:

  • smooth (scrolling)
  • autoindent
  • mouse (though I use it rarely)
  • smarthome
  • tabsize (8 is far to much, I love 4)

Syntax Highlighting

Yes! Nano supports syntax highlighting! And I never knew it, but heck - it’s never to late. Not for neat features like this one, though I really wonder why this is not activated by default…

In the aforementioned /etc/nanorc are already some default languages which just wait to be commented out. You might also want to have a look into /usr/share/nano, there are some languages you can include in your nanorc file with:

continue reading...

Drupal modules and other configuration (June 11, 2008)

Drupal is such a pleasing piece of software.

Just a few days ago I found some very cool new (to me) hidden functionality. Additionally I’ve installed some more modules which I want others to be aware of.

available updates email notification

Let’s start with the “hidden” functionality: Drupal 6 incorporates some parts of a Drupal 5 module which notifies you about available updates (see /admin/reports/updates). Pretty easy to stay updated with that alone. But I thought I’d had to check that page frequently for new updates. Not so! Say hello to the tab “Settings” on the very page and insert your email address to stay updated via email. Satisfying and built-in… dumb me searches in vain for a module with that functionality…

Yet it brought my interest to other useful modules:

Logging and alerts

The Logging and alerts module gives you a way to send emails to an email address of your choice in case of errors etc. Pretty neat since I don’t want to lose time by regularly scanning my log entries…

continue reading...

highlighted APT sources.list in nano (April 10, 2007)

And here another syntax file for Nano. This time it highlights the /etc/apt/sources.list:

    ## syntax highlighting for /etc/apt/sources.list
     
    syntax "apt/sources.list" "sources\.list(\.old|~)?$"
    # component
    color brightmagenta "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+ .+$"
    # distribution
    color brightred "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+"
    # URI
    color brightgreen "(http|file|ftp):/[^ ]+"
    # cdroms
    # [^\]] does not work…
    color brightgreen "cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/"
    # deb / deb-src
    color cyan "^deb"
    color brightblue "^deb-src"
    # comments
    color brightyellow "#.*"

continue reading...

Setting up your MX1000 for Linux (September 02, 2006)

After the scrolling wheel of my old Typhoon mouse went crazy (I think because of a loose contact) I bought a Logitech MX1000. A very nice mouse with superior surface detection which made a mouse pad unnecessary for me. If you’re in my position you have a mouse with tons of buttons and want to use them all. This is how I did it:

Programs

You’ll need the following programs:

  1. xbindkeys: for remaping button events
  2. xvkbd: used to send specific keyboard events
  3. xmacro: used to send specific mouse events
  4. kompose: a program for the “Application-Switch” button
  5. lmctl: for disabling cruise control Download and install those programs, Ubuntu users will find most of them in the repositories.

Xorg.conf

Follow the instructions of this wiki article, it worked like a charm for me. If you have done what stands there, logout of KDE / Gnome and restart X to see if it works.

continue reading...