@icarusmx/creta 1.5.6 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,504 @@
1
+ # iTerm2 Pane Navigation - Custom Keyboard Shortcuts
2
+
3
+ <!-- vim: set foldmethod=marker foldlevel=0: -->
4
+
5
+ ## 📖 LazyVim Reading Guide {{{
6
+
7
+ **Start with:** `zM` (close all folds) → Navigate with `za` (toggle fold under cursor)
8
+
9
+ This document uses fold markers `{{{` and `}}}` for organized reading.
10
+
11
+ }}}
12
+
13
+ ## 🚨 Problem: Default Pane Navigation is Awkward {{{
14
+
15
+ You split your terminal with `Cmd + D`, but switching between panes requires:
16
+ - **Default**: `Option + Cmd + Arrow`
17
+
18
+ That's **three keys** just to move between panes. Way too much!
19
+
20
+ **Common complaints:**
21
+ - Too many modifier keys
22
+ - Awkward hand position
23
+ - Slows down your workflow
24
+
25
+ }}}
26
+
27
+ ## ✅ Solution: Customize to Cmd + 0 (or any key you prefer) {{{
28
+
29
+ You can change iTerm2's pane navigation shortcuts to something simpler.
30
+
31
+ **Popular options:**
32
+ - `Cmd + 0` (simple, one-handed)
33
+ - `Cmd + Arrow` (directional)
34
+ - `Cmd + [` and `]` (browser-style)
35
+ - `Cmd + h/j/k/l` (vim-style)
36
+
37
+ This guide shows you how to set **`Cmd + 0`** for cycling through panes.
38
+
39
+ }}}
40
+
41
+ ## 🔧 Step-by-Step Configuration {{{
42
+
43
+ ### Step 1: Open iTerm2 Preferences {{{
44
+
45
+ ```bash
46
+ # Keyboard shortcut
47
+ Cmd + ,
48
+ ```
49
+
50
+ **Or:** Click **iTerm2 menu** → **Preferences** (in the menu bar)
51
+
52
+ }}}
53
+
54
+ ### Step 2: Navigate to Key Bindings {{{
55
+
56
+ In the Preferences window:
57
+ 1. Click **"Keys"** tab at the top
58
+ 2. Click **"Key Bindings"** sub-tab (should already be selected)
59
+
60
+ You'll see a list of all current keyboard shortcuts.
61
+
62
+ }}}
63
+
64
+ ### Step 3: Remove Conflicting Binding {{{
65
+
66
+ Before adding `Cmd + 0`, we need to remove the default binding:
67
+
68
+ 1. In the **search box** at the bottom, type: `⌘0`
69
+ 2. You'll see: **"Select Tab with Number 10"** or similar
70
+ 3. Click on it to select it
71
+ 4. Click the **`-`** (minus) button at the bottom left
72
+ 5. Confirm deletion
73
+
74
+ **Why?** By default, `Cmd + 0-9` switches between tabs. Since most people don't use "go to tab 10", we can repurpose it.
75
+
76
+ }}}
77
+
78
+ ### Step 4: Add New Pane Navigation Binding {{{
79
+
80
+ Now let's add the new shortcut:
81
+
82
+ 1. Click the **`+`** (plus) button at the bottom left
83
+ 2. A dialog appears: **"Press shortcut"**
84
+ 3. Press **`Cmd + 0`** on your keyboard (it will show as `⌘0`)
85
+ 4. In the **"Action"** dropdown menu, select: **"Select Next Pane"**
86
+ 5. Click **"OK"**
87
+
88
+ **Result:** Your new binding appears in the list!
89
+
90
+ }}}
91
+
92
+ ### Step 5: Test It {{{
93
+
94
+ Close the preferences window and test:
95
+
96
+ ```bash
97
+ # Split terminal vertically
98
+ Cmd + D
99
+
100
+ # Split terminal horizontally
101
+ Cmd + Shift + D
102
+
103
+ # Now press Cmd + 0 to cycle through panes
104
+ ```
105
+
106
+ Each press of `Cmd + 0` should move focus to the next pane in a circular pattern.
107
+
108
+ }}}
109
+
110
+ }}}
111
+
112
+ ## 🎯 Alternative Configurations {{{
113
+
114
+ ### Option 1: Directional Navigation (Cmd + Arrow) {{{
115
+
116
+ If you prefer directional control instead of cycling:
117
+
118
+ **Setup:**
119
+ 1. Remove conflicts: Search for `⌘←`, `⌘→`, `⌘↑`, `⌘↓` and delete them
120
+ 2. Add four bindings:
121
+ - `Cmd + Left Arrow` → **"Select Pane Left"**
122
+ - `Cmd + Right Arrow` → **"Select Pane Right"**
123
+ - `Cmd + Up Arrow` → **"Select Pane Above"**
124
+ - `Cmd + Down Arrow` → **"Select Pane Below"**
125
+
126
+ **Pros:**
127
+ - Intuitive directional control
128
+ - No need to remember pane order
129
+
130
+ **Cons:**
131
+ - Four shortcuts to set up instead of one
132
+ - May conflict with other apps
133
+
134
+ }}}
135
+
136
+ ### Option 2: Browser-Style (Cmd + [ and ]) {{{
137
+
138
+ **Setup:**
139
+ 1. Add two bindings:
140
+ - `Cmd + [` → **"Select Previous Pane"**
141
+ - `Cmd + ]` → **"Select Next Pane"**
142
+
143
+ **Pros:**
144
+ - Similar to browser tab navigation
145
+ - Only two keys to remember
146
+
147
+ **Cons:**
148
+ - Not directional (cycles through panes)
149
+
150
+ }}}
151
+
152
+ ### Option 3: Vim-Style (Cmd + h/j/k/l) {{{
153
+
154
+ **Setup:**
155
+ 1. Add four bindings:
156
+ - `Cmd + h` → **"Select Pane Left"**
157
+ - `Cmd + j` → **"Select Pane Below"**
158
+ - `Cmd + k` → **"Select Pane Above"**
159
+ - `Cmd + l` → **"Select Pane Right"**
160
+
161
+ **Pros:**
162
+ - Natural for vim users
163
+ - Home row keys (fast)
164
+
165
+ **Cons:**
166
+ - Conflicts with shell shortcuts (Ctrl+L clears screen in some setups)
167
+
168
+ }}}
169
+
170
+ ### Option 4: Two-Key Cycling (Cmd + 0 and Cmd + 9) {{{
171
+
172
+ **Setup:**
173
+ 1. Remove conflicts for both `⌘0` and `⌘9`
174
+ 2. Add bindings:
175
+ - `Cmd + 0` → **"Select Next Pane"**
176
+ - `Cmd + 9` → **"Select Previous Pane"**
177
+
178
+ **Pros:**
179
+ - Cycle forward and backward
180
+ - Only two shortcuts
181
+
182
+ **Cons:**
183
+ - Still cycles, not directional
184
+
185
+ }}}
186
+
187
+ }}}
188
+
189
+ ## 🔍 Finding the Right Action {{{
190
+
191
+ When adding a key binding, iTerm2 offers many actions. Here are the pane-related ones:
192
+
193
+ ### Pane Selection Actions {{{
194
+
195
+ **Cycling (circular navigation):**
196
+ - `Select Next Pane` - Move to next pane clockwise
197
+ - `Select Previous Pane` - Move to previous pane counter-clockwise
198
+
199
+ **Directional (precise navigation):**
200
+ - `Select Pane Left` - Move focus to pane on the left
201
+ - `Select Pane Right` - Move focus to pane on the right
202
+ - `Select Pane Above` - Move focus to pane above
203
+ - `Select Pane Below` - Move focus to pane below
204
+
205
+ **Other useful actions:**
206
+ - `Split Horizontally` - Create new horizontal split
207
+ - `Split Vertically` - Create new vertical split (already `Cmd+D`)
208
+ - `Move to Split Pane...` - Interactive pane selector
209
+
210
+ }}}
211
+
212
+ ### How to Search for Actions {{{
213
+
214
+ In the "Action" dropdown:
215
+ 1. Start typing to filter (e.g., "pane", "split", "select")
216
+ 2. Scroll to find the exact action you need
217
+ 3. Preview the action description
218
+
219
+ }}}
220
+
221
+ }}}
222
+
223
+ ## 🛡️ Conflict Resolution {{{
224
+
225
+ ### Common Conflicts {{{
226
+
227
+ **System Shortcuts:**
228
+ - `Cmd + Arrow` - Mission Control, Switch Spaces (macOS)
229
+ - `Cmd + [` - Back (browsers, many apps)
230
+ - `Cmd + ]` - Forward (browsers, many apps)
231
+
232
+ **App Shortcuts:**
233
+ - `Cmd + 0` - Reset zoom (some apps)
234
+ - `Cmd + h/j/k/l` - Various vim-style apps
235
+
236
+ **Solution:** Choose shortcuts that don't conflict with your most-used apps.
237
+
238
+ }}}
239
+
240
+ ### Checking for Conflicts {{{
241
+
242
+ Before assigning a shortcut:
243
+
244
+ 1. **Try it in iTerm2** - Does it do something already?
245
+ 2. **Try it in your browser** - Common conflict area
246
+ 3. **Try it in your editor** - VSCode, Neovim, etc.
247
+
248
+ If there's a conflict, pick a different key combination.
249
+
250
+ }}}
251
+
252
+ ### Safe Shortcut Choices {{{
253
+
254
+ **Least likely to conflict:**
255
+ - `Cmd + 0` (if you don't use tab 10)
256
+ - `Cmd + 9` (if you don't use tab 9)
257
+ - `Ctrl + Cmd + Arrow` (more modifier keys, but safe)
258
+ - `Option + Arrow` (simpler than default)
259
+
260
+ **Test before committing!**
261
+
262
+ }}}
263
+
264
+ }}}
265
+
266
+ ## 🧪 Practice Exercise {{{
267
+
268
+ Try this to get comfortable with your new shortcuts:
269
+
270
+ ### Exercise 1: Basic Pane Navigation {{{
271
+
272
+ ```bash
273
+ # 1. Split into 4 panes
274
+ Cmd + D # Vertical split (2 panes)
275
+ Cmd + Shift + D # Horizontal split (3 panes)
276
+ Cmd + 0 # Move to another pane
277
+ Cmd + D # Split again (4 panes)
278
+
279
+ # 2. Practice navigating
280
+ Cmd + 0 # Cycle through each pane
281
+ Cmd + 0 # Keep pressing to make a full circle
282
+ Cmd + 0
283
+ Cmd + 0 # Back to first pane
284
+
285
+ # 3. Run commands in each pane
286
+ # Pane 1: ls
287
+ # Pane 2: git status
288
+ # Pane 3: npm run dev
289
+ # Pane 4: tail -f logs/app.log
290
+
291
+ # 4. Navigate while commands run
292
+ Cmd + 0 # Jump between running processes
293
+ ```
294
+
295
+ }}}
296
+
297
+ ### Exercise 2: Real Workflow Simulation {{{
298
+
299
+ Simulate a full-stack development workflow:
300
+
301
+ ```bash
302
+ # Pane 1 (top-left): Backend server
303
+ cd ~/projects/my-app/backend
304
+ npm run dev
305
+
306
+ # Pane 2 (top-right): Frontend server
307
+ Cmd + D # Split vertically
308
+ cd ~/projects/my-app/frontend
309
+ npm run dev
310
+
311
+ # Pane 3 (bottom-left): Git operations
312
+ Cmd + Shift + D # Split horizontally
313
+ git status
314
+
315
+ # Pane 4 (bottom-right): Database
316
+ Cmd + 0 # Navigate to pane 2
317
+ Cmd + Shift + D # Split it horizontally
318
+ mongod
319
+
320
+ # Navigate freely
321
+ Cmd + 0 # Cycle through to monitor all processes
322
+ ```
323
+
324
+ **Practice navigating while processes are running** - this is the real use case!
325
+
326
+ }}}
327
+
328
+ }}}
329
+
330
+ ## 📚 Quick Reference {{{
331
+
332
+ ### Default iTerm2 Pane Shortcuts {{{
333
+
334
+ ```bash
335
+ # Splitting
336
+ Cmd + D # Split vertically
337
+ Cmd + Shift + D # Split horizontally
338
+
339
+ # Navigation (DEFAULT)
340
+ Option + Cmd + Arrow # Navigate between panes
341
+ Cmd + [ # Previous pane (default)
342
+ Cmd + ] # Next pane (default)
343
+
344
+ # Closing
345
+ Cmd + W # Close current pane
346
+ Cmd + Option + W # Close all panes except current
347
+ ```
348
+
349
+ }}}
350
+
351
+ ### Your Custom Setup (Cmd + 0) {{{
352
+
353
+ ```bash
354
+ # After configuration:
355
+ Cmd + D # Split vertically (unchanged)
356
+ Cmd + Shift + D # Split horizontally (unchanged)
357
+ Cmd + 0 # Cycle to next pane (NEW!)
358
+ Cmd + 9 # Cycle to previous pane (OPTIONAL)
359
+ ```
360
+
361
+ }}}
362
+
363
+ ### Configuration Summary {{{
364
+
365
+ **To set up Cmd + 0 navigation:**
366
+
367
+ 1. Open: `Cmd + ,` → Keys → Key Bindings
368
+ 2. Remove: `⌘0` binding (Select Tab 10)
369
+ 3. Add: `⌘0` → "Select Next Pane"
370
+ 4. Test: Split panes and press `Cmd + 0`
371
+
372
+ **Done!** 🎉
373
+
374
+ }}}
375
+
376
+ }}}
377
+
378
+ ## 🎓 Advanced Tips {{{
379
+
380
+ ### Save Custom Key Bindings as Preset {{{
381
+
382
+ Once you've customized your shortcuts:
383
+
384
+ 1. Preferences → Keys → Key Bindings
385
+ 2. Click **"Presets"** dropdown (bottom)
386
+ 3. Select **"Duplicate Current Preset"**
387
+ 4. Name it: "My Custom Navigation"
388
+ 5. Export it: Presets → Export → Save `.json` file
389
+
390
+ **Why?**
391
+ - Backup your configuration
392
+ - Share across machines
393
+ - Restore if iTerm2 resets
394
+
395
+ }}}
396
+
397
+ ### Profile-Specific Shortcuts {{{
398
+
399
+ You can have different shortcuts for different profiles:
400
+
401
+ 1. Preferences → Profiles → [Your Profile]
402
+ 2. Go to **Keys** tab
403
+ 3. Check **"A hotkey opens a dedicated window with this profile"**
404
+ 4. Configure profile-specific key bindings
405
+
406
+ **Use case:** Different shortcuts for different projects!
407
+
408
+ }}}
409
+
410
+ ### Combine with Tmux {{{
411
+
412
+ If you use tmux inside iTerm2:
413
+
414
+ **iTerm2 shortcuts** control iTerm2 panes
415
+ **Tmux shortcuts** (e.g., `Ctrl+B + Arrow`) control tmux panes
416
+
417
+ **Best practice:**
418
+ - Use iTerm2 panes for different servers/services
419
+ - Use tmux panes for same-context workflows
420
+ - Keep shortcuts distinct to avoid conflicts
421
+
422
+ }}}
423
+
424
+ }}}
425
+
426
+ ## 🐛 Troubleshooting {{{
427
+
428
+ ### Shortcut Not Working {{{
429
+
430
+ **Check 1: Conflict**
431
+ - Another app might be capturing the shortcut
432
+ - Test in different apps to confirm
433
+
434
+ **Check 2: Profile Override**
435
+ - Some profiles override global key bindings
436
+ - Check Preferences → Profiles → [Profile] → Keys
437
+
438
+ **Check 3: macOS System Preferences**
439
+ - System Preferences → Keyboard → Shortcuts
440
+ - Look for conflicting system shortcuts
441
+
442
+ **Fix:** Choose a different key combination or disable the conflicting shortcut.
443
+
444
+ }}}
445
+
446
+ ### Changes Not Saving {{{
447
+
448
+ **Possible causes:**
449
+ - iTerm2 preferences file is read-only
450
+ - Profile is overriding global settings
451
+ - Need to restart iTerm2
452
+
453
+ **Fix:**
454
+ ```bash
455
+ # 1. Close all iTerm2 windows
456
+ Cmd + Q # Fully quit iTerm2
457
+
458
+ # 2. Reopen iTerm2
459
+ # 3. Check if changes persist
460
+ ```
461
+
462
+ }}}
463
+
464
+ ### Accidentally Deleted Important Shortcut {{{
465
+
466
+ **Fix: Restore defaults**
467
+ 1. Preferences → Keys → Key Bindings
468
+ 2. Click **"Presets"** dropdown
469
+ 3. Select **"Factory Defaults"**
470
+ 4. Confirm restoration
471
+
472
+ **Warning:** This removes ALL custom shortcuts!
473
+
474
+ **Better approach:** Export your config before experimenting (see Advanced Tips).
475
+
476
+ }}}
477
+
478
+ }}}
479
+
480
+ ## 💡 Recommended Setup for Most Users {{{
481
+
482
+ After trying many configurations, here's what works best for most developers:
483
+
484
+ ```bash
485
+ Cmd + D # Split vertically (default)
486
+ Cmd + Shift + D # Split horizontally (default)
487
+ Cmd + 0 # Next pane (custom)
488
+ Cmd + 9 # Previous pane (custom)
489
+ Cmd + W # Close pane (default)
490
+ ```
491
+
492
+ **Why this works:**
493
+ - Simple to remember (just 0 and 9)
494
+ - One-handed operation
495
+ - Doesn't conflict with most apps
496
+ - Fast enough for daily use
497
+
498
+ **Advanced users** might prefer directional arrows, but for most workflows, cycling with 0/9 is sufficient and simpler.
499
+
500
+ }}}
501
+
502
+ ---
503
+
504
+ **Remember:** The best keyboard shortcuts are the ones you'll actually use. Start simple, then customize as needed! ⌨️