Skip to content

Commit 0850b9c

Browse files
committed
Rewrite Vim.md and Tmux.md with complete key mapping reference
Replace sparse lists with organized tables covering all custom key mappings. Add sections for navigation, search, copy mode, pane management, and status bar description.
1 parent acacbfc commit 0850b9c

File tree

2 files changed

+157
-44
lines changed

2 files changed

+157
-44
lines changed

Tmux.md

Lines changed: 68 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,76 @@
1-
## Tmux
1+
# Tmux Key Mappings
22

3-
### Prefix
3+
Prefix key is `C-a` (Ctrl+a).
44

5-
- Ctrl-a
5+
## Sessions
66

7-
### Navigation
7+
| Key | Action |
8+
|---|---|
9+
| `C-a d` | Detach from current session |
10+
| `C-a C-a` | Switch to last active window |
811

9-
- Vim navigation style with Ctrl-h j k l
12+
## Windows
1013

11-
### Splits
14+
| Key | Action |
15+
|---|---|
16+
| `C-a c` | Create new window (in current directory) |
17+
| `C-a r` | Reload tmux configuration |
1218

13-
- Ctrl-a v opens a vertical split
14-
- Ctrl-a s opens a horizontal split
15-
- Ctrl-z toggles zoom out/in on the current split
19+
## Panes
1620

17-
## Global
21+
### Creating panes
1822

19-
- Ctrl-d detaches current split
20-
- Ctrl-e synchronizes all splits
21-
- Ctrl-E turn off splits synchronization
23+
| Key | Action |
24+
|---|---|
25+
| `C-a v` | Vertical split (side by side) |
26+
| `C-a s` | Horizontal split (top and bottom) |
27+
28+
### Navigating panes
29+
30+
Pane navigation is shared with vim — works seamlessly across vim splits and tmux panes.
31+
32+
| Key | Action |
33+
|---|---|
34+
| `C-h` | Move to left pane |
35+
| `C-j` | Move to pane below |
36+
| `C-k` | Move to pane above |
37+
| `C-l` | Move to right pane |
38+
39+
### Resizing panes
40+
41+
| Key | Action |
42+
|---|---|
43+
| `Shift-Left/Right` | Resize horizontally (small step) |
44+
| `Shift-Up/Down` | Resize vertically (small step) |
45+
| `C-Left/Right` | Resize horizontally (large step) |
46+
| `C-Up/Down` | Resize vertically (large step) |
47+
| `C-z` | Toggle zoom on current pane |
48+
49+
## Synchronization
50+
51+
Send the same input to all panes in a window — useful for running the same command on multiple servers.
52+
53+
| Key | Action |
54+
|---|---|
55+
| `C-a e` | Enable pane synchronization |
56+
| `C-a E` | Disable pane synchronization |
57+
58+
## Copy Mode
59+
60+
Enter copy mode with `C-a C-[`. Uses vi keybindings.
61+
62+
| Key | Action |
63+
|---|---|
64+
| `v` | Begin selection |
65+
| `C-v` | Toggle rectangle selection |
66+
| `y` | Copy selection to clipboard |
67+
| `Enter` | Copy selection to clipboard |
68+
69+
## Status Bar
70+
71+
The status bar shows:
72+
- Current session name and user (left)
73+
- Window list (center)
74+
- Battery status, hostname, and date/time (right)
75+
76+
Windows are automatically renamed to the current directory.

Vim.md

Lines changed: 89 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,89 @@
1-
## Vim Key Mappings
2-
3-
- Rspec + Tmux + Rubocop
4-
- \<space\>rs - Run rspec <file>
5-
- \<space\>ra - Run rspec spec (all files)
6-
- \<space\>rn - Run rspec spec (nearest spec)
7-
- \<space\>rl - Run last spec
8-
- \<space\>ru - Run full rubocop
9-
10-
- Ctrl-P Fuzzy Finder
11-
- \<space\>t or \<space\>p
12-
- \<space\>b search only on buffer
13-
14-
- NERDTree
15-
- Ctrl+\\ open and close NERDTree
16-
17-
- Vim-tmux-runner
18-
- When open vim, it asks you which pane to attach
19-
20-
- Ag
21-
- K - search current word
22-
23-
- Global
24-
- vv - opens vertical split
25-
- ss - opens horizontal split
26-
- // - clear current search highlight
27-
- Shift-t - Opens a new tab
28-
- gt - Go to next tab
29-
- Tab - In insert mode, start completion
30-
- \<space\>vr - reload vim configuration
31-
- \<space\>hl - toggle search highlighting on/off
1+
# Vim Key Mappings
2+
3+
Leader key is `<Space>`.
4+
5+
## Navigation
6+
7+
| Key | Action |
8+
|---|---|
9+
| `<Space><Space>` | Switch between the last two files |
10+
| `C-h` `C-j` `C-k` `C-l` | Navigate between vim/tmux panes seamlessly |
11+
| `vv` | Open vertical split |
12+
| `ss` | Open horizontal split |
13+
| `<Space>-` | Zoom current pane (maximize) |
14+
| `<Space>=` | Re-balance all panes |
15+
16+
## File Explorer (NERDTree)
17+
18+
| Key | Action |
19+
|---|---|
20+
| `C-\` | Toggle NERDTree / reveal current file |
21+
22+
## Fuzzy Finder (CtrlP)
23+
24+
| Key | Action |
25+
|---|---|
26+
| `<Space>t` | Open CtrlP file finder |
27+
| `<Space>b` | Search open buffers |
28+
| `<Space>m` | Search most recently used files |
29+
30+
## Search
31+
32+
| Key | Action |
33+
|---|---|
34+
| `K` | Search current word with Ag (Silver Searcher) |
35+
| `//` | Clear current search highlight |
36+
| `<Space>hl` | Toggle search highlighting on/off |
37+
38+
## RSpec (via tmux runner)
39+
40+
| Key | Action |
41+
|---|---|
42+
| `<Space>rs` | Run current spec file |
43+
| `<Space>rn` | Run nearest spec |
44+
| `<Space>rl` | Run last spec |
45+
| `<Space>ra` | Run all specs |
46+
47+
## Code Quality (via tmux runner)
48+
49+
| Key | Action |
50+
|---|---|
51+
| `<Space>ru` | Run Rubocop on project |
52+
| `<Space>rfu` | Run Rubocop on current file |
53+
| `<Space>fl` | Run Flog on current file |
54+
55+
## ERB Templates
56+
57+
| Key | Mode | Action |
58+
|---|---|---|
59+
| `C-k` | Insert | Insert `<%= %>` tag |
60+
| `C-j` | Insert | Insert `<% %>` tag |
61+
62+
## Clipboard
63+
64+
| Key | Action |
65+
|---|---|
66+
| `<Space>y` + motion | Copy to system clipboard (e.g., `<Space>yw` copies a word) |
67+
| `<Space>p` | Paste from system clipboard |
68+
69+
## Tabs
70+
71+
| Key | Action |
72+
|---|---|
73+
| `Shift-t` | Open new tab |
74+
| `Shift-Tab` | Go to next tab |
75+
76+
## Completion
77+
78+
| Key | Mode | Action |
79+
|---|---|---|
80+
| `Tab` | Insert | Autocomplete (or insert tab at beginning of line) |
81+
| `Shift-Tab` | Insert | Next completion |
82+
83+
## Other
84+
85+
| Key | Action |
86+
|---|---|
87+
| `<Space>vr` | Reload vim configuration |
88+
| `<Space>ct` | Generate ctags for the project |
89+
| `<Space>gs` | Open Git status (fugitive) |

0 commit comments

Comments
 (0)