Emacs Command

Basic Command of Emacs text Editor

In the following text, c represent Ctl and x represent ESC


Basic Access


  • Open emacs: emacs + filename;

  • get the tutorial: c + h t;

  • exit emacs: c + x + c + c;


Cursor Manipulation


  • next page: c + v;

  • previous page: x + v;

  • next line: c + n;

  • previous line: c + p;

  • next letter: c + f;

  • previous letter: c + b;

  • next word: x + f;

  • previous word: x + b;

  • back to the begin: x + <;

  • forward to the end: x + >;

  • search: c + s;

  • repeat command: c + u;

  • stop a command: c + g;


Text Edit


  • delete a letter: delete,c + d;

  • delete a word x + delete,x + d

  • delete a line from cursor to the line end: c+k

  • delete a user defined line: c + spc + c + w;

  • cut and paste: c + k + c + y;

  • undo: c +x u;


File and Windows


  • find file: c + x + c + f;

  • save file: c + x s ;

  • open buffer list: c + x + c + b;

  • switch buffer: c + x b

  • split the window: c + x 2;

  • switch window: c + x o;

  • follow the cursor in another window: x + c + v;

  • find file and open in another window: c + x 4 + c + f;