Apr 30, 2008

Tabbing in Opera and Notepad++

Notepad++

I'll get to Opera in a bit. It took a quick read-through of the source code (hurrah for open source), but I've finally got Notepad++ tabbing set up exactly the way I like it. For the non-techies reading this, Notepad++ is a free and full-featured text editor for Windows which is meant to replace, and beat the hell out of, Windows Notepad. In fact it does such a good job that I'd rather use it than pretty much all the other editors I've ever used.

After recently being forced to install Ubuntu Linux on my laptop (and loving it), I missed N++ so much that I downloaded and started running it with Wine, a kind of environment which fools a Windows-only program into thinking that it's running in Windows. (I've used Wine before to play Windows games such as Diablo II.)

Anyway, a couple of things were bugging me about Notepad++. Firstly, its tabs couldn't be navigated using the standard Ctrl-PgUp and Ctrl-PgDn keys. The program author doesn't consider them as standard as Ctrl-Tab, and leaves it up to you to change the shortcuts. Well, this I did, but N++'s default tabbing settings also show a small `task list' of open documents whenever you try to switch among tabs. For some reason this task list doesn't automatically disappear under Wine as it would under Windows. You're forced to right-click on it to choose the tab you want.

So this was the situation. What I did was:


  1. Go to Settings > Shortcut Mapper... and, under the `Main menu' commands tab, changed the last two items's (`Switch to previous document' and `Switch to next document') shortcuts to Ctrl-PgUp and Ctrl-PgDn respectively. It's pretty easy--double-clicking on the command lets you choose a shortcut graphically.

  2. Go to Settings > Preferences... and, under the `MISC' tab, disable the `Document switcher (Ctrl+TAB)', which is what N++ calls the task list there.



That's it. With this setup, N++ has tabbing the way God (and Firefox) intended--with Ctrl-PgUp and Ctrl-PgDn.

Opera

Opera is the shiznit, if I may use the term. Particularly the latest beta version, currently 9.50. I, a long-time Firefox user, have been enjoying its speed, new `speed dial' feature, new `quick find', built-in Bittorrent downloading and IMAP-enabled email client which lets me access my Gmail. It really gets the job done, and then some. Everyone should seriously try it out. The only thing is, to a Firefox veteran like me, I can't live without my Ctrl-PgUp and Ctrl-PgDn.

Opera has Ctrl-Tab tabbing with a task list by default--almost exactly the same as N++. Here's what I did to get back good-old Ctrl-PgUp & Ctrl-PgDn:


  1. Go to Tools > Preferences..., then the Advanced tab, and the Shortcuts list item on the left side.

  2. Make sure the Opera Standard keyboard setup is selected and then click the second Edit... button to edit the setup.

  3. Type `cycle' in the Quick find search box on top of the Edit Keyboard setup dialog. This shows the page (tab) cycling commands. Double-click shortcut (on the left) for Cycle to next page and change the shortcut to `PageDown ctrl'. Then change the Cycle to previous page shortcut to `PageUp ctrl'.

  4. Type `page left' in the search box and clear the shortcut for the Page left command. Really doubtful I'll ever need to scroll horizontally in screenfuls. If I ever do, I can worry about it later. Then type `page right' and clear the shortcut for the Page right command. We need to clear these because they would clash with our tabbing commands.

  5. Click OK to get back to the Preferences window.

  6. In the Advanced tab, click the `Tabs' item on the top left and under `When cycling through tabs with Ctrl+PageDown', select the `Cycle without showing list' option. This makes tabbing exactly like classic Firefox.



The reason I tackled both these programs here is there's a large similarity between what I had to do with each. Will try to put up screenshots later.

A Shoebox Budget

A recent Lifehacker article gave me the idea of turning my formerly-useless Nokia phone box into a repository of all my receipts:



This way I figure I can follow my dad's advice about reconciling my spending with my monthly bank statements, say, once in a blue moon when I have some free time.

I still have the Expensr webapp, but man it's hard to get back into the habit of using it every day!

Apr 29, 2008

Found in Response to a PC World Article

The article, 18 Features Windows Should Have (but Doesn't) elicited some less-than-reverent responses from readers:

zipzap said at Apr 29, 2008, 05:04: `Oh yea, MS really want to put more built in software... so they can get sued for being uncompetitive and monopolistic and all that rubbish.'

And at Apr 29, 2008, 05:59: `Things PC World should have but doesn't:

1) Brains
2) More Brains
3) A little more brains'

Fantastic.

Also, it's a little weird to see PC World so out of touch with its readship--nimble online blogs like Lifehacker often do a much better job at giving us the tips and tricks we need to get the most out of our PCs.

Apr 28, 2008

Hilarious Misuse of `Mullahs'

I found this hilarious new usage of the term `Mullahs' and couldn't resist putting it up here:

`Furthermore, I made the switch because developing Ruby on Rails applications on Windows is such a pain, and most developers know this, so they go out and buy Macs. Well my friends, you can save your mullahs and turn your stock standard Dell into a kick arse development environment for Rails. Just check out the screenshot of my desktop below.'

For those not in the know, mullahs are respected Islamic scholars who often give sermons at mosques. Basically the Muslim equivalent of clergymen. Now what this inadvertent author probably meant is `moolahs'. Lol.

Apr 23, 2008

The Monkey King ... er, The Forbidden Kingdom

VERY enjoyable movie. Jackie Chan and Jet Li together make movie magic--I just had to say it--and give the audiences a compelling show. Ironically, Chan and Li both come from this genre of action movies--chop-socky--but they had to do Western-style action movies to achieve Hollywood star power. And meanwhile, the genre was revived by such notables movies as Crouching Tiger, Hidden Dragon and House of Flying Daggers.

OK, now that I've had my say, the movie. The hero is the ordinary and likeable kid in Brooklyn (Boston?) obsessed with old kung fu movies, Jason Tripitikas (Michael Angarano, who perfected the ordinary-guy-forced-to-become-a-hero technique in Sky High, another enjoyable movie--sorry, now I've had my say :-). He frequents the old Chinese memorabilia shop around the corner always in the hope of finding another old kung fu classic.

One day he finds an ancient staff of power in the store, and the elderly proprietor tells him that it's waiting for someone to return it to its rightful owner ... a mischievous deity known as the Monkey King. The Monkey King is probably the most interesting character in the movie, although he's absent for most of it. (Indeed I keep thinking of the movie as The Monkey King. Hence the accident-on-purpose title to this post.) The legend goes that he was imprisoned in stone after being tricked by the Bad Guy, who we'll come to in a bit.

Almost as if on cue, Jason gets into serious trouble with some of the neighbourhood thugs. Although the thugs do look like they could be from the cast of West Side Story, they are deadly serious for Jason, who is forced to run for his life, with the staff in his hands by accident.

He's cornered by the thugs, who're about to kill him, but the staff mystically transports him into ... The Forbidden Kingdom ... I guess, a faraway ancient China. He regains consciousness to find that some kindly villagers have taken him in, and finds soon enough that the villages and people of the kingdom are mightily oppressed by the armies of the Jade Warlord, who rules over the Kingdom in the absence of the Heavenly Emperor, and has imprisoned the Monkey King by tricking him into parting with his magical staff.

By chance, Jason is saved from some Imperial soldiers by Lu Yan (Chan), a vagabond who drinks wine all day and swaggers along until he's forced to fight, at which time you get to see some MAD skillz. Recognising the holy staff and taking Jason for a monk who is trying to return it to the Monkey King, Lu Yan takes Jason under his wing and teaches him the kung fu he will need to defend himself. They're joined by Golden Sparrow, a young maiden who has her own reasons to go along with them.

Along the way they meet The Silent Monk (Jet Li), who mistakes Jason for a thief and snatches the staff from him, leading to maybe one of the most anticipated fight scenes in movie history, between Chan and Li. Eventually they learn they're on the same side, and share a good laugh over Jason--`He's not even Chinese!'

Anyway, that's the setup, and these four characters are faced with the quest of returning the staff to Four Elements Mountain and freeing the Monkey King from his stone prison, where he's been for the past 500 years while the Jade Warlord terrorised the Kingdom unchecked.

Now, I won't talk about the quest itself--how Jason is trained by the two martial arts masters, how they survive a desert crossing to come to Four Elements Mountain, or how one of them is treacherously shot in the back by the White-Haired Bride (another staple of old martial arts cinema), and what Jason has to do to save that person. But it's all well worth watching, in the theatre if you can, with friends or a girlfriend (I think).

But I will talk about the Monkey King a bit. He is an unbeatable warrior with his mystic staff of power, and a mischievous spirit, always thumbing his nose at authority--especially the Jade Warlord, who is the Commander of the Imperial Army. This is what arouses the Warlord's hatred of him, and maybe what turns him evil. The motivations of the deities aren't examined in full--probably the movie would become an angst-ridden existential piece--but there's just enough there to leave you wondering what kind of politics they would have had in a heavenly imperial court. Hypothetically speaking, of course.

There's one thing I want to rant about. Apparently the consensus in reviews of the movie is `Great fight scenes, but too much filler'. To me, it was just the right amount and length. I've heard about, and been sceptical of, American audiences' apparent desire for `dumbing down' of movie plots, but this movie has an intriguing plot which makes you care about the characters, wonder about the life and times of the setting, and miss it when Jason gets back to New York, as he must in the end. If you don't know some backstory, how can you fill in the blanks in your head with interesting fantasy? That's part of what makes it fun. It's like these reviewers want a made-to-order story with exactly right amounts of setup and payoff, and no lingering anywhere, in case they're forced to think about a fantasy world (<Deity> forbid).

At one point, understandably, Jason's reaction to finding himself in ancient China is thinking it's a dream. There's a moment slightly after this where it's driven home to him how dangerous the dream is. Lu Yan for once sheds his humorous nature and says to Jason something like, `If you die in this realm, you will be found dead where you came from!' A dire warning in an otherwise light-hearted movie. The mix of light and heavy elements is right.

SPOILER WARNING: There is a spoiler (at least by my reckoning) in the comment below. Scroll down to see it.