A guide to keyboard shortcuts on HackMD | HackMD Blog
February 1, 2024

A guide to keyboard shortcuts on HackMD

Rachel Golden
Rachel Golden
Telling HackMD's story, building awareness, and meaningfully connecting with communities.

When you’re up against tight deadlines, multiple projects, and lean teams, being as efficient as possible is paramount.

Every second counts.

And we get it. That’s why there are a slew of keyboard shortcuts in HackMD to help you take your workflow to the next level.

Today, we’re diving into those available to you, helping you switch modes, format text, and navigate like a pro.

Switching Modes: Edit, Both (Split), and View

In order to work efficiently, you need to be able to transition between editing, split view, and viewing modes instantly. Here are your go-to shortcuts:

Mode Windows Mac
Edit Ctrl + Alt + e Ctrl + Option + e
Both (Split) Ctrl + Alt + b Ctrl + Option + b
View Ctrl + Alt + v Ctrl + Option + v

Markdown Syntax Shortcuts

And formatting text shouldn’t slow you down. Utilize these markdown syntax shortcuts for a sleeker editing experience:

Format Windows Mac
Bold Ctrl+b Cmd + b
Italic Ctrl+i Cmd + i
Strikethrough Ctrl + Shift + ` Cmd + Ctrl + k

Default Keymap Bindings: Sublime, Emacs, and Vim

HackMD uses CodeMirror to support three keymap styles - Sublime, Emacs, and Vim. Tailor your editing experience to your preference with these essential bindings:

Sublime:

Description Windows/Linux Mac
Go Line Start Smart N/A Cmd + Left
Indent Less Shift + Tab Shift + Tab
Delete Line Shift + Ctrl + K Shift + Ctrl + k
Wrap Lines Alt + Q Option + Q
Transpose Chars Ctrl + T N/A
Go Subword Left Alt + Left Option + Left
Go Subword Right Alt + Right Option + Right
Scroll Line Up Ctrl + Up Ctrl + Option + Up
Scroll Line Down Ctrl + Down Ctrl + Option + Down
Insert Line After Ctrl + Enter Cmd + Enter
Insert Line Before Shift + Ctrl + Enter Shift + Cmd + Enter
Select Next Occurrence Ctrl + D Cmd + D
Select Scope Shift + Ctrl + Space Shift + Cmd + Space
Select Between Brackets Shift + Ctrl + M Shift + Cmd + M
Go To Bracket Ctrl + M Cmd + M
Swap Line Up Shift + Ctrl + Up Cmd + Ctrl + Up
Swap Line Down Shift + Ctrl + Down Cmd + Ctrl + Down
Toggle Comment Indented Ctrl + / Cmd + /
Join Lines Ctrl + J Cmd + J
Duplicate Line Shift + Ctrl + D Shift + Cmd + D
Sort Lines F9 Cmd + F5
Sort Lines Insensitive Ctrl + F9 Cmd + F5
Smart Backspace Backspace Backspace
Skip And Select Next Occurrence Ctrl + K Ctrl + D Cmd + K Cmd + D
Del Line Right Ctrl + K Ctrl + K Cmd + K Cmd + K
Upcase At Cursor Ctrl + K Ctrl + U Cmd + K Cmd + U
Downcase At Cursor Ctrl + K Ctrl + L Cmd + K Cmd + L
Set Sublime Mark Ctrl + K Ctrl + Space Cmd + K Cmd + Space
Select To Sublime Mark Ctrl + K Ctrl + A Cmd + K Cmd + A
Delete To Sublime Mark Ctrl + K Ctrl + W Cmd + K Cmd + W
Swap With Sublime Mark Ctrl + K Ctrl + X Cmd + K Cmd + X
Sublime Yank Ctrl + K Ctrl + Y Cmd + K Cmd + Y
Show In Center Ctrl + K Ctrl + C Cmd + K Cmd + C
Clear Bookmarks Ctrl + K Ctrl + G Cmd + K Cmd + G
Del Line Left Ctrl + K Ctrl + Backspace Cmd + K Cmd + Backspace
Fold All Ctrl + K Ctrl + 1 Cmd + K Cmd + 1
Unfold All Ctrl + K Ctrl + 0 Cmd + K Cmd + 0
Unfold All Ctrl + K Ctrl + J Cmd + K Cmd + J
Add Cursor To Prev Line Ctrl + Alt + Up Ctrl + Shift + Up
Add Cursor To Next Line Ctrl + Alt + Down Ctrl + Shift + Down
Find Under Ctrl + F3 Cmd + F3
Find Under Previous Shift + Ctrl + F3 Shift + Cmd + F3
Find All Under Alt + F3 Alt + F3
Fold Shift + Ctrl + [ Shift + Cmd + [
Unfold Shift + Ctrl + ] Shift + Cmd + ]
Find Incremental Ctrl + I Cmd + I
Find Incremental Reverse Shift + Ctrl + I Shift + Cmd + I
Replace Ctrl + H Cmd + H
Find Next F3 F3
Find Prev Shift + F3 N/A

Emacs/Vim:

Customize Your Experience

Don’t forget, you can customize your key bindings through the editor status bar. Tailor HackMD to match your unique workflow.

Efficiency is not one-size-fits-all. However you work best, you have the flexibility you need to make your editing experience truly yours.

We can’t wait to see what you create.