Monthly Archives: October 2007

Finding the other } of the code with VI

My curiosity arise on the way the vi handles the { and ( that it highlights its pairs } or ) whenever the cursor points the their pairs. I was thinking there should be a way of forcing my cursor to go to its partner brace or (. When I ask my friend if its possible the answer is “maybe”. When I ask my google friend it turns out that there is a really a way.

And the way on is only by pressing “%” character .

Fixing ^M error on text file

A few weeks back, with my new job, I’ve been plunging deeply into the Xen environment and Perl programming, but of course I believe I wont abandon being a Pythonista. After all, its my fav. language and I still have an unfinished project hosted in Sourceforge site.

When I try to run my python program, I’ve encountered this kind of error :

bash: ./pytodolist.py: /usr/bin/python^M: bad interpreter: Permission denied

Googling the solution for this one..I’ve found the answer which tells me to use a small perl code which is : perl -i.bak -pe ‘s/r//g’ *.py

Running again my program..It now works 🙂