Cheatsheet

Cheatsheet

Table of Contents

Personal Cheatsheet for the programs that I use the most.

Ghostty Terminal

Ghostty config location

~/.config/ghostty/config

Shortcuts


“Window Management”

CommandDescription
cmd+`Quick Terminal
cmd+nNew Terminal
cmd+qQuit Application

“Tab Management”

CommandDescription
cmd+tNew tab
cmd+wClose tab
cmd+[1~8]Jump to another tab
cmd+9Jump to the last tab
cmd+shift+[Previous tab
cmd+shift+]Next tab

“Font Size”

CommandDescription
cmd++Increase font size
cmd+-Decrease font size
cmd+0Reset text size

“Configurations”

CommandDescription
cmd+,Open Config
cmd+shift+,Reload config

“List Ghostty keybindings”

ghostty +list-keybinds

Issues

Issues with Ghostty Tabs and quick Terminal while using Aerospace, for both to work correctly:

The fix is to set the Ghostty Terminal in aerospace to floating, Then once you open Ghostty hit

Alt+Shift+;

to enter config mode followed by f.

This will now “unfloat” the Ghostty Terminal. Doing this will also fix the Tabs issues with aerospace.


Aerospace

Config location

~/.config/aerospace/aerospace.toml

Shortcuts

CommandDescription
alt-number or letterChanging to different workspaces
alt-h‘focus left’
alt-j‘focus down’
alt-k‘focus up’
alt-l‘focus right’
alt-tab’navigate through apps'

“Workspaces”

CommandDescription
alt-[1~5]Top Monitor
alt-[6~9]Bottom Monitor
alt-bBrowsers
alt-cChat
alt-eFinder
alt-mMusic
alt-nNotes
alt-piPhone Mirroring
alt-tTerminal

“Layout”

CommandDescription
alt-slash’layout tiles horizontal vertical'
alt-comma’layout accordion horizontal vertical'
alt-shift-h‘move App left’
alt-shift-j‘move App down’
alt-shift-k‘move App up’
alt-shift-l‘move App right’
alt-shift-workspace number or letter‘move App to another workspace’

“Service Mode”

CommandDescription
alt-shift-semicolon‘mode service’
alt-shift-semicolon => esc‘reload config’
alt-shift-semicolon => f‘change layout to floating or tiling’
alt-shift-semicolon => backspace‘close all windows but current’

Yazi

Config location

~/.config/yazi/yazi.toml

Documentation for shortcuts


Shortcuts

CommandDescription
hLeave the current directory and into its parent
jMove the cursor down
kMove the cursor up
lEnter hovered directory
KSeek up 5 units in the preview
JSeek down 5 units in the preview
g=>gMove cursor to the top
GMove cursor to the bottom
zJump to directory using zoxide
ZJump to a directory or reveal a file using fzf

“Selection”

CommandDescription
SpaceSelect single files/dir
ctrl-aSelect all files/dir
ctrl-rInverse selection of all files/dir
escCancel

“File Operations”

CommandDescription
o or enterOpen selected files
OOpen selected files interactively
tabShow file information
yYank selected files (copy)
xYank selected files (cut)
pPaste yanked files
PPaste yanked files (Overwrite files if they exists)
dTrash selected files
DPermanently Delete selected files
aCreate a file (ends with / for directories)
rRename selected files
.Toggle the visibility of hidden files

“Copy paths”

CommandDescription
c=>cCopy the file path
c=>dCopy the directory path
c=>fCopy the filename
CommandDescription
sSearch files by name using fd
SSearch files by content using ripgrep
ctrl+sCancel the search

“Sorting”

CommandDescription
,=>aSort Alphabetically
,=>ASort Alphabetically reversed
,=>mSort by modified time
,=>MSort by modified time reversed

Lazyvim

lazyvim

Config Location

~/.config/nvim/

Shortcuts

“Lazyvim”

“Diagnostics”
CommandDescription
:checkhealthCheck the health of lazyvim
:MasonCheck or update LSPs

keymaps

“General”
CommandDescription
SpaceLeader key
space+bbSwitch to other buffer
space+bdDelete buffer
space+boDelete Other Buffers
nNext Search Result
NPrev Search Result
Ctrl+sSave file
gcoAdd Comment Below
gcOAdd Comment Above
space+lLazy
space+fnNew file
space+xlLocation List
space+xqQuickfix List
[qPrevious Quickfix
]qNext Quickfix
space+cfFormat
[ePrevious Error
]eNext Error
[wPrevious Warning
]wNext Warning
space+ufToggle Auto format(Global)
space+uFToggle Auto format(Buffer)
space+fTTerminal (cwd)
space+ftTerminal (root dir)
ctrl+/Terminal (root dir)
space+-Split window below
space+|Split window Right
space+wdDelete Window
“snacks.nvim”
CommandDescription
space+spaceFind Files (Root Dir)
space+,Buffers
space+/Grep (Root Dir)
space+:Command History
space+fbBuffers
space+fBBuffers (all)
space+fcFind Config File
space+ffFind Files (Root Dir)
space+fFFind Files (cwd)
space+fgFind Files (git-files)
space+fpProjects
space+frRecent
space+fRRecent (cwd)
space+gcGit Log
space+gdGit Diff (hunks)
space+gsGit Status
space+gSGit Stash
space+nNotification History
space+s"Registers
space+s/Search History
space+saAutocmds
space+sbBuffer Lines
space+sBGrep Open Buffers
space+scCommand History
space+sCCommands
space+sdDiagnostics
space+sDBuffer Diagnostics
space+sgGrep (Root Dir)
space+sGGrep (cwd)
space+shHelp Pages
space+sHHighlights
space+siIcons
space+sjJumps
space+skKeymaps
space+slLocation List
space+smMarks
space+sMMan Pages
space+spSearch for Plugin Spec
space+sqQuickfix List
space+srSearch and replace
space+sRResume
space+suUndotree
space+swVisual selection or word (Root Dir)
space+sWVisual selection or word (cwd)
space+uCColorschemes
“LSP”
CommandDescription
space+clLsp Info
gdGoto Definition
grReferences
gIGoto Implementation
gyGoto T[y]pe Definition
gDGoto Declaration
KHover
gKSignature Help
c-kSignature Help
space+caCode Action n,
space+ccRun Codelens n,
space+cCRefresh & Display Codelens
space+cRRename File
space+crRename
space+cASource Action
]]Next Reference
[[Prev Reference
a-nNext Reference
a-pPrev Reference
“bufferline.nvim”
CommandDescription
space+blDelete Buffers to the Left
space+bpToggle Pin
space+bPDelete Non-Pinned Buffers
space+brDelete Buffers to the Right
[bPrev Buffer
[BMove buffer prev
]bNext Buffer
]BMove buffer next
S-hPrev Buffer
S-lNext Buffer
“todo-comments.nvim”
CommandDescription
space+stTodo
space+sTTodo/Fix/Fixme
“markdown-preview.nvim”
CommandDescription
space+cpMarkdown preview
“Git”
CommandDescription
space+ggOpen lazygit
space+gcCommits
space+glGit Log
space+gsGit Status
space+gbGit Blame Line
space+gBGit Browser Open
“Spelling”
CommandDescription
z+=Spelling suggestions
]sGo to next spelling error
[sGo to previous spelling error

“Vim/Neovim”

“Vim Modes”
CommandDescription
iInsert mode
aInsert mode after the cursor
AInsert mode at the end of the line
oOpen a new line below the cursor
OOpen a new line above the cursor
vVisual mode
ctrl+vVisual mode Multiline
:Command line mode
RReplace mode
escGo back to normal mode
“Command Mode”
CommandDescription
:w or ctrl+sWrite (Save) file
:waWrite (Save) all file
:q!Quit and discard changes
:wq or :x or ZZQuit and save changes
:wqaWrite and Quit on all open files
:e filenameCreate a new file in the current dir
“Arrows”
CommandDescription
hleft
jdown
kup
lright
“Movements within a line”
CommandDescription
$Move cursor to the end of the line
0Move cursor to the beginning of the line
^Move cursor to first non-blank character in line
fxFind next occurrence of character ‘x’
FxFind previous occurrence of character ‘x’
txGo towards next occurrence of character ‘x’ (stops right before it)
TxGo towards previous occurence of character ‘x’ (stops right before it)
;Repeat previous f, F, t, or T movement forwards
,Repeat previous f, F, t, or T movement backwards
“Word Movements”
CommandDescription
wMove cursor forwards to start of word (sequence of letters, digits, underscores OR sequence of other symbols)
WMove cursor forwards to start of WORD (any sequence of non-blank characters)
bMove cursor backwards to start of word (sequence of letters, digits, underscores OR sequence of other symbols)
BMove cursor backwards to start of WORD (any sequence of non-blank characters)
eMove cursor forwards to end of word (sequence of letters, digits, underscores OR sequence of other symbols)
EMove cursor forwards to end of WORD (any sequence of non-blank characters)
geMove cursor backwards to end of word (sequence of letters, digits, underscores OR sequence of other symbols)
gEMove cursor backwards to end of WORD (any sequence of non-blank characters)
“Sentence/Paragraph Movements”
CommandDescription
)Move cursor to next sentence
(Move cursor to previous sentence
}Move cursor to next paragraph (block of consecutive non-empty lines)
{Move cursor to previous paragraph (block of consecutive non-empty lines)
“Moving To Specific Lines”
CommandDescription
ggMove cursor to first line of document
GMove cursor to last line of document
{number}GMove cursor to line {number}
{number}jGo {number} lines down
{number}kGo {number} lines up
HMove cursor to line at the top of the window
MMove cursor to the line at the middle of the window
LMove cursor to the line at the bottom of the window
CommandDescription
Ctrl-FMove cursor forwards one full screen
Ctrl-BMove cursor backwards one full screen
Ctrl-DMove cursor down half a screen
Ctrl-UMove cursor up half a screen
“Scrolling While Leaving Cursor In Place”
CommandDescription
zzPlace current cursor line in the middle of the window
ztPlace current cursor line at the top of the window
zbPlace current cursor line at the bottom of the window
Ctrl-EScroll down a single line, leaving cursor in place
Ctrl-YScroll up a single line, leaving cursor in place
“Deletion”
CommandDescription
d{motion}Delete the text that the {motion} command moves over and copy into register.
ddDelete whole current line and copy into register.
DDelete from under the cursor to the end of the line and copy into register.
dwDelete from cursors current position to start of next word
deDelete from cursors current position to end of word
dGDelete from cursors current position to end of file
d]}Delete from cursors current position to next unmatched }
2ddDelete whole line under cursor and line below it.
c{motion}Delete the text that the {motion} command moves over, copy into register and enter insert mode.
ccDelete whole current line, copy into register and enter insert mode.
CDelete from under the cursor to the end of the line, copy into register and enter insert mode.
diwDelete word that cursor is in, keeping surrounding whitespace (Think: delete inside word)
dawDelete word that cursor is in as well as surrounding whitespace (Think: delete around word)
di(Delete everything within parenthesis surrounding cursor, keeping the surrounding parenthesis (Think: delete inside parenthesis)
da(Delete everything within parenthesis surrounding cursor as well as the surrounding parenthesis (Think: delete around parenthesis)
di"Delete everything within double quotes surrounding cursor, keeping the surrounding double quotes (Think: delete inside double quotes)
da"Delete everything within double quotes surrounding cursor as well as the surrounding double quotes (Think: delete around double quotes)
dit"Delete everything within tags surrounding cursor, keeping the surrounding tags (Think: delete inside tags)
datDelete everything within tags surrounding cursor as well as the surrounding tags (Think: delete around tags)
“Undo & Redo”
CommandDescription
uUndo last change
Ctrl-RRedo changes that have been undone with “u”
“Repeating a change”
CommandDescription
.Repeat the last change you made to the file
{number}.Repeat the last change you made to the file {number} amount of times
“Replacing & Deleting Characters”
CommandDescription
r{character}Replace current character under cursor with {character}
REnter replace mode and start replacing characters by typing until ESC is pressed
xDelete current character under the cursor and copy into register
“Copy and Paste”
CommandDescription
y{motion}Yank or copy text that the motion command moves over into register
yyYank or copy whole current line into register
YYank or copy from under the cursor to the end of the line into register
pPut or paste the text found in register (register x) after the cursor
PPut or paste the text found in register (register x) before the cursor
“Changing Case”
CommandDescription
~Switch case of character under cursor and move cursor to the right
~{motion}Switch the case of the text that the {motion} command moves over
gu{motion}Change the text that the {motion} command moves over to lowercase
guuMake whole current line lower case
gU{motion}Change the text that the {motion} command moves over to uppercase
gUUMake whole current line upper case
“Search/Replace”
CommandDescription
:%s/old/new/gReplace all occurrences of old with new in whole file
:%s/old/new/gcReplace all occurrences of old with new in whole file, asking for confirmation
:%s/old/new/giReplace all occurrences of old with new in whole file, ignoring case
“Indentation”
CommandDescription
»Indent whole current line to the right

Tmux

Config Location

~/.tmux.conf

Shortcuts

General

CommandDescription
Ctrl+space=>dDetach from session
Ctrl+space=>fSession Manager
Ctrl+space=>sShow all sessions
Ctrl+space=>wSession and Window Preview
Ctrl+space=>(Move to previous session
Ctrl+space=>)Move to Next session
Ctrl+space=>cCreate Window
Ctrl+space=>wList Windows
Ctrl+space=>nNext Window
Ctrl+space=>0~9Switch/select window by number
Ctrl+space=>[Enter vi mode

Panes and Navigation

CommandDescription
Ctrl+space=>|Split windows horizontal
Ctrl+space=>-Split windows vertical
Ctrl+hNavigate to the left pane
Ctrl+jNavigate to the bottom pane
Ctrl+kNavigate to the top pane
Ctrl+lNavigate to the right pane
Ctrl+space=>hResize pane left
Ctrl+space=>jResize pane Down
Ctrl+space=>kResize pane Up
Ctrl+space=>lResize pane Right
Ctrl+space=>mFocus on one pane

Config

CommandDescription
Ctrl+space=>rReload configurations
Ctrl+space=>:Enter command mode
Ctrl+space=>?List Keybindings
Ctrl+space=>IReload or install plugins

Zen browser


Shortcuts

CommandDescription
Option+Cmd+cToggle Compact Mode
Option+Cmd+tNew tab
Option+Cmd+nNew Window
Option+Cmd+wClose Tab
Cmd+rReload page
Shift+Cmd+hGo to history
Cmd+kFocus Search
Option+Cmd+fFind on Page
Cmd+dBookmark this page
Shift+Cmd+cCopy current URL
Ctrl+xToggle AI Chatbot Sidebar
Cmd+jOpen Downloads

Homerow


Shortcuts

General

CommandDescription
Cmd+Shift+SpaceUI click activation through shortcuts
EscEsc

Scrolling mode

CommandDescription
Cmd+Shift+jActivate scrolling mode
Scrolling-mode=>[j,k]Scroll up and down
Scrolling-mode=>Tab or Ctrl+nNext scroll Area
Scrolling-mode=>Shift+Tab or Ctrl+pPrevious scroll Area

Raycast

Raycast Manual

Shortcuts

General

CommandDescription
Cmd+spaceOpen Raycast
Cmd+space=>sfSearch files
Cmd+[Go Back one
Cmd+]Go Forward one
Cmd+space=>Cmd+kAction Panal
Cmd+space=>My ScheduleCheck your schedule through calandar app
Cmd+space=>StoreRaycast Store
Cmd+space=>SnippetSearch and create snippets

ChatGPT


Shortcuts

General

CommandDescription
Alt+SpaceQuick Access to ChatGPT

comments powered by Disqus

Related Posts

Cloudflare - free services that you may not know of.

Cloudflare - free services that you may not know of.

Cloudflare is widely known for its powerful Content Delivery Network (CDN) and Distributed Denial of Service (DDoS) protection. However, they offer a range of free services that can greatly benefit developers, small businesses, and individuals. In this blog, I’ll introduce some lesser-known free services that you can leverage to boost security, speed, and reliability for your websites and applications.

Read More
Optimizing your workflow with tmux.

Optimizing your workflow with tmux.

If you spend a lot of time in the terminal, managing multiple tasks, windows, and processes can become chaotic. Enter tmux, a terminal multiplexer that provides an efficient way to handle multiple terminal sessions from a single screen. In this post, I’ll explore some essential tmux features that can enhance your productivity and streamline your workflow.

Read More
Bat - A better 'cat'?

Bat - A better 'cat'?

Understanding the bat Command A Modern Alternative to cat When it comes to displaying file content in Linux and Unix-based systems, the cat command has been a go-to utility for decades. However, as the need for readability and additional functionality grows, a new alternative is catching the eye of developers and IT professionals alike, bat.

Read More