Friday, September 7, 2007

Emacs!

So after a lot of dilly-dallying I move on from vim to Emacs. I was afraid that it would take some doing, but I found the Emacs tutorial to be very user-friendly and effective in serving as a launch pad. And already I like Emacs a lot :-) .

For those not in the know, Emacs stands for Editor Macros, so its an editor (Surprise..surprise!) used on most unix-like platforms. Now, Of course there is a Windows port too.

The editor has a lot of cool features, the most attractive of which seems to be that it can be split into arbitrary number of windows, each of which can display some different file.

Another fantastic feature that comes with Emacs 22 and beyond is that it supports ( transparent) remote file editing, using some thing called TRAMP. So goodbye to all the (rather annoying) copying back and forth, which needs to be done when neither NFS, nor X11 tunneling can be used when working on some remote file. TRAMP handles the fetching and the saving of the file seamlessly. All that needs to be done is to(have Tramp ;-) and) open the file with path that includes the server name. So, the way to open a file in Emacs is

C-x C-f /filename (that is, Ctl -x Ctl-f /filename)

To open a remote file,

C-x C-f /username@hostwherefileis: path/to/file/filename

Underneath, TRAMP can be configured to use any of the plethora of methods to transfer the file, by editing the .Emacs file of Emacs:

(require 'tramp)
(setq tramp-default-method "ssh")

So Happy Editing!

No comments: