Anything is possible, unless it's not

Wednesday, February 16, 2011

emacs = love

writeln('Hello, World!');

I installed emacs by accident on my Linux. I got it installed, somehow. Maybe it is included in a software's package, (or is it a part of Ubuntu updates? I don't know).

I have heard that emacs is sort of text editors, just like Windows notepads. I tried to use emacs the first time, 2 days ago. Hmm. Looks bland. It looks like vim at first (I have used it before, 2 years ago, but now, I completely forgot vim's multitude of keyboard shortcuts). But actually, emacs is not vim. They are completely different. I thought that it is a strange text editor. Much stranger than vim, at first.

Ok. It is difficult to learn at first, with daunting multitude of keyboard shortcuts. But, at least, I can use it to work on my Pascal programming assignment in just 2 days of learning emacs (Task: Write a program that inputs two matrices of user-inputtable sizes, and then multiply them both, and display it *neatly* on the *terminal* screen, with numbers and, of course, lot of whitespaces). Emacs integrates neatly with the Free Pascal Compiler (after copying and pasting some emacs customization codes. I cannot program in Lisp)

It has many awkward keyboard shortcuts (such as Alt+Shift+1, Ctrl+x+b, or something like Alt+5+0+Shift+8). It is designed to be used with the space-cadet keyboards or at least full size keyboards. I use laptop keyboard.

But, lovely, it allows itself to integrate interactively with the shell. I tried to use the Ctrl+U Alt+| and then typing fortune | cowsay:

Also. Now, I don't need to go to wxMaxima while on emacs! Just invoke its back-end Maxima with emacs shell interaction (but I have to read some ugly equations in plaintext). It also come with variety of usable features such as calendar, calculator, and games.

I love those little emacsen! (emacsen /ˈiːmæksn/n. pl. of emacs) It's not just an ordinary text editor...

It's extraordinary.

Some Useful Keyboard Shortcuts
(C = control, M = meta (or alt, in standard keyboards))

C-x C-f -- visit file (open/create file)
C-x C-s -- save file

C-g -- abort commands

C-x k -- kill buffer
C-x b -- switch to buffer

C-x 1 -- remove any potentially distracting buffers
(I mean, close all buffers excepting the active one)

M-x -- 'human-readable' commands.

I don't need the C-p, C-n, C-f, C-b, the emacs replacements of arrow keys (to keep the hands on the main part of the keyboard, said the makers). Arrow keys are easily accesible by my right pinky.

No comments:

Post a Comment