urxvt mouseless url yanking
In the quest for a completely mouse free desktop, I wanted to be able to yank URLs from the termial without using the mouse. This happens often enough in IRC when I would want to grab the most recent URL and run it in firefox. I talked to the author of vimperator and he suggested that I look at urxvt (packaged as rxvt-unicode). So I did. A few hours later and I have a perl plug-in for urxvt that does just want I wanted.
gitdiff.vba v2
I released version 2 of my gitdiff.vba vim script. It now supports two features: :GITDiff [commitish] Split the vim window vertically, display the HEAD, or some other changeset, version of the file in the split, then diff them. :GITChanges [commitish] Highlight lines that were changed since the HEAD or some other changeset. I also started using the VimBall script, which is a package format for vim scripts. So to install it, you need to first have the vimball extension. Further, if you have the GetLatestVimScripts you can use the :GLVS commands to automatically upgrade your packages.
india
I got some obfuscated code from a buddy (of Indian origin coincidentally) that draws the map of India. It’s obfuscated code, but it’s not perl.
zsh fun
I have been playing with zsh a bit today. Here is the outcome: use vim to view man pages; this requires manpageview.vim vim plugin. function vman() { vim -c ":RMan ${*}" ; } these function store the current directory in X clipboard and then restore the path from the clipboard, which is handy when you want to restore the path in another xterm… function xpwd () { pwd | xclip -i ; xclip -o ; } function xcd () { cd `xclip -o` ; }
pipe to pastey.net
Here is a little script that lets me post to pastey.net from a shell prompt #!/bin/bash set -e AUTHOR=bartman SUBJECT=pipe LANGUAGE=c w3m -post <( echo -n -e "language=$LANGUAGE&author=$AUTHOR&subject=$SUBJECT&tabstop=4&text=" ; sed 's/%/%25/g' | sed 's/&/%26/g' ) \ -dump http://pastey.net/submit.php
vimgrep alias
I’ve been using Solaris recently… since yesterday. First reactions: How can anyone use their command line tools!? Fortunately the system I was on had zsh and vim. Here is a macro I use to avoid Solaris grep: function vimgrep () { tmp="$@" ; vim -c "vimgrep $tmp | copen" ; } (I could not figure out a way to do it w/o the tmp variable) Now you can do things like:
mouse-free
First there was a Navigator, then there was an Explorer. Later it was time for a Konqueror. Now it’s time for an Imperator, the VIMperator :) VIMperator is a mozilla/firefox plugin from Martin Stubenschrott. It completely redefines the firefox interface to mimic the beloved VIM editor. If you love vim, you are likely to love VIMperator. If not… well, your loss.
ATA messages via SCSI layer
I’ve been working on a contract for Symbio Technologies for the last month. They are makers of a few thin client terminals. My work for Symbio involves talking to a SATA hard disk using ATA command set. What makes this a bit more interesting is that /dev/hda is the way of the past. New devices are covered by libata drives which fit into the SCSI subsystem. So, the challenge for me was how to send raw ATA messages using the SCSI layer to the SATA drive. Besides the fact that the interface is sparsely documented, it was pretty easy.
GITDiff vim plugin
Taking a TODO item off my list, I am adding a plugin to vim that splits the current window and presents a diff between the current file and any revision of that file in the current git repository.
git presentation for OCLUG
I am giving a intro to git tutorial for oclug tomorrow. Here are the slides in PDF format. If you are one of the lucky ones and magic point works for you, you can also grab the source tarball.