Playing with Emacs – Open file, edit, save file.

Emacs is an editor, but not just it. Thats what i read on internet. Emacs like in a battle with Vim, another editor. I have play with vi so many years ago, but with emacs  it is just recently i learned to use it basic function.

Install it on ubuntu we can choose GUI or terminal version. I like the terminal version because it will be handy during my engagement with VM/Cloud which only can use terminal to manage it.

Open Emacs by typing on terminal emacs and press enter, it will show a welcome page like below.

We can move cursor to a hyperlink and press enter to go to particular subject, like tutorial or manual. Tutorial can also accessed using key combination C-h t, which mean press Ctrl and hold then press h, release keys, then press t. C is Ctrl and M is Meta (Alt/Esc).

To open a file (new/existing) use find command C-x C-f then we can use auto completion on path and file name using tab, just like bash/shell on terminal. Here i press enter after find command and emacs show list of directory and i select file to be opened by moving cursor and press enter.

Opened file will be showed like below.

I opened a file with rb extension and emacs use ruby programming language highlighting right away. Edit some line and save it using save command C-x C-s. Emacs will show that it wrote to the file.

To undo press C-x u.

To search a keyword press C-s

To exit emacs press C-x C-c.

Thats the basic command i learned, more are coming. Bye.


Leave a Reply

Your email address will not be published. Required fields are marked *