RSS

Category Archives: howto

Vim Syntax Highlighting for LessCSS

>Here’s a quick HOWTO for enabling vim syntax highlighting for .less (lesscss) files:

  1. Create the directory ~/.vim/syntax/ if it does not exist yet.
  2. Download the vim syntax file less.vim into that directory, e.g. with the command:
    wget http://leafo.net/lessphp/vim/less.vim
  3. Make sure the following statements are in your ~/.vimrc:
    syntax on
    au BufNewFile,BufRead *.less set filetype=less

That’s all.

Update (Sept. 25, 2009): Here’s a screenshot:

 
Leave a comment

Posted by on 20 August 2009 in howto, less, lesscss, syntax, syntax highlighting, vim

 

>How to print from NeoOffice at more than 300dpi

>
One of the limitations in NeoOffice 2.0 and 2.1 is that the maximum resolution when printing 300dpi. This is especially an issue when printing images with tiny details, such as screenshots. Photos are normally just fine at 300dpi.

However, there is an easy way around that:

  1. export to PDF;
  2. open in Adobe Reader and print from there.

That’s it, now you can have higher quality output.

 
 

>Undo recent Subversion commits (updated)

>Here’s a quick HOWTO for undoing recent Subversion commits. Do:

svn merge -r NEW:OLD PATH

where

  • NEW is the new (bad) revision;
  • OLD is the old (good) revision;
  • PATH is the file or directory to revert.

For example:

svn merge -r 1680:1667 src/test.java

Hints:

  • Don’t forget to commit afterwards.
  • Instead of a revision number, you can also use the literal string HEAD for the most recent revision.
  • You can only pass one path at a time, but this can be a directory name instead of just a file name. To process multiple paths in a row on a UNIX/Linux/Mac system, use:
    for f in path1 path2 path3; do svn merge -r NEW:OLD $f; done

Updated (Nov. 27, 2008): Added some hints.