A Chrome extension that brings Vim keybindings to Notion.
vimtion_demo.mov
This project is based on lukeingalls/vim-notion, originally created by Luke Ingalls. The original project stopped being maintained and became incompatible with modern Chrome versions due to the Manifest V2 to V3 migration.
This fork has been extensively rebuilt with:
- Chrome Manifest V3 compatibility
- Modern dependencies (Parcel 2.x, TypeScript 5.x)
- Improved cursor handling with proper position tracking and column memory for j/k navigation
- Link navigation: Navigate and open links with
Enter- supports external links, block links, and intelligent Notion page link selection withj/knavigation - Enhanced motions: Cross-line navigation (h/l/w/b wrap to previous/next lines)
- Line jumping:
gg(first line) andG(last line) support - Page navigation:
Ctrl+d/u(half page),Ctrl+f/b(full page) with smooth scrolling - Visual modes: Character-wise (
v) and line-wise (V) visual selection with full operator and text object support - Operators with motions: Comprehensive support for d/c/y with all motions (w/W/b/B/e/E/$0/iw)
- Text objects: Full support for
i(inner) anda(around) in both normal and visual modes with brackets, quotes, and more (e.g.,ci(,da",yi{,vi(,va') - Undo/Redo:
ufor undo,rfor redo with intelligent grouping for multi-line operations - Mouse support: Click to position cursor in normal mode
- Better cursor visibility: Enhanced block cursor with improved opacity and visibility on empty lines
- Insert commands:
a,A,Ifor various insert positions
Chrome Web Store (Recommended):
Add it directly from the Chrome Web Store: Vimtion
Local Installation (For development):
- Clone this repository
- Run
npm install(oryarn install) - Run
npm run build(oryarn build) - Load the
distfolder as an unpacked extension in Chrome- Go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
distfolder
- Go to
How to install unpacked extensions in Chrome
Vimtion can be customized through the Options page. You can configure:
- Mode indicator position and colors
- Cursor colors and blink settings
- Visual selection colors
- And more...
To access the Options page:
- Right-click the Vimtion extension icon in Chrome
- Select "Options"
Basic: h j k l (with line wrapping) β’ w b e W B E (word motions) β’ 0 $ (line start/end) β’ gg G (document start/end)
History: H (back) β’ L (forward)
Find: f{char} F{char} t{char} T{char} (find/till character)
Page navigation: Ctrl+d (half down) β’ Ctrl+u (half up) β’ Ctrl+f (full down) β’ Ctrl+b (full up)
vimtion_link_navigation_demo.mov
Navigate and open links directly from normal mode:
Open links with Enter:
- External links: Press
Enteron a link to open it in a new tab - Block links (same page): Press
Enteron a block link to jump to that block and update cursor position - Notion page links: Press
Enternear any Notion page link to enter link selection mode
Link Selection Mode (for Notion page links):
- When multiple Notion page links exist, pressing
Enterenters selection mode - The closest link to your cursor is initially highlighted
- Navigate:
j(next link) β’k(previous link) - cycle through all Notion page links on the page - Open:
Enteropens the selected link - Delete:
ddeletes the block containing the selected link - Exit:
Escexits selection mode without opening
Example workflow:
- Position cursor anywhere on the page
- Press
Enterto activate link selection - Use
j/kto browse through all Notion page links - Press
Enterto open the selected page, orEscto cancel
Insert: i I a A o O β’ Visual: v (char) V (line) β’ Normal: Esc
Delete: x X s D dd (delete line with block) β’ Undo/Redo: u r (grouped undo for multi-line operations) β’ Paste: p P
All operators (d delete, c change, y yank) work with all motions:
- Lines:
ddccyy - Words:
dwcwywdeceyedbcbyb(alsoWBEvariants) - Line parts:
d$c$y$d0c0y0DC - Find:
df{char}cf{char}dt{char}ct{char}(alsoFTvariants)
Operate on text inside or around delimiters. All operators (d, c, y) and visual mode work with text objects:
Supported delimiters: w (word) β’ ( ) b (parentheses) β’ [ ] (brackets) β’ { } B (braces) β’ < > (angle brackets) β’ ' " ` (quotes) β’ / * (slashes/asterisks)
Inner (i): Content only
ciwdiwyiw- word under cursorci(di(yi(- inside()ci[di[yi[- inside[]ci{di{yi{- inside{}ci<di<yi<- inside<>ci'di'yi'- inside''ci"di"yi"- inside""ci` di` yi`- inside``ci/di/yi/- inside//ci*di*yi*- inside**
Around (a): Content + delimiters/whitespace
cawdawyaw- word + surrounding whitespaceca(da(ya(- including()ca[da[ya[- including[]ca{da{ya{- including{}ca<da<ya<- including<>ca'da'ya'- including''ca"da"ya"- including""ca` da` ya`- including``ca/da/ya/- including//ca*da*ya*- including**
Example: In text (example) text with cursor on example:
ci(β leaves(), enters insert modedi(β leaves()ca(β removes(example), enters insert mode
Character-wise (v):
- Navigate:
hlwbe0$ - Text objects: All
i(inner) anda(around) text objects work in visual mode- Words:
viwvaw - Brackets:
vi(va(vi[va[vi{va{vi<va< - Quotes:
vi'va'vi"va"vi` va` - Other:
vi/va/vi*va*
- Words:
- Operate:
dycor use Notion shortcuts (Cmd+B, Cmd+I, etc.)
Line-wise (V): Select with j k gg G, then d y c
Example: With cursor inside (example text):
vi(β selectsexample textva(β selects(example text)- Then
dto delete,yto yank, orcto change
Note: Notion's native formatting shortcuts (Cmd+B, Cmd+I, Cmd+U, etc.) work on visual selections.
When you yank multiple lines using Visual line mode (V + selection + y), the text is correctly copied to your system clipboard with newlines preserved. However, the p command currently cannot properly paste multi-line content as separate Notion blocks.
Workaround: After yanking multiple lines with Vy, use your browser's native paste command instead:
- macOS:
Cmd+V - Windows/Linux:
Ctrl+V
This will correctly create separate Notion blocks for each line. Single-line paste with p works as expected.
The following Vim features are not implemented:
- Search functionality (
/,?,n,N,*,#) - Not planned due to complexity and Notion's built-in search - Marks (
m,',`) - Not essential for basic editing workflow - Macros (
q,@) - Complex to implement and not essential for most users - Screen-based motions (
M) - Not meaningful in Notion's infinite scroll context (note:H/Lare repurposed for browser history navigation) - Block operations (
Jjoin lines,</>indent) - Notion's block-based structure has its own system - Advanced features (
.repeat,~toggle case,%bracket matching,Rreplace mode) - Not essential for core editing (repeat will be implemented in the near future)
Note: r is used for redo instead of Vim's default "replace character" to provide undo/redo functionality.
Original implementation by Luke Ingalls - vim-notion
ISC License - see LICENSE file for details
Original implementation Copyright (c) 2020 Luke Ingalls