DEV Community

MuthuKumar
MuthuKumar

Posted on • Updated on

emacs

emacs

vim ~/.bashrc

alias emacs='emacs -nw --color=no'
Enter fullscreen mode Exit fullscreen mode

:wq! save and exit

source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

Meta key is ESC

To write a file

emacs test.txt
Enter fullscreen mode Exit fullscreen mode

To find and replace

ESC SHIFT+x replace-string hai enter hello enter
Enter fullscreen mode Exit fullscreen mode

To go to last line of the file

ESC SHIFT > to go to last line
Enter fullscreen mode Exit fullscreen mode
ESC SHIFT < to go to first line
Enter fullscreen mode Exit fullscreen mode

To make line number

ESC SHIFT+x  linum-mode
Enter fullscreen mode Exit fullscreen mode

To cut the text,

press CTRL+w.
Enter fullscreen mode Exit fullscreen mode

To copy the text,

press ESC+w.
Enter fullscreen mode Exit fullscreen mode

To paste the text,

press CTRL+y
Enter fullscreen mode Exit fullscreen mode

go to line number

ESC SHIFT+x goto-line enter
Enter fullscreen mode Exit fullscreen mode

To go to start of line

HOME
Enter fullscreen mode Exit fullscreen mode

To go to end of line

END
Enter fullscreen mode Exit fullscreen mode

To quit

CTRL+g
Enter fullscreen mode Exit fullscreen mode

To save a file

CTRL+x CTRL+c
it will ask y,n.....
Enter fullscreen mode Exit fullscreen mode

To quit without saving

ESC then x kill-emacs
Enter fullscreen mode Exit fullscreen mode

To save as

CTRL+x CTRL+w
Enter fullscreen mode Exit fullscreen mode

it will ask for file name
file_name ENTER
then

CTRL+x CTRL+c
Enter fullscreen mode Exit fullscreen mode

org mode

* Title
** subtopic
*** sub sub topic
tab * expand unexpand a topic

TODO / DONE
SHIFT + right arrow and left arrow
Enter fullscreen mode Exit fullscreen mode

Top comments (0)