Friday, September 28, 2007

Imaginary scores

(11:27:14 PM) Srikanth: dude your BB guesses are getting more and more interesting
(11:39:52 PM) Srikanth: we should probably start up an imaginative answer section :)
(11:40:07 PM) Abhijit: yeah.. scores should be a+bi
(11:40:11 PM) Abhijit: instead of the usual a
(11:40:20 PM) Abhijit: what a concept !

(Blogged for copyrighting, IPR, patenting etc..)

Wednesday, September 26, 2007

Once bitten, twice shy

A [side] effect of playing psychological pranks on people (see: http://abhijitpai.blogspot.com/2006/09/orkut-birthday-reminder-psychology-test.html) is that this time, I didn't get a single wish scrap on Orkut on my B'Day, and just one belated. Or perhaps the Orkut fad has waned (- I did get a lot more phone calls).

Typo in a permalink

I try to correct any error - typographical, grammatical or otherwise on my blog whenever it is brought to my notice (- not that this has happened many times ;) ). But a typo in a "permalink" (first pointed out by Srikanth) of a post on which people have already commented seems impossible to rectify. (Look [carefully]: http://abhijitpai.blogspot.com/2007/09/mrsit-changed-timings.html)

Tuesday, September 11, 2007

MSRIT - Changed timings

No, college (MSRIT) does not start at 8:30 a.m. instead of the usual 9.

The working hours are still 9 to 4:30, but, from the 10th of September, classes are now 55 mins (instead of 1 hour), there's a tea break from 10:50 to 11:05, and lunch is 12:55 to 1:45 (50 mins instead of the earlier half-hour).

Nice. And there seems to be some connection with the latest-joined batch joining under autonomous rules.

Saturday, September 08, 2007

Getting Vim to print increasing numbers

One of the many things I was yet to learn how to do with Vim was to generate simple increasing sequences, which could be used if I had to do something like:

From:
hello x y z

To:
hello1 x y z
hello2 x y z
...
hellon x y z


Simple copy-paste would give me n identical hello x y z lines. Then I'd have to manually enter the subscripts. So, I decided to write Vim commands that would let me print numbers from 1 too 100 in my document. The commands are as follows:

:let x=1
:map :execute "normal a" . x . " ":let x=x+1


:let i=1
:while i<=100
: execute "normal " . "\<F8>"
: let i=i+1
:endwhile

The first two lines let me get the next number after the current cursor position when I press F8. The last four give an effect of 100 presses of F8.

Should work with Vim 6.3 and above.

Refs:
http://vimdoc.sourceforge.net/htmldoc/usr_41.html