💾 Archived View for henn.es › cheatsheet › emacs.gmi captured on 2024-08-25 at 00:01:59. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-02-05)

-=-=-=-=-=-=-

hennes' Emacs cheatsheet

Common

C-x = : Print info on cursor position (more with C-u C-x =)

C-x 8 Enter : Insert char

M-x lpr-buffer : Print buffer contents without pagination or page headers (use this to print PDF in doc-view-mode)

M-x print-buffer : Paginate and print buffer contents with headers (do not use this to print PDF in doc-view-mode)

Dired

0 w : Copy absolute path of selected file

C-x C-j : Open dired and select file entry which belongs to current buffer

Projectile

It is assumed that projectile keymap prefix is set to "s-p".

s-p f : Find file

s-p p : Switch to project

s-p s s : Search for pattern (with ag)

Helm

in helm-find-files

C-u C-c C-k : Copy path to kill ring

C-c TAB / C-c C-i: Copy path to current buffer

C-SPC : Mark file

M-a : Mark all files

C-s : grep content (in selected file or marked files)

C-u C-s : grep content in files matching name pattern (in selected file or marked files)

Flycheck

C-! H : Show help for error/warning at point (runs display-local-help ("C-h ."))

LSP Java

s-l = = : Format buffer

s-l g e : Show error list

s-l r o : Organize imports

s-l w r : Restart workspace and its LSP server

web-mode

C-c C-e / : Close tag

TRAMP

C-x C-f /ssh:user@host:/path/to/file : Open file of remote machine via SSH

C-x C-f /sudo::/path/to/file : Open file with sudo (e.g. to edit a system file)