Tuesday, April 28, 2009

emacs sort lines.

I always tend to use OpenOffice spreadsheet for sorting numbers or lines. I knew, there will be something in emacs to do the same. But, I was so lazy to figure out for long time. Today, i did google search and found a way to sort-lines.

mark the region using C- and moving cursor across lines and then,

M-x sort-lines

source:
http://edivad.wordpress.com/2008/04/11/emacs-sorting-lines/

Wednesday, April 22, 2009

emacs learning experience

I always wanted to do lot of programming and learn emacs very well. Unfortunately my initial career wasn't gave me opportunity to do lot of programming but put me in lot of analyzing skills. However, today i'm writting lots of lots of 'C' code and 'C' language is one of my favorite from my college days. Friends from my college used to call me as "Pointer" :). May be dangling ptr :)... I dont know....

Decided to blog about features i learn in emacs whenever i get time. Reason being, I learnt few features of emacs over last 3 years and forgot the many things in the same period. My blogs on these topics may help me later to recollect what i learnt.

a little story about emacs/xemacs in my life :).

I think, I heard the word emacs in my III year at college bachelor degree. We haven't had emacs as editor or none of my college professor adviced us to use it. One of my friend Vijay Lakshinarayanan, he was first one told me about emacs and was showing me up some Lisp commands. None of his words impressed me at that time. May be, i was so reluctant about emacs or importance of editor for programming. After a year or so, in HCL Tech, for initial 6 months i wasn't really need of any editor. I think, i wasn't even writting anything at computer terminals expect just browings/chatting :). I was using vim and xemacs for remaining days of HCL. Today, I spent full days with emacs. A week ago, I moved to emacs from xemacs due to lack of development activites in xemacs.

that was short flashback of emacs/xemacs in my life so far. :).


---------------
M-x align-regexp
---------------
var = 1;
long_varriable_name_test = 2;
help = 3;
ptr->var.xyz = 32;

mark the above region and do 'M-x align-regexp' and enter '=' ,
will change above region aligned as below.

var = 1;
long_varriable_name_test = 2;
help = 3;
ptr->var.xyz = 32;


Source : By 'http://stackoverflow.com/users/5039/ehdr' in http://stackoverflow.com/questions/60367/the-single-most-useful-emacs-feature