Tuesday, March 16, 2010

Thank you: jEdit plugin 'SwitchBuffer'

Once in a while when you start using some software development or systems administration tool (or just a feature of such tools), you find yourself thinking "why on earth did I not use this 5 years ago"?

Some tools change the way your work, more or less. They turn some task that earlier was awkward, time consuming and error prone into something you do fluently, just using your subconscious reflexes while focusing on the main task.

(You can also turn the discussion around 180 degrees and state that there are some obvious tools to use which it so much failure to not use)

The 'SwitchBuffer' plugin for the jEdit editor is such a tool. Especially for people like me who are good at collecting stuff but bad at discarding them. In the context of jEdit, that means I'm really good at opening up files, keep them 'ready for edit' in a buffer (can you tell I'm a former Gnu Emacs user?) but not that good at closing said buffers. Why? Because this enables me to keep track of certain generally relevant files, simply by knowing that they are loaded in jEdit. It is a very crude way of managing what's interesting and not, but it works surprisingly well for me. Worth noting is that jEdit remembers (and automatically reopens) all the files you work with whenever you shutdown and restart the editor.

But this means I end up with a buffer list which easily get's above 50 open files and selecting among those using the drop down menu is a bit inefficient, even when using the limited keyboard short-cutting ability of entering the first letter of the buffer name. No to mention the fact that you have to let a hand leave the keyboard in order to reach for the mouse.

But by using 'SwitchBuffer' managing all these files becomes easy and won't require any use of the mouse. This is how I did it:
  1. Use plugin manager to install the SwitchBuffer plugin. (In the case jEdit prompts you to restart the editor in order to finalize the install, then just do that.)
  2. Bind some keyboard shortcut to the action 'Show Switch Buffer' (I personally use Ctrl-Alt-PageUp). In jEdit 4.3 you do this by entering the global options, selecting the 'Shortcuts' item in the left hand tree in the dialog and then in there select "Plugin: SwitchBuffer" in the drop down 'Edit Shortcuts:'. Then in the row for 'Show Switch Buffer', click in the middle item (in the 'Primary Shortcut' column) and enter the shortcut sequence you want to use in the dialog that appears.
  3. Now start using your brand new shortcut whenever you need to switch to another buffer: a dialog appears (where the last visited buffer already is pre-entered, which is convenient if you need to switch back and forth between two buffers) and in there, you enter a string and the list of available buffers to choose in shrunk to only contain those whose names contains that string. With a well chosen string you can often very quickly narrow down the alternatives to a handful, making selection with the arrow keys and the enter key dead easy.
That's it! Happy buffer switching!

(This post is inspired by Chromatic's series of posts at the 'onLamp' blog at O'Riley where he presented in each such post a tool that were significant for him as a software developer. The title of every such blog post were simply 'Thank you "screen"', where he then described why he found the "screen" utility useful (which it really, really is by the way...))

(Of course, one could always say: "Oh, editor X does that natively... this entire post rather seem to tell me that jEdit really is a bad editor...". If you want to read this blog post like the devil reads he bible, be my guest.)

Labels:

Tuesday, February 10, 2009

Tack!!

Wednesday, November 26, 2008

How to unsuccessfully explain one's own blogging topic selection process

Intresting thought on what subjects one picks when blogging... they can be appear to be rather arbitrary. How? Well, matters that I find very important won't necessarily find their way into my blog, for a number of reasons. For example, my four kids are really important to me, still I'm not keen at all to expose them on the internet. Other stuff, far more trivial for the world, like a new release of the Parrot virtual machine might actually be mentioned.

It is easy (ok, at least for me) to start thinking along the lines that "I should not blog about this because I haven't blogged about that specific (and more important) thing first, not to mention that other also important thing" and so on. That way of thinking have some logic in it but basically, I think it is a trap, a dead end which leads into no blogging taking place. It is a bit like when I get down to Gothenburg (my old town of birth which we moved away from for 12 years ago) and tries to see people down there: who I happen to see and who I don't might easily be a matter of random events happening, unexpected opportunities surfacing as well as expected meetings not taking place due to something cratering someone's schedule etc. Sure, there are choices taking place of who I try to see, but the slight (?) chaos of life easily circumvent those choices.

So what does that mean? Well, just because I don't see someone down in Gothenburg during the few weeks spent down there during the summer does not necessarily mean the the person does not matter. Same goes for blog topics, actually. The exclusion of some topics which from one point of view is important for me does not mean I should avoid other topics that are less important from that view.

I'm not writing this blog to express myself as whole, I'm free to leave out major parts I don't think fit. The important thing for me perhaps is to try to express the stuff I don't have time to express elsewhere. Or stuff that I would like to share with people even if I beforehand don't know who that would be.

Wow. A blog about why one is blogging. That's quite meta. That's also quite pathetic, but that's cool. I don't mind that much being a bit pathetic. Why pretend being someone else than myself?

Ok, see you.

Thursday, December 20, 2007

www.illvilja.se is alive again!

...as if it ever was dead. Ok, it has been unavailable for quite a few months but it was just... resting.

Not that it contains anything revolutionary for the world but the URL to my dear home page is still www.illvilja.se.

(If a site with amazingly sluggish response times can be considered alive is a completely different discussion..)

Tuesday, June 26, 2007

Nejdå, jag har inte glömt er...

...men det finns vissa privata saker som hänt de senaste dagarna, veckorna och månaderna som jag inte nödvändigtvis tar med här.

Men det är skönt att få se Göteborg igen, t.o.m att vandra kvällstid i ösregn bärandes på ett sovande barn från västra nordstan till Olivedal med gatlyktorna speglandes i asfalten känns lite nostalgiskt. Det är sånt här väder man skall cykla i. Som en kollega på Göteborgskontoret uttryckte det: "det här är inte regn, det är bara lite fukt". (Angående ett väder som hade kunnat få en Stockholmare att drunkna...)

...och ja, jag är envis som synden. Den där cykeln skall användas nästan till varje pris. Kanske lite opraktiskt men den är ändå bra att ha!

Jag har dessutom fått en del "nygamla" släktingar, vi försöker allihop se till att kontakten håller framöver. Och så har jag fått en del inblick i min familjs historia bakåt, även om aldrig alla frågetecken kan skingras så är det något som jag insett är viktigt för mig.

En så kallad back-end för ett play-by-mail har jag också hunnit med. Världens enklaste play-by-mail iofs men i sann extreme-programming-anda, börja med något löjligt enkelt och bygg ut steg för steg. Men det får avhandlas i en egen post (förmodligen på engelska). och ja, detta är det PBM jag försökt få ändan ur att skriva de senaste 15 åren, heh.

Ok, enough for today. Det är sent. Lillan behöver en flaska välling och en ny blöja. Och jag behöver sömn.

Godnatt Göteborg! (och tack till våra vänner att min familj har någonstans att sova i Götet)

Pidgin (former Gaim) version 2.0.2 is out.

Pidgin has been released in a new version, 2.0.2. There probably are a bunch of fixes 'under the hood' (getting rid of bugs, speeding up things and so on) but one visible fix is that the Pidgin mascot (that pidgeon used in Icons etc) seem to be a little less high on some illegal drugs... the eyes are a bit more normal so to speak. Hopefully my workmate using Pidgin in Windows will experience less instability as well. (For me, Pidgin 2.0.0 and 2.0.1 has worked as a charm, but I run it under Linux, hence my varying mileage...)

Wednesday, June 20, 2007

Parrot 0.4.13 released.

There has been a new release of the Parrot virtual machine (homepage, Wikipedia entry). I tried to download this 0.4.13 release and even if there is no link to it yet from the project homepage (which currently only links to 0.4.12) I found a .tar.gz file for 0.4.13 here!

For you all Perl6 (and other Parrot supported language) daredevils, download and try it out! (I'm certainly doing it.)

Tuesday, June 19, 2007

Happy New Year! (Yeah, I know it's late...)

This is amazing... so far, I have managed to post one post per year. That's frequent blogging folks!

Other than that, some very personal stuff has happened in my life which I might write about later in this blog, or perhaps not. It depends. And some personal stuff I will write about, at least in this post: My wife and I are expecting our fourth kid! And our oldest has turned adult (which here in Sweden means that she is 18 years).

One about to be born and one all grown up... gives you some perspective on the term "generation". And gives some perspective on life as well. And then we have our two other kids, the soon to be 2 year and the quite recent teenager. Lucky us! (No, I'm not sarcastic, I'm serious! And perhaps a bit crazy too...!)

Gothenburg's coming up. We will spend about 10 days there. It's going to be really, really nice to see that town again.

And STS-117 (the wierd notion for the latest and gratest space shuttle mission) is about to come to an end. The part left is to check the heat shield and then... reentry on Thursday. Gonna keep my fingers crossed.

(Woo... I turned English today, don't know if that will be a habit though.)

See you!