| 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+\` | Go to Definition | Jump to where a symbol is defined | |
| 12 |
| `Shift+F12` or `Ctrl+Shift+R` | Find References | Find all usages of a symbol | |
| 13 |
| `F2` | Rename Symbol | Rename symbol across entire project | |
| 14 |
| `Ctrl+.` | Code Actions | Quick fixes and refactorings | |
| 15 |
| `F8` or `Ctrl+Shift+D` | Diagnostics Panel | Show all errors and warnings | |
| 16 |
| `F4` or `Ctrl+Shift+O` | Document Symbols | Navigate symbols in current file | |
| 17 |
| `F6` or `Ctrl+Shift+T` | 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 | Close current tab | |
| 80 |
| `Ctrl+Tab` | Next Tab | Switch to next tab | |
| 81 |
| `F6ab` | Previous Tab | Switch to previous tab | |
| 82 |
| `Alt+1` to `Alt+9` | Jump to Tab | Switch to specific tab number | |
| 83 |
| `Ctrl+\` | Split Vertical | Split current pane vertically | |
| 84 |
| `Ctrl+Shift+\` | Split Horizontal | Split current pane horizontally | |
| 85 |
| `Ctrl+Shift+W` | Close Pane | Close current pane | |
| 86 |
| `Ctrl+H` | Navigate Left | Move to pane on the left | |
| 87 |
| `Ctrl+L` | Navigate Right | Move to pane on the right | |
| 88 |
| `Ctrl+K` | Navigate Up | Move to pane above | |
| 89 |
| `Ctrl+J` | 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 |
| `Ctrl+↑` | Move Line Up | Move current line up | |
| 99 |
| `Ctrl+↓` | Move Line Down | Move current line down | |
| 100 |
| `Home` or `Ctrl+A` | Line Start | Jump to beginning of line | |
| 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 |
| `Page Up` | Scroll Up | Move up one screen | |
| 105 |
| `Page Down` | Scroll Down | Move down one screen | |
| 106 |
| `Ctrl+U` | Half Page Up | Scroll up half screen (vim-style) | |
| 107 |
| `Ctrl+B` | Full Page Up | Scroll up full screen (vim-style) | |
| 108 |
| `Ctrl+D` | Half Page Down | Scroll down half screen (vim-style) | |
| 109 |
| `Ctrl+F` | Full Page Down | Scroll down full screen (vim-style) | |
| 110 |
| `%` | Match Bracket | Jump to matching bracket/paren | |
| 111 |
|
| 112 |
--- |
| 113 |
|
| 114 |
## ✂️ Selection |
| 115 |
|
| 116 |
| Keybinding | Command | Description | |
| 117 |
|------------|---------|-------------| |
| 118 |
| `Shift+↑↓←→` | Select | Extend selection with arrow keys | |
| 119 |
| `Ctrl+Shift+Home` | Select to Start | Select from cursor to file start | |
| 120 |
| `Ctrl+Shift+End` | Select to End | Select from cursor to file end | |
| 121 |
| `Ctrl+A` | Select All | Select entire file | |
| 122 |
| `Ctrl+D` | Select Next | Add cursor at next match of selection | |
| 123 |
| `Esc` | Clear Selection | Deselect and return to single cursor | |
| 124 |
|
| 125 |
--- |
| 126 |
|
| 127 |
## 🎨 Command & Utility |
| 128 |
|
| 129 |
| Keybinding | Command | Description | |
| 130 |
|------------|---------|-------------| |
| 131 |
| `Ctrl+P` | Command Palette | Search and execute any command | |
| 132 |
| `Ctrl+?` or `F1` | Help | Show help screen | |
| 133 |
| `Ctrl+Shift+F` | File Tree | Toggle file explorer (Fortress mode) | |
| 134 |
| `Esc` | Cancel/Close | Close panels, cancel operations | |
| 135 |
|
| 136 |
--- |
| 137 |
|
| 138 |
## 📋 Clipboard & Yank Stack |
| 139 |
|
| 140 |
| Keybinding | Command | Description | |
| 141 |
|------------|---------|-------------| |
| 142 |
| `Ctrl+X` | Cut | Cut selection and add to yank stack | |
| 143 |
| `Ctrl+C` | Copy | Copy selection to clipboard | |
| 144 |
| `Ctrl+V` | Paste | Paste from clipboard | |
| 145 |
| `Ctrl+Shift+V` | Yank Cycle | Cycle through clipboard history | |
| 146 |
|
| 147 |
--- |
| 148 |
|
| 149 |
## 🌲 File Tree (Fortress Mode) |
| 150 |
|
| 151 |
| Keybinding | Command | Description | |
| 152 |
|------------|---------|-------------| |
| 153 |
| `Ctrl+Shift+F` | Toggle Tree | Show/hide file tree | |
| 154 |
| **In Tree:** | | | |
| 155 |
| `↑` `↓` or `j` `k` | Navigate | Move selection up/down | |
| 156 |
| `Enter` or `l` | Open/Expand | Open file or expand directory | |
| 157 |
| `h` | Collapse | Collapse current directory | |
| 158 |
| `Space` | Toggle Expand | Expand/collapse directory | |
| 159 |
| `/` | Search Files | Filter files by name | |
| 160 |
| `g` | Go to Top | Jump to first item | |
| 161 |
| `G` | Go to Bottom | Jump to last item | |
| 162 |
| `Esc` | Close Tree | Hide file tree | |
| 163 |
|
| 164 |
--- |
| 165 |
|
| 166 |
## 🎯 Multiple Cursors |
| 167 |
|
| 168 |
| Keybinding | Command | Description | |
| 169 |
|------------|---------|-------------| |
| 170 |
| `Ctrl+D` | Add Next Match | Add cursor at next match of selection | |
| 171 |
| `Esc` | Single Cursor | Return to single cursor mode | |
| 172 |
| *(while multiple cursors active)* | | | |
| 173 |
| Type normally | Edit All | Type at all cursor positions | |
| 174 |
| Arrow keys | Move All | Move all cursors together | |
| 175 |
| `Backspace`/`Delete` | Delete All | Delete at all cursors | |
| 176 |
|
| 177 |
--- |
| 178 |
|
| 179 |
## 📦 Panel Navigation |
| 180 |
|
| 181 |
When any panel is open (Diagnostics, References, Symbols, etc.): |
| 182 |
|
| 183 |
| Keybinding | Command | Description | |
| 184 |
|------------|---------|-------------| |
| 185 |
| `↑` `↓` or `j` `k` | Navigate Items | Move selection up/down | |
| 186 |
| `Enter` | Select/Jump | Jump to selected item | |
| 187 |
| `Esc` | Close Panel | Close the panel | |
| 188 |
| Type characters | Filter/Search | Narrow down results (in symbols panels) | |
| 189 |
|
| 190 |
--- |
| 191 |
|
| 192 |
## ⚙️ Special Modes |
| 193 |
|
| 194 |
### Search/Replace Mode |
| 195 |
Active when `Ctrl+F` is pressed: |
| 196 |
- `n` / `Ctrl+N` - Next match |
| 197 |
- `N` / `Ctrl+P` - Previous match |
| 198 |
- `r` - Replace current |
| 199 |
- `a` - Replace all |
| 200 |
- `Ctrl+R` - Toggle regex |
| 201 |
- `Ctrl+C` - Toggle case sensitive |
| 202 |
- `Ctrl+W` - Toggle whole word |
| 203 |
- `Alt+S` - Search in selection |
| 204 |
- `↑` / `↓` - Navigate search history |
| 205 |
- `Esc` - Exit search mode |
| 206 |
|
| 207 |
### Fortress (File Tree) Mode |
| 208 |
Active when `Ctrl+Shift+F` is pressed: |
| 209 |
- `j` / `k` or `↑` / `↓` - Navigate |
| 210 |
- `Enter` or `l` - Open/Expand |
| 211 |
- `h` - Collapse |
| 212 |
- `/` - Filter files |
| 213 |
- `Esc` - Exit Fortress mode |
| 214 |
|
| 215 |
--- |
| 216 |
|
| 217 |
## 💡 Tips |
| 218 |
|
| 219 |
### Keybinding Conflicts |
| 220 |
- Some keybindings may conflict with terminal emulator shortcuts |
| 221 |
- If a key doesn't work, check your terminal's keyboard settings |
| 222 |
- Common conflicts: `F6` (new terminal tab), `Ctrl+W` (close terminal tab) |
| 223 |
|
| 224 |
### Customization |
| 225 |
- Keybindings are currently hardcoded |
| 226 |
- Future versions will support custom keybindings |
| 227 |
|
| 228 |
### Discovering Commands |
| 229 |
- Use `Ctrl+P` (Command Palette) to see all available commands |
| 230 |
- Commands show their keybindings in the palette |
| 231 |
|
| 232 |
### Vim Users |
| 233 |
Some vim-style keybindings work: |
| 234 |
- `j` / `k` - Up/down in panels |
| 235 |
- `g` / `G` - Top/bottom in file tree |
| 236 |
- `h` / `l` - Collapse/expand in file tree |
| 237 |
- `Ctrl+U` / `Ctrl+D` - Half-page scroll |
| 238 |
- `Ctrl+B` / `Ctrl+F` - Full-page scroll |
| 239 |
- `%` - Match bracket |
| 240 |
|
| 241 |
--- |
| 242 |
|
| 243 |
## 🚀 Most Useful Combos |
| 244 |
|
| 245 |
**Exploring code:** |
| 246 |
1. `F6` - Find any symbol in project |
| 247 |
2. `F12` - Jump to definition |
| 248 |
3. `Shift+F12` - See all usages |
| 249 |
4. `Alt+,` - Jump back |
| 250 |
|
| 251 |
**Fixing errors:** |
| 252 |
1. `F8` - See all errors |
| 253 |
2. Navigate to error |
| 254 |
3. `Ctrl+.` - Apply quick fix |
| 255 |
4. `Ctrl+S` - Save |
| 256 |
|
| 257 |
**Refactoring:** |
| 258 |
1. `Shift+F12` - See all references |
| 259 |
2. `F2` - Rename everywhere |
| 260 |
3. `Shift+Alt+F` - Format code |
| 261 |
4. `Ctrl+S` - Save |
| 262 |
|
| 263 |
**Working with multiple files:** |
| 264 |
1. `Ctrl+Shift+F` - Browse file tree |
| 265 |
2. `Enter` - Open in new tab |
| 266 |
3. `Ctrl+Tab` - Switch between tabs |
| 267 |
4. `Ctrl+\` - Split panes |
| 268 |
5. `Ctrl+H/J/K/L` - Navigate panes |
| 269 |
|
| 270 |
--- |
| 271 |
|
| 272 |
For detailed feature explanations, see [LSP_GUIDE.md](LSP_GUIDE.md) |