SPC q q
- quitSPC w /
- split window verticallySPC w
- - split window horizontallySPC 1
- switch to window 1SPC 2
- switch to window 2SPC w c
- delete current windowSPC TAB
- switch to previous bufferSPC b b
- switch buffersSPC f f
- find a fileSPC f s
- save a file (:w also works)SPC p p
- open projectSPC p h
- find a file in current projectSPC b d
- kill current bufferSPC b M
- move buffer to another windowSPC v
- enter expand-region modeSPC b b
- Helm mini; lists buffers & recent filesCTRL SPC
- Mark ItemsCTRL z
- Actions
SPC b B
- ibufferSPC f f
- open filesCTRL h
- up a folderCTRL l
- open a folderCTRL j
- upCTRL k
- down
SPC p f
- opens root of projectSPC p p
- opens projectsSPC /
- searches through projectSPC s s
- search in a fileSPC s l
- find all function definitons in a fileSPC v
- expand regionSPC V
- contract regions (
- put parens around a regionSPC s e
- multiple cursorsn
- jumpN
- jump
SPC h d
- help describeSPC h d f
- help describe functionsSPC h d v
- help describe variablesSPC f e h
- helpALT /
- snippet completionSPC t s
- syntax checkingSPC e
- syntax checking optionsSPC a r
- rangerSPC a d
- deer
[e
- Move line up]e
- Move line down[SPACE
- Insert space above]SPACE
- Insert space below[p
- Paste above current line]p
- Paste below current line
grm
- make-all-cursorsgru
- undo-all-cursorsgrs
- pause-cursorsgrr
- resume-cursorsgrf
- make-and-goto-first-cursorgrl
- make-and-goto-last-cursorgrh
- make-cursor-hereM-n
- make-and-goto-next-cursorgrN
- skip-and-goto-next-cursorM-p
- make-and-goto-prev-cursorgrP
- skip-and-goto-prev-cursorC-n
- make-and-goto-next-matchgrn
- skip-and-goto-next-matchC-t
- skip-and-goto-next-matchC-p
- make-and-goto-prev-matchgrp
- skip-and-goto-prev-match
gt
- go to next workspacegT
- go to previous workspaceSPC l w n
- create or switch to workspace nSPC l w TAB
- switch to last active workspaceSPC l w c
- close current workspaceSPC l w n
orSPC l w l
- switch to next workspaceSPC l w N
orSPC l w p
orSPC l w h
- switch to previous workspaceSPC l w r
- set a tag to the current workspaceSPC l w w
- switched to tagged workspace
Find/Replace Commands
Interactive Find/Replace
Here are the most useful find/replace commands. These are also under the menu γEdit βΈ Replaceγ.
Command Name Key Target Purpose query-replace γAlt+%γ active region, or cursor point to end interactive find/replace query-replace-regexp γCtrl+Alt+%γ active region, or cusor point to end interactive find/replace with regex pattern dired-do-query-replace-regexp In dired, γQγ. marked files in dired interactive find/replace on multiple files For example, call query-replace, then type your search string, then type your replacement string.
When a query command asks you for confirmation, here's the most common keys:
y β do the replacement. n β skip ! β do this and all remaining replacements without asking. γCtrl+gγ β cancel. (call undo to undo existing replacement.) For detail on using dired-do-query-replace-regexp, see: Emacs: Interactively Find/Replace Text in Directory.
Batch Replace
replace-string β find οΌ replace in one shot, without asking for each. From cursor position to end of buffer, or, in a text selection.
replace-regexp β same as replace-string but with regex.
0
- beginning of line^
- beginning of non-whitespace$
- end of line9j
- move down 9 linesw
- move forward by wordb
- move backward by wordgg
- first lineG
- last lineC-u
- up half pageC-d
- down half pagef/
- move forward to first "/" charactert/
- move forward right before the first "/" character;
- repeat that command againH
- head of the screenM
- middle of the screenL
- last of the screen}
- move forward by paragraph or block{
- move backwards by paragraph or block*
- search for word under the cursorn
- search again forwardN
- search again backwards#
- search backwards for word under cursor/
- search forward?
- search backward%
- find matching brace, paren, etcma
- mark a line in a file with marker "a"- ``a` - after moving around, go back to the exact position of marker "a"
'a
- after moving around, go back to line of marker "a":marks
- view all the marks''
- go to the last place you were
x
- delete char under cursorX
- delete char before cursorA
- add to end of lineI
- insert at the beginning of the linedd
- delete lineD
- delete from cursor to end of linedi'
- delete text inside single quotesyy
- copy lineY
- copy from cursor to end of linecc
- change lineC
- change from cursor to end of linecit
- change text inside html tagci'
- change text inside single quotesci{
- change text inside curly brackets.ci...
- etcp
- paste after cursorP
- paste before cursoro
- add line belowO
- add line above.
= repeat last commentr
- replace characterR
- replace. (overwrite) (good for columns of text)J
- join line (cursor can be anywhere on line)
v
- visual char modeV
- visual line modeC-v
- block visual mode
SPC w c has been replaced by SPC w d