Friday, 2 December 2016

Emacs tips and tricks

# emacs-nox C:Ctrl, M:Alt C-l #centers screen C-h C-? #Help on command ? C-x 1 #Close all other windows C-v / M-v #down and up C-u N? C-? #Repeat C-? command N times C-g #abort ongoing command C-x C-c #exit emacs C-x C-f #find a file C-x u #Undo last change C-_ #Undo last change (quicker) C-x C-b #list buffers C-x b #Change buffer C-x C-s #save this file C-x s #Save files with changes C-x C-w #Save as C-x k #close buffer C-x 2 #split in 2 horizontal windows C-x 3 #split vertical C-x 1 #Maximize window C-x 0 #Hide current window C-x o #switch to next window C-M-v #scroll the other window M-! run shell command C-s #search, and go to next C-r #search behind #on search, goes to previous C-M s/r #regexp searches M-x ? #Command autocompletion M-x replace-string original replacement M-x revert #revert to saved file #scape mode editor M-g g N #go to line N C-/ Autocompletion of words M-/ #delete previouis character C- #delete the next one M- #Delete the previous word M-d #Delete the next one C-k #Cut left side of the line ## All cut text accumulates in the buffer!! M-K #Cut right side of the line C-SPC : Begin Selection C-w : Cut selected text M-w : Copy selected text C-y : Pastes cut text C-u 80 '*' #Inserts 80 characters!