Lazy Hacker Babble

Just some random babblings from a lazy hacker…

Archive for the 'Main' Category

VIM copy/paste/navigation in Insert mode.

Posted by hsin on 6th March 2010

A few months ago, I made a commitment to learn the VIM editor. I was primarily an EMACS user, but I wanted to become proficient with VIM since EMACS is not always available I found myself too slow when using VIM. To learn it, I pretty much told myself that I’m not allowed to use any other editor while programming and just immerse myself in VIM. For the most part, it worked. I’ve been using VIM daily for about 4 months now and I’ve gotten used to it… mostly.

I can see the reasoning and benefits of having a separate mode for inserting text, but for me it isn’t as intuitive to use. Maybe my fingers are just to conditioned to be able to write chunks of text and still be able to copy, paste, etc. The way I work, I edit text while jumping around a lot and that mode leads to a lot of hitting ESC to the point where I’m using more key strokes then on EMACS (where the criticism is that it requires mult-combos to do an action such as ‘C-x C-c’). So I found myself editing text, ESC, move around, ‘i’, edit text. For the most part, I was willing to live with that, but the breaking point is that I just kept making mistakes editing. I’d hit ‘i’ when I’m already in edit mode or be typing outside of edit mode leading to typos and jumping to another part of the screen. I figure that 4 months is enough and while I’ll stay with VIM, I’ll likely be in Insert mode a lot and so I want to reduce bouncing back-and-forth between modes.

I made the following changes to my .vimrc to allow me to do things like move around (without using the arrow keys) and copy/paste without leaving Insert mode:

" Key mappings in INSERT mode
" Tired of lifting hand to hit ESC or having ctrl-[
imap ;; <Esc>

" navigate without lifting hand off of keys
imap <C-h> <Left>
imap <C-j> <Down>
imap <C-k> <Up>
imap <C-l> <Right>

" paste in Insert Mode
imap <C-v> <C-o><S-p>

" undo
imap <C-u> <C-o>u

" Select text
imap <C-c> <C-o>vgG
 

Posted in Main, Programming | No Comments »

If I had some carpentry skills to build my own desk.

Posted by hsin on 22nd February 2010

I’d want to build this desk.

Posted in Main | No Comments »

WordPress for Android

Posted by hsin on 3rd February 2010

Another app I’ve been waiting for has been released. WordPress for Android is now available. Each day takes me further from the iPhone.

qr code

Posted in Main | No Comments »

Haagen-Dazs Green Tea Ice Cream!!!

Posted by hsin on 1st January 2010

10 years ago my wife and I took a vacation to Japan where we found one of the best tasting ice creams we ever had. It was the Haagen-Dazs green tea ice cream. When we came back to the States, we tried looking for it, but it seems that it wasn’t a flavor that Haagen-Dazs sold in the US. We tried other brands’ green tea flavors, but nothing really matched what we had in Japan.

Today, after 10 years of searching, we found this at our local grocery store:

green tea ice cream

Yay!!!

Posted in Main | 1 Comment »

Approaching the End of the Decade

Posted by hsin on 30th December 2009

Did 10 years really just went by?!? I still remember when we were gearing up to tackle Y2K and we’re now approaching the end of the first decade of the millennium.

Posted in Main | No Comments »

How Bad Are the Chicago Bears?

Posted by hsin on 29th November 2009

The only thing that Bears fan can look forward to is for the Bears to continue to be humiliated so badly that the coaching staff and team management are forced to face reality and start making some changes. It’s pretty sickening to hear them talk when they are 4-6 about how they’re still in post-season chase. Give the fans some credit! I love the Bears and I cheer for them even when they lose, but please show some effort! Every week, it team looks dejected and seems like they are just trying to get home. It would be nice to see some emotion and passion from somebody. As you listen to the broadcaster in each game, they language they use to describe the team is the language used about a rebuilding team. Essentially, they’ve stopped talking about the current team and can only find positive things to say on which young players have the POTENTIAL to some day be a good player.

The Bears were so bad that on a nationally televised game Fox actually switched away to another game because the Bears played so badly. Nearly every week a team play the Bears and come away with some sort of record. Last week it seems like it was the first time in a long time that I saw the Bears have the lead even if it was short lived. Against the Vikings, Minnesota scored on 8 of 9 possessions. They are not even competitive anymore.

Posted in Main | No Comments »

Being Thankful

Posted by hsin on 26th November 2009

With all that has been going around, I’m very thankful of having my family and the friends who have helped us get through everything.

Happy Thanksgiving, Everyone!

Posted in Main | No Comments »

Consola Font Pack

Posted by hsin on 31st August 2009

Microsoft’s mono-spaced font:

http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&displaylang=en

Posted in Main, Programming | No Comments »

2009 NBA Champion: LA Lakers!!!

Posted by hsin on 15th June 2009

Every post-game interview last night asked how this championship is different from the 3 Shaq-Kobe ones. As a fan, this one was different then those three since this one came after a loss in the previous finals that led to an entire season where the focus is just on winning the championship. Maintaining the focus throughout an entire season must be so difficult that it should set this one apart from the others.

Posted in Main | No Comments »

Lakers vs Magic Game 4

Posted by hsin on 11th June 2009

A couple of observations from Game 4.

Beyond D-Fish’s clutch 3s was how much energy and effort he brought to the game. He out hustled everyone in that 3rd quarter. Everyone, go watch him again. That’s heart.

Kobe showed a little frustration when Howard had his arms wrapped around him during a foul, but it was through a complaint to the ref. He must have the patience of a saint because to have people draped over him on every play like that would piss most everyone off. I would guess that most players would’ve retaliated under that kind of foul and harassment.

Posted in Main | No Comments »