Some tips and tricks that I found throughout the years or that I specifically implemented in pokemacs to make my life easier.
M-x window-swap-states: Swaps two windowsM-l l: Lock the current windowM-h: Useful hydras (toggles etc)
M-,: Jumps back to the mark where jumping functions like xref-find-definition or lsp-find-definition
C-SPC C-SPC: Put a mark without creating a regionC-x C-SPC: Go back to the previous markM-g m (consult-mark)ork (consult-global-mark): List of all local or global marks
Bookmarks are saved between each session and can be named.
C-x r m: Set a bookmarkC-x r b: Jump to a bookmark if its name exists or create a new one
M-p: Go back in history (works with everything that uses the minibuffer likefind-file,ripgrepetc. Each command has its own history)M-x embark-collect: Groups all the results in the minibuffer in a specific interactive buffer
C-M-<mouse-1>: rectangular selection
#regexp#filter-string: The pattern of a consult input.filter-stringis used to filter the results obtained withregexpM-RET: Jump to the current result without closing the minibufferM-.: Preview the result at point (useful when unsure about the result)<regexp> -- -g *.ml: Limit the search to files ending with.ml<regexp> -- -g !pattern: Remove the files corresponding topatternfrom the search results
C-g: Deletes the part of the current search that is not matching anythingM-e: Edit the current searchM-c(orconce the input can’t be edited): Case sentitivity
M-v G: See the last commit that edited the line at point- When rebasing,
von the hunk at point will reverse it (kin the magit buffer)