Peter's Blog 17.2.2004

2004-02-17

PC died again.

PC died again. I could not ssh to it from work, that may well be the reason. Am not happy with it.

Used laptop to copy Gnoppix from DVD cover disk to CD using a tool for writing .IS0 images. Gnoppix is a debian linux that boots from a CD. I'll give it a go to see what debian is like. I fancy using my old laptop as a server because:

  • it should be quieter

  • it should use less power

  • it will be slower but it won't crash as much

posted at 20:58:40    #    comment []    trackback []
 

This is an interesting idea:

This is an interesting idea: http://www.pycs.net/bbum/2004/2/16/#200402161

An editor with ReST preview.

posted at 17:48:48    #    comment []    trackback []
 

While analysing a long XML file I was inspired to..

While analysing a long XML file I was inspired to play with folding in VIM. I set it up to enable folding for C, Python and XML. A middle mouse click will open a fold and a double click will close it. By default all folds are hidden. This does add a delay when the file is opened but once everything is folded it does make navigation easier. I must try to get into the habit of using this.

Here are the mappings:

" kinda like - to close folds, shift - to close all folds,
" + to open a fold and shift + to open all folds.
:map - zC
:map _ zM
:map = zO
:map + zR
:noremap <MiddleMouse> <LeftMouse>zO
:noremap <2-MiddleMouse> <LeftMouse>zC

The <LeftMouse> in the last two is there to move the caret to wherever the cursor is, otherwise the fold is opened or closed where the cursor is.

This goes in the ftplugin/c.vim file:

:syn region myFold start="{" end="}" transparent fold
:set foldmethod=syntax
:%foldo!

The last causes all folds to be open by default.

posted at 11:01:20    #    comment []    trackback []
February 2004
MoTuWeThFrSaSu
       1
2 3 4 5 6 7 8
9101112131415
16171819202122
23242526272829
Jan
2004
 Mar
2004

A blog documenting Peter's dabblings with Python, Gentoo Linux and any other cool toys he comes across.

XML-Image Letterimage

© 2004, Peter Wilkinson

Bisi and me