markdown · 9955 bytes Raw Blame History

fac Keybindings Reference

Complete keyboard shortcut reference for fac editor.


🔍 LSP Features

Keybinding Command Description
F12 or Ctrl+\ or Alt+G Go to Definition Jump to where a symbol is defined
Shift+F12 or Alt+R Find References Find all usages of a symbol
F2 Rename Symbol Rename symbol across entire project
F10 or Alt+. Code Actions Quick fixes and refactorings
F8 or Alt+E Diagnostics Panel Show all errors and warnings
F4 or Alt+O Document Symbols Navigate symbols in current file
F6 or Alt+P Workspace Symbols Search symbols across all files
Ctrl+P Command Palette Search and execute any command
Shift+Alt+F Format Document Auto-format current file
Alt+, Jump Back Return to previous location (jump stack)

📁 File Operations

Keybinding Command Description
Ctrl+S Save Save current file
Ctrl+Q Quit Exit editor (prompts if unsaved)
Ctrl+O Open File Open file browser (Fortress mode)
Ctrl+N New File Create new untitled buffer
Ctrl+T New Tab Create new empty tab

📝 Editing

Keybinding Command Description
Ctrl+D Select Next Match Add cursor at next occurrence of selection
Ctrl+Z Undo Undo last change
Ctrl+Y Redo Redo last undone change
Ctrl+X Cut Cut selection to clipboard
Ctrl+C Copy Copy selection to clipboard
Ctrl+V Paste Paste from clipboard
Ctrl+A Select All Select entire file
Alt+Backspace Delete Word Delete word backward
Backspace Delete Char Delete character backward
Delete Delete Forward Delete character forward

🔎 Search & Replace

Keybinding Command Description
Ctrl+F Search Open unified search/replace prompt
Ctrl+H Replace Open unified search/replace (same as Ctrl+F)
Ctrl+G Go to Line Jump to specific line number
In Search Mode:
n or Ctrl+N Next Match Jump to next search result
N or Ctrl+P Previous Match Jump to previous search result
r Replace One Replace current match
a Replace All Replace all matches
Ctrl+R Toggle Regex Enable/disable regex search
Ctrl+C Toggle Case Toggle case-sensitive search
Ctrl+W Toggle Whole Word Toggle whole-word matching
Alt+S Search in Selection Limit search to selected text
/ History Navigate search history
Esc Exit Search Close search prompt

🗂️ Tabs & Windows

Keybinding Command Description
Ctrl+T New Tab Create new empty tab
Ctrl+W Close Tab/Pane Close current pane (then tab if last pane)
Ctrl+PageDown or Ctrl+Alt+Right Next Tab Switch to next tab
Ctrl+PageUp or Ctrl+Alt+Left Previous Tab Switch to previous tab
Alt+1 to Alt+9 (or Ctrl+1 to Ctrl+9) Jump to Tab Switch to specific tab number
Alt+V Split Vertical Split current pane vertically
Alt+S Split Horizontal Split current pane horizontally
Alt+Q Close Pane Close current pane only
Alt+H or Ctrl+Shift+Left Navigate Left Move to pane on the left
Alt+L or Ctrl+Shift+Right Navigate Right Move to pane on the right
Alt+K or Ctrl+Shift+Up Navigate Up Move to pane above
Alt+J or Ctrl+Shift+Down Navigate Down Move to pane below

🧭 Navigation

Keybinding Command Description
Move Cursor Move cursor one character/line
Alt+↑ Move Line Up Move current line up
Alt+↓ Move Line Down Move current line down
Home or Ctrl+A Line Start Jump to beginning of line (smart toggle)
End or Ctrl+E Line End Jump to end of line
Ctrl+Home File Start Jump to beginning of file
Ctrl+End File End Jump to end of file
Alt+← / Alt+→ Word Jump Move cursor by word
Page Up / Page Down Page Scroll Move up/down one screen
Alt+[ / Alt+] Match Bracket Jump to matching bracket/paren

✂️ Selection

Keybinding Command Description
Shift+↑↓←→ Select Extend selection with arrow keys
Ctrl+Shift+Home Select to Start Select from cursor to file start
Ctrl+Shift+End Select to End Select from cursor to file end
Ctrl+A Select All Select entire file
Ctrl+D Select Next Add cursor at next match of selection
Esc Clear Selection Deselect and return to single cursor

🎨 Command & Utility

Keybinding Command Description
Ctrl+P Command Palette Search and execute any command
Ctrl+? or Ctrl+/ Help Show help screen
Ctrl+B or F3 File Tree Toggle file explorer (Fuss mode)
Ctrl+L Redraw Screen Clear and redraw the screen
Esc Cancel/Close Close panels, cancel operations

📋 Clipboard & Yank Stack

Keybinding Command Description
Ctrl+X Cut Cut selection and add to yank stack
Ctrl+C Copy Copy selection to clipboard
Ctrl+V Paste Paste from clipboard
Ctrl+Shift+V Yank Cycle Cycle through clipboard history

🌲 File Tree (Fuss Mode)

Keybinding Command Description
Ctrl+B or F3 Toggle Tree Show/hide file tree
In Tree:
j k or Navigate Move to previous/next sibling
/ Enter/Exit Enter directory or exit to parent
Enter or o Open Open file in editor
Space Toggle Expand Expand/collapse directory
? Show Hints Display fuss mode keybindings
Esc Close Tree Hide file tree

🎯 Multiple Cursors

Keybinding Command Description
Ctrl+D Select Word & Next Select word under cursor, add cursor at next match
Alt+Click Add/Remove Cursor Add or remove cursor at mouse position
Ctrl+Alt+↑ Add Cursor Above Add cursor on line above
Ctrl+Alt+↓ Add Cursor Below Add cursor on line below
Esc Single Cursor Return to single cursor mode
(while multiple cursors active)
Type normally Edit All Type at all cursor positions
Arrow keys Move All Move all cursors together
Backspace/Delete Delete All Delete at all cursors

📦 Panel Navigation

When any panel is open (Diagnostics, References, Symbols, etc.):

Keybinding Command Description
or j k Navigate Items Move selection up/down
Enter Select/Jump Jump to selected item
Esc Close Panel Close the panel
Type characters Filter/Search Narrow down results (in symbols panels)

⚙️ Special Modes

Search/Replace Mode

Active when Ctrl+F (search) or Ctrl+R (replace) is pressed:

  • n - Next match
  • N - Previous match
  • Alt+C - Toggle case sensitive
  • Alt+W - Toggle whole word match
  • / - Navigate search history
  • Esc - Exit search mode

Fuss (File Tree) Mode

Active when Ctrl+B or F3 is pressed:

  • j / k - Move to previous/next sibling
  • / - Enter directory / exit to parent
  • Enter or o - Open file
  • Space - Toggle expand/collapse
  • ? - Show hints
  • Esc - Exit Fuss mode

Git operations in Fuss mode:

  • a - Stage file
  • u - Unstage file
  • d - Diff file
  • m - Commit with message
  • p - Push to remote
  • f - Fetch from remote
  • l - Pull from remote
  • t - Create and push tag

💡 Tips

Keybinding Conflicts

  • Some keybindings may conflict with terminal emulator shortcuts
  • If a key doesn't work, check your terminal's keyboard settings
  • Common conflicts: F-keys (media controls), Ctrl+W (close terminal tab)
  • All LSP features have Alt+key alternatives that work better in terminals

Terminal Compatibility

Most terminal emulators don't pass Ctrl+Shift combinations reliably. That's why fac uses Alt+key alternatives:

  • Alt+E instead of Ctrl+Shift+D for diagnostics
  • Alt+O instead of Ctrl+Shift+O for document symbols
  • Alt+P instead of Ctrl+Shift+T for workspace symbols
  • Alt+R instead of Ctrl+Shift+R for references

Discovering Commands

  • Use Ctrl+P (Command Palette) to see all available commands
  • Press Ctrl+/ or Ctrl+? to see the help screen

Vim Users

Some vim-style keybindings work:

  • j / k - Up/down in panels and file tree
  • Alt+H/J/K/L - Navigate between panes
  • o - Open file in file tree
  • Navigation in Fuss mode is sibling-based like vim's file explorers

🚀 Most Useful Combos

Exploring code:

  1. F6 or Alt+P - Find any symbol in project
  2. F12 or Alt+G - Jump to definition
  3. Shift+F12 or Alt+R - See all usages
  4. Alt+, - Jump back

Fixing errors:

  1. F8 or Alt+E - See all errors
  2. Navigate to error line
  3. F10 or Alt+. - Apply quick fix
  4. Ctrl+S - Save

Refactoring:

  1. Shift+F12 or Alt+R - See all references
  2. F2 - Rename everywhere
  3. Shift+Alt+F - Format code
  4. Ctrl+S - Save

Working with multiple files:

  1. Ctrl+B or F3 - Browse file tree
  2. Enter - Open in new tab
  3. Ctrl+PageDown/Up - Switch between tabs
  4. Alt+V / Alt+S - Split panes vertical/horizontal
  5. Alt+H/J/K/L - Navigate panes

For detailed feature explanations, see LSP_GUIDE.md

View source
1 # fac Keybindings Reference
2
3 Complete keyboard shortcut reference for `fac` editor.
4
5 ---
6
7 ## 🔍 LSP Features
8
9 | Keybinding | Command | Description |
10 |------------|---------|-------------|
11 | `F12` or `Ctrl+\` or `Alt+G` | Go to Definition | Jump to where a symbol is defined |
12 | `Shift+F12` or `Alt+R` | Find References | Find all usages of a symbol |
13 | `F2` | Rename Symbol | Rename symbol across entire project |
14 | `F10` or `Alt+.` | Code Actions | Quick fixes and refactorings |
15 | `F8` or `Alt+E` | Diagnostics Panel | Show all errors and warnings |
16 | `F4` or `Alt+O` | Document Symbols | Navigate symbols in current file |
17 | `F6` or `Alt+P` | Workspace Symbols | Search symbols across all files |
18 | `Ctrl+P` | Command Palette | Search and execute any command |
19 | `Shift+Alt+F` | Format Document | Auto-format current file |
20 | `Alt+,` | Jump Back | Return to previous location (jump stack) |
21
22 ---
23
24 ## 📁 File Operations
25
26 | Keybinding | Command | Description |
27 |------------|---------|-------------|
28 | `Ctrl+S` | Save | Save current file |
29 | `Ctrl+Q` | Quit | Exit editor (prompts if unsaved) |
30 | `Ctrl+O` | Open File | Open file browser (Fortress mode) |
31 | `Ctrl+N` | New File | Create new untitled buffer |
32 | `Ctrl+T` | New Tab | Create new empty tab |
33
34 ---
35
36 ## 📝 Editing
37
38 | Keybinding | Command | Description |
39 |------------|---------|-------------|
40 | `Ctrl+D` | Select Next Match | Add cursor at next occurrence of selection |
41 | `Ctrl+Z` | Undo | Undo last change |
42 | `Ctrl+Y` | Redo | Redo last undone change |
43 | `Ctrl+X` | Cut | Cut selection to clipboard |
44 | `Ctrl+C` | Copy | Copy selection to clipboard |
45 | `Ctrl+V` | Paste | Paste from clipboard |
46 | `Ctrl+A` | Select All | Select entire file |
47 | `Alt+Backspace` | Delete Word | Delete word backward |
48 | `Backspace` | Delete Char | Delete character backward |
49 | `Delete` | Delete Forward | Delete character forward |
50
51 ---
52
53 ## 🔎 Search & Replace
54
55 | Keybinding | Command | Description |
56 |------------|---------|-------------|
57 | `Ctrl+F` | Search | Open unified search/replace prompt |
58 | `Ctrl+H` | Replace | Open unified search/replace (same as Ctrl+F) |
59 | `Ctrl+G` | Go to Line | Jump to specific line number |
60 | **In Search Mode:** | | |
61 | `n` or `Ctrl+N` | Next Match | Jump to next search result |
62 | `N` or `Ctrl+P` | Previous Match | Jump to previous search result |
63 | `r` | Replace One | Replace current match |
64 | `a` | Replace All | Replace all matches |
65 | `Ctrl+R` | Toggle Regex | Enable/disable regex search |
66 | `Ctrl+C` | Toggle Case | Toggle case-sensitive search |
67 | `Ctrl+W` | Toggle Whole Word | Toggle whole-word matching |
68 | `Alt+S` | Search in Selection | Limit search to selected text |
69 | `↑` / `↓` | History | Navigate search history |
70 | `Esc` | Exit Search | Close search prompt |
71
72 ---
73
74 ## 🗂️ Tabs & Windows
75
76 | Keybinding | Command | Description |
77 |------------|---------|-------------|
78 | `Ctrl+T` | New Tab | Create new empty tab |
79 | `Ctrl+W` | Close Tab/Pane | Close current pane (then tab if last pane) |
80 | `Ctrl+PageDown` or `Ctrl+Alt+Right` | Next Tab | Switch to next tab |
81 | `Ctrl+PageUp` or `Ctrl+Alt+Left` | Previous Tab | Switch to previous tab |
82 | `Alt+1` to `Alt+9` (or `Ctrl+1` to `Ctrl+9`) | Jump to Tab | Switch to specific tab number |
83 | `Alt+V` | Split Vertical | Split current pane vertically |
84 | `Alt+S` | Split Horizontal | Split current pane horizontally |
85 | `Alt+Q` | Close Pane | Close current pane only |
86 | `Alt+H` or `Ctrl+Shift+Left` | Navigate Left | Move to pane on the left |
87 | `Alt+L` or `Ctrl+Shift+Right` | Navigate Right | Move to pane on the right |
88 | `Alt+K` or `Ctrl+Shift+Up` | Navigate Up | Move to pane above |
89 | `Alt+J` or `Ctrl+Shift+Down` | Navigate Down | Move to pane below |
90
91 ---
92
93 ## 🧭 Navigation
94
95 | Keybinding | Command | Description |
96 |------------|---------|-------------|
97 | `↑` `↓` `←` `→` | Move Cursor | Move cursor one character/line |
98 | `Alt+↑` | Move Line Up | Move current line up |
99 | `Alt+↓` | Move Line Down | Move current line down |
100 | `Home` or `Ctrl+A` | Line Start | Jump to beginning of line (smart toggle) |
101 | `End` or `Ctrl+E` | Line End | Jump to end of line |
102 | `Ctrl+Home` | File Start | Jump to beginning of file |
103 | `Ctrl+End` | File End | Jump to end of file |
104 | `Alt+←` / `Alt+→` | Word Jump | Move cursor by word |
105 | `Page Up` / `Page Down` | Page Scroll | Move up/down one screen |
106 | `Alt+[` / `Alt+]` | Match Bracket | Jump to matching bracket/paren |
107
108 ---
109
110 ## ✂️ Selection
111
112 | Keybinding | Command | Description |
113 |------------|---------|-------------|
114 | `Shift+↑↓←→` | Select | Extend selection with arrow keys |
115 | `Ctrl+Shift+Home` | Select to Start | Select from cursor to file start |
116 | `Ctrl+Shift+End` | Select to End | Select from cursor to file end |
117 | `Ctrl+A` | Select All | Select entire file |
118 | `Ctrl+D` | Select Next | Add cursor at next match of selection |
119 | `Esc` | Clear Selection | Deselect and return to single cursor |
120
121 ---
122
123 ## 🎨 Command & Utility
124
125 | Keybinding | Command | Description |
126 |------------|---------|-------------|
127 | `Ctrl+P` | Command Palette | Search and execute any command |
128 | `Ctrl+?` or `Ctrl+/` | Help | Show help screen |
129 | `Ctrl+B` or `F3` | File Tree | Toggle file explorer (Fuss mode) |
130 | `Ctrl+L` | Redraw Screen | Clear and redraw the screen |
131 | `Esc` | Cancel/Close | Close panels, cancel operations |
132
133 ---
134
135 ## 📋 Clipboard & Yank Stack
136
137 | Keybinding | Command | Description |
138 |------------|---------|-------------|
139 | `Ctrl+X` | Cut | Cut selection and add to yank stack |
140 | `Ctrl+C` | Copy | Copy selection to clipboard |
141 | `Ctrl+V` | Paste | Paste from clipboard |
142 | `Ctrl+Shift+V` | Yank Cycle | Cycle through clipboard history |
143
144 ---
145
146 ## 🌲 File Tree (Fuss Mode)
147
148 | Keybinding | Command | Description |
149 |------------|---------|-------------|
150 | `Ctrl+B` or `F3` | Toggle Tree | Show/hide file tree |
151 | **In Tree:** | | |
152 | `j` `k` or `↑` `↓` | Navigate | Move to previous/next sibling |
153 | `→` / `←` | Enter/Exit | Enter directory or exit to parent |
154 | `Enter` or `o` | Open | Open file in editor |
155 | `Space` | Toggle Expand | Expand/collapse directory |
156 | `?` | Show Hints | Display fuss mode keybindings |
157 | `Esc` | Close Tree | Hide file tree |
158
159 ---
160
161 ## 🎯 Multiple Cursors
162
163 | Keybinding | Command | Description |
164 |------------|---------|-------------|
165 | `Ctrl+D` | Select Word & Next | Select word under cursor, add cursor at next match |
166 | `Alt+Click` | Add/Remove Cursor | Add or remove cursor at mouse position |
167 | `Ctrl+Alt+↑` | Add Cursor Above | Add cursor on line above |
168 | `Ctrl+Alt+↓` | Add Cursor Below | Add cursor on line below |
169 | `Esc` | Single Cursor | Return to single cursor mode |
170 | *(while multiple cursors active)* | | |
171 | Type normally | Edit All | Type at all cursor positions |
172 | Arrow keys | Move All | Move all cursors together |
173 | `Backspace`/`Delete` | Delete All | Delete at all cursors |
174
175 ---
176
177 ## 📦 Panel Navigation
178
179 When any panel is open (Diagnostics, References, Symbols, etc.):
180
181 | Keybinding | Command | Description |
182 |------------|---------|-------------|
183 | `↑` `↓` or `j` `k` | Navigate Items | Move selection up/down |
184 | `Enter` | Select/Jump | Jump to selected item |
185 | `Esc` | Close Panel | Close the panel |
186 | Type characters | Filter/Search | Narrow down results (in symbols panels) |
187
188 ---
189
190 ## ⚙️ Special Modes
191
192 ### Search/Replace Mode
193 Active when `Ctrl+F` (search) or `Ctrl+R` (replace) is pressed:
194 - `n` - Next match
195 - `N` - Previous match
196 - `Alt+C` - Toggle case sensitive
197 - `Alt+W` - Toggle whole word match
198 - `↑` / `↓` - Navigate search history
199 - `Esc` - Exit search mode
200
201 ### Fuss (File Tree) Mode
202 Active when `Ctrl+B` or `F3` is pressed:
203 - `j` / `k` - Move to previous/next sibling
204 - `→` / `←` - Enter directory / exit to parent
205 - `Enter` or `o` - Open file
206 - `Space` - Toggle expand/collapse
207 - `?` - Show hints
208 - `Esc` - Exit Fuss mode
209
210 **Git operations in Fuss mode:**
211 - `a` - Stage file
212 - `u` - Unstage file
213 - `d` - Diff file
214 - `m` - Commit with message
215 - `p` - Push to remote
216 - `f` - Fetch from remote
217 - `l` - Pull from remote
218 - `t` - Create and push tag
219
220 ---
221
222 ## 💡 Tips
223
224 ### Keybinding Conflicts
225 - Some keybindings may conflict with terminal emulator shortcuts
226 - If a key doesn't work, check your terminal's keyboard settings
227 - Common conflicts: F-keys (media controls), `Ctrl+W` (close terminal tab)
228 - All LSP features have Alt+key alternatives that work better in terminals
229
230 ### Terminal Compatibility
231 Most terminal emulators don't pass Ctrl+Shift combinations reliably. That's why `fac` uses Alt+key alternatives:
232 - `Alt+E` instead of Ctrl+Shift+D for diagnostics
233 - `Alt+O` instead of Ctrl+Shift+O for document symbols
234 - `Alt+P` instead of Ctrl+Shift+T for workspace symbols
235 - `Alt+R` instead of Ctrl+Shift+R for references
236
237 ### Discovering Commands
238 - Use `Ctrl+P` (Command Palette) to see all available commands
239 - Press `Ctrl+/` or `Ctrl+?` to see the help screen
240
241 ### Vim Users
242 Some vim-style keybindings work:
243 - `j` / `k` - Up/down in panels and file tree
244 - `Alt+H/J/K/L` - Navigate between panes
245 - `o` - Open file in file tree
246 - Navigation in Fuss mode is sibling-based like vim's file explorers
247
248 ---
249
250 ## 🚀 Most Useful Combos
251
252 **Exploring code:**
253 1. `F6` or `Alt+P` - Find any symbol in project
254 2. `F12` or `Alt+G` - Jump to definition
255 3. `Shift+F12` or `Alt+R` - See all usages
256 4. `Alt+,` - Jump back
257
258 **Fixing errors:**
259 1. `F8` or `Alt+E` - See all errors
260 2. Navigate to error line
261 3. `F10` or `Alt+.` - Apply quick fix
262 4. `Ctrl+S` - Save
263
264 **Refactoring:**
265 1. `Shift+F12` or `Alt+R` - See all references
266 2. `F2` - Rename everywhere
267 3. `Shift+Alt+F` - Format code
268 4. `Ctrl+S` - Save
269
270 **Working with multiple files:**
271 1. `Ctrl+B` or `F3` - Browse file tree
272 2. `Enter` - Open in new tab
273 3. `Ctrl+PageDown/Up` - Switch between tabs
274 4. `Alt+V` / `Alt+S` - Split panes vertical/horizontal
275 5. `Alt+H/J/K/L` - Navigate panes
276
277 ---
278
279 For detailed feature explanations, see [LSP_GUIDE.md](LSP_GUIDE.md)