zkk / Cheat Sheets - raccolta



Emacs

ShortcutComando (M-x)Descrizione
C-u M-s d(consult-find)cerca ricorsivamente un file all’interno delle directory
C-u M-s g(consult-grep)cerca ricorsivamente una stringa all’interno dei file

Basic cursor control

ShortcutDescription
C-fMove forware a charachter
C-bMove backward a charachter
M-fMove forward a word
M-bMove backward a word
C-nMove to next line
C-pMove to previous line
C-aMove to beginning of line
C-eMove to end of line
M-aMove back to beginning of sentence
M-eMove forward to end of sentence
M-<Move to beginning of buffer
M->Move to end of buffer
C-lScroll current line centered
C-lScroll current line top
C-lScroll current line bottom

Moving inside buffers

ShortcutDescription
C-fMove forware a charachter.
C-bMove backward a charachter.
M-fMove forward a word.
M-bMove backward a word.
C-nMove to next line.
C-pMove to previous line.
C-aMove to beginning of line.
C-eMove to end of line.
M-aMove back to beginning of sentence.
M-eMove forward to end of sentence.
M-<Move to beginning of buffer.
M->Move to end of buffer.
C-lScroll current line centered.
C-lScroll current line top.
C-lScroll current line bottom.
C-M-fForward through keywords.
C-M-bBackward through keywords.
C-M-pFlow prior brackets.
C-M-nFlow next brackets.
C-M-kKill until end of next expression.
C-M-SPCMark until end of next expression.

Adding numeric argument example

ShortcutDescription
C-u 8 C-fMove forward 8 charachters

Inserting, deleting and killing text

stands for .

ShortcutDescription
C-u 10 xInsert 10 times charachter ‘x’
Delete charachter before cursor
C-dDelete next charachter after cursor
M-Kill the word before cursor
M-dKill next word after cursor
C-kKill from the cursor to end of line
M-kKill to the end of current sentence
C-then move cursor to the end of selection and C-w for kill or M-w for copy.
C-yReinserts last killed text
M-y (after C-y)recursively past previous killed text
M-y (alone)Allow choose text from previous killings

The difference between killing and deleting is that killed text can be reinserted.

Undo (for changing text actions)

The following shortcuts are available:

Files and buffers

ShortcutDescription
C-x C-fFind or create a file
C-x C-sSave the file
C-x C-bList buffers
C-x bChange buffer

Incremental searching

ShortcutDescription
C-sthen type C-s for next occurance and for previous occurance

Multiple windows

ShortcutDescription
C-x 2Split screen
C-M-vScroll bottom window
C-x oMove to other window
C-x 4Open file in new window

Getting help

shortcutdescription
C-h kDescribe shortcut
C-h cDescribe shortcut breafly
C-h aDescribe a command
C-h aSearch command by keyword
C-h iRead included manuals
C-h rEmacs Manual

M-x list-packages

Shorcut/CommandDescription
hShort help
rRefresh package list
iMark package for installation
dMark package for deletion
xInstall or delete package under point and install/delete marked packages
Show help for package at point
wOpen package website in browser
UMark all packages with newer version for upgrading
/Filter packages for various criteria
/ /Clear filter

Agenda view

ShortcutDescription
qClose window
xExit agenda and remove related buffers opened
oClose other windows
p / nPrevious/next line
Display item in other window (C-x 1 to close)
Go to item in other window (C-x 0 to close)
Go to item and delete other windows
FToggle follow-mode by opening original file
ASelect an agenda view and append in current view
vChoose day/week/month/year view (<SPC> to reset
v aToggle ARCHIVE items visibility
fGo forward day/week/month/year
bGo backward day/week/month/year
.Go today
jJump tu date
r / gRefresh agenda view display
sSave all org buffer
C-kDelete item at point
tChange TODO state
C-c C-x aTag item as ARCHIVE
C-c C-x AMove item to ‘Archive’ headline and tag ARCHIVE
$Move item to the configured archive location

Urxvt

ShortcutDescrizione
Ctrl+Alt+ccopia
Ctrl+Alt+vincolla

Neovim

Shortcut/ComandoDescrizione
Ctrl+Alt+vincolla (solo INSERT MODE)
***trova la prossima corrispondenza
%avanti/indietro da parentesi corrispondenti (),[],{}, oppure all’interno di funzioni (es. if-endif)
:te / :terminalavvia terminale (i insert mode, exit per uscire)

Tmux

ShortcutDescrizione
PREFIX /inizia ricerca con copycat, poi…
q… esce da ‘copycat’
C-u… scorre in alto
C-d… scorre in basso
n… prossima occorrenza (verso l’alto)
N… prossima occorrenza (verso il basso)
v… inizia selezione caratteri
V… inizia selezione righe
y… copia

Emacs Info

Info manuals che be surfed with info command or inside emacs itself.

ShortcutDescription
C-h iEnter info manuals or back to buffer
hHow to use info
?Show shortcuts
qQuit info manuals leaving buffer open
M-x visible-modeShow/hide invisible text
nNext node same level
]Next node following structure
Move forward
pPrevious node same level
[Previous node following structure
Move backward
bTo beginning of node
C-lCenter text vertically
^Move up the node following structure
mMenu items in node (autocompletion or ?)
fCross references in node (autocompletion or ?)
iShow index menu items of file (autocompletion or ?)
lBackward in history list of visited nodes
rForward again in history list of visited nodes
dMove to first node visited (directory node)
LCreate a virtual node with history list of visited nodes
Move to next menu item / cross reference
S- or M-Move to previous menu item / cross reference

Linux

Shortcut/CommandDescription
pacman -QAll packages installed.
pacman -QmOnly AUR packages.
pacman -RnRemove config also config files
pacman -RnsRemove also dependences
pacman -QdtPackages not needed as dependences