learn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
learn [2023/12/09 23:26] – dblume | learn [2025/08/08 10:21] (current) – [CoPilotChat in vim] dblume | ||
---|---|---|---|
Line 3: | Line 3: | ||
Things to learn through repetition. | Things to learn through repetition. | ||
- | ===== CLI Navigation (vim / i3 / tmux) ===== | + | ===== CoPilotChat in vim ===== |
- | ^ New Pane/ | + | Shortcut to official [[https:// |
+ | |||
+ | ^ Insert ^ Normal ^ Action ^ | ||
+ | | <Tab> | - | Trigger/ | ||
+ | | <C-s> | < | ||
+ | | - | grr | Toggle sticky prompt for line under cursor | | ||
+ | | - | grx | Clear all sticky prompts in prompt | | ||
+ | | <C-c> | q | Close the chat window | | ||
+ | | <C-l> | <C-l> | Reset and clear the chat window | | ||
+ | | <C-y> | <C-y> | Accept nearest diff | | ||
+ | | - | gj | Jump to section of nearest diff | | ||
+ | | - | gqa | Add all answers from chat to quickfix list | | ||
+ | | - | gqd | Add all diffs from chat to quickfix list | | ||
+ | | - | gy | Yank nearest diff to register | | ||
+ | | - | gd | Show diff between source and nearest diff | | ||
+ | | - | gi | Show info about current chat | | ||
+ | | - | gc | Show current chat context | | ||
+ | | - | gh | Show help message | | ||
+ | |||
+ | GitHub Copilot' | ||
+ | |||
+ | ^ Insert ^ Action ^ | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | |||
+ | |||
+ | |||
+ | ===== LSP in vim ===== | ||
+ | |||
+ | ^ Insert ^ Normal ^ Action ^ | ||
+ | | | ]d, [d, | Next/Prev diagnostic | | ||
+ | | | < | ||
+ | | | gra | if " | ||
+ | | | K | hover window (details on selected word) | | ||
+ | | | ]q, [q, :ccl | Next/Prev close QuickFix List | | ||
+ | | | ]l, [l, :lcl | Next/Prev close Location List | | ||
+ | | | gq< | ||
+ | | | < | ||
+ | |||
+ | ===== CLI/UI Navigation (vim / tmux / i3) ===== | ||
+ | |||
+ | Vim, tmux and i3 all have similar concepts. You can have multiple things on screen, each can be maximized, and you can also have collections of those things offscreen. This is an over simplification. We're not going to get into things like vim buffers, tmux sessions, and i3 containers. Let's keep it simple. | ||
+ | |||
+ | ^ Nomenclature | ||
+ | ^ Tool ^ Things on screen ^ Off screen ^ | ||
+ | | vim | windows | ||
+ | | tmux | panes | windows | ||
+ | | i3 | windows | ||
+ | |||
+ | If I'm in i3, I'm usually local to the machine and don't start tmux sessions. So for me it's either ssh+tmux+vim+entr, | ||
+ | |||
+ | These are the everyday things I have to do in each: | ||
+ | |||
+ | ^ New Vim Window / tmux Pane / i3 Window | ||
^ Context ^ Key ^ Action ^ | ^ Context ^ Key ^ Action ^ | ||
| vim | C-w,n | New empty window | | | vim | C-w,n | New empty window | | ||
Line 12: | Line 68: | ||
| tmux | Prefix,s | New pane below | | | tmux | Prefix,s | New pane below | | ||
| tmux | Prefix,v | New pane on side | | | tmux | Prefix,v | New pane on side | | ||
- | | i3 | + | | i3 |
- | ^ Close Pane/ | + | ^ Close Window / Pane / Window |
^ Context ^ Key ^ Action ^ | ^ Context ^ Key ^ Action ^ | ||
| vim | C-w,q | Quit this window | | | vim | C-w,q | Quit this window | | ||
Line 21: | Line 77: | ||
| i3 | | Close the app its normal way | | | i3 | | Close the app its normal way | | ||
- | ^ Resize Pane/ | + | ^ Resize |
^ Context ^ Key ^ Action ^ | ^ Context ^ Key ^ Action ^ | ||
| vim | C-w,= | Make windows equal size | | | vim | C-w,= | Make windows equal size | | ||
- | | vim | C-w,< | + | | vim | C-w,<> |
- | | vim | C-w,+ or - | Change | + | |
| tmux | Prefix,HJKL | Change dimension in that direction | | | tmux | Prefix,HJKL | Change dimension in that direction | | ||
- | | i3 | + | | tmux | Prefix, |
+ | | i3 | ||
- | ^ Maximize Pane/ | + | ^ Maximize |
^ Context ^ Key ^ Action ^ | ^ Context ^ Key ^ Action ^ | ||
- | | vim | Leader,o | Maximize only this window in new tab | | + | | vim | Leader,o | Maximize only this window in new tab (find [[https:// |
| tmux | Prefix,z | toggle maximize | | | tmux | Prefix,z | toggle maximize | | ||
- | | i3 | Alt,f | maximize window | | + | | i3 | Mod+f | maximize window | |
- | ^ | + | ^ |
^ Context ^ Key ^ Action ^ | ^ Context ^ Key ^ Action ^ | ||
| vim | C-w,hjkl | Select that window | | | vim | C-w,hjkl | Select that window | | ||
- | | vim | tab | Next buffer (in this window) | | + | | vim | tab | Next buffer (in this window) (find [[https:// |
| tmux | Prefix,hjkl | Select that pane | | | tmux | Prefix,hjkl | Select that pane | | ||
- | | i3 | Alt,f | select that window | | + | | tmux | Prefix,tab | Next/prev pane, maximized (find [[https:// |
+ | | i3 | Mod+hjkl | ||
- | ^ Swap Pane/ | + | ^ Swap Window / Pane / Window |
^ Context ^ Key ^ Action ^ | ^ Context ^ Key ^ Action ^ | ||
| vim | C-w,HJKL | Move window in that direction | | | vim | C-w,HJKL | Move window in that direction | | ||
- | | tmux | Prefix,{ or } | Rotate | + | | tmux | Prefix,{ or } | Swap panes | |
- | | i3 | | | + | | tmux | Prefix, |
+ | | i3 | ||
- | ^ New Tab/ | + | ^ New Tab / Window |
^ Context ^ Key ^ Action ^ | ^ Context ^ Key ^ Action ^ | ||
| vim | Leader,t,n or :tabnew | New tab | | | vim | Leader,t,n or :tabnew | New tab | | ||
| tmux | Prefix,c | Create a new window | | | tmux | Prefix,c | Create a new window | | ||
+ | | i3 | Ctrl+Mod+Shift+o | Move to first available workspace (find [[https:// | ||
+ | |||
+ | |||
+ | ^ Navigate Tab / Window / Workspace | ||
+ | ^ Context ^ Key ^ Action ^ | ||
+ | | vim | gt or gT | Navigate prev or next tab | | ||
| tmux | Prefix,p or n | Previous or next window | | | tmux | Prefix,p or n | Previous or next window | | ||
- | | i3 | Ctrl+Alt+Shift+o | Move to first available workspace | | + | | i3 | Ctrl+Mod+ <- or -> or h or l | Change workspaces | |
- | | i3 | Ctrl+Alt | + | |
Line 92: | Line 155: | ||
| '' | | '' | ||
| '' | | '' | ||
- | | '' | ||
| '' | | '' |
learn.1702193164.txt.gz · Last modified: 2023/12/09 23:26 by dblume