practice / blog

For personal blogging
1 stars 0 forks source link

Emacs Notes #14

Open practice opened 9 years ago

practice commented 9 years ago

Install

Ubuntu

sudo add-apt-repository ppa:kelleyk/emacs
sudo apt-get update
sudo apt-get install emacs25

Mac

https://stackoverflow.com/a/45766004/575394

brew cask install emacs

Basic

C-x C-c quit
C-x C-s save
C-x C-f open (find-file)

Moving

C-g quit a partially entered command

C-v move forward one screen
M-v move backward one screen

C-b, f, p, n move the cursor to backward, forward, previous line, next line.
M-f, b moves forward/backward a word

C-l 현재 줄을 화면 가운데로. 한번 더 C-l하면 맨위, 한 번 더 하면 맨 아래. 계속 하면 사이클.

C-a, e moves moves to the beginning/end of a line

M-<, > moves to the beginning/end of the whole text (<를 입력하려면 shift 키 필요)

C-u <숫자> C-n 숫자만큼 C-n을 반복

Windows

C-x 1 One window (i.e., kill all other windows).

Delete

C-d delete the next character
M-d kill the next word
C-k kill to the end of line
C-S-Backspace kill whole line (requires 'shift key)

기타

C-x h selects the entire buffer
C-M-\ reindents the selected region.

My personal pain points

reload file (RevertBuffer)

C-x +