learn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
learn [2022/06/27 14:39] – dblume | learn [2025/08/08 10:21] (current) – [CoPilotChat in vim] dblume | ||
---|---|---|---|
Line 2: | Line 2: | ||
Things to learn through repetition. | Things to learn through repetition. | ||
+ | |||
+ | ===== CoPilotChat in vim ===== | ||
+ | |||
+ | 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 ^ | ||
+ | | vim | C-w,n | New empty window | | ||
+ | | vim | C-w,s | Duplicate window below | | ||
+ | | vim | C-w,v | Duplicate window on side | | ||
+ | | tmux | Prefix,s | New pane below | | ||
+ | | tmux | Prefix,v | New pane on side | | ||
+ | | i3 | Mod+d or Enter or g | Every app launches into a new window (find [[https:// | ||
+ | |||
+ | ^ Close Window / Pane / Window | ||
+ | ^ Context ^ Key ^ Action ^ | ||
+ | | vim | C-w,q | Quit this window | | ||
+ | | vim | C-w,o | Close other windows, leaving only this one. | | ||
+ | | tmux | exit or C-d | Terminate the shell to close pane | | ||
+ | | i3 | | Close the app its normal way | | ||
+ | |||
+ | ^ Resize Window / Pane / Window | ||
+ | ^ Context ^ Key ^ Action ^ | ||
+ | | vim | C-w,= | Make windows equal size | | ||
+ | | vim | C-w,<> | ||
+ | | tmux | Prefix,HJKL | Change dimension in that direction | | ||
+ | | tmux | Prefix, | ||
+ | | i3 | Mod+r,hjkl | Enter resize mode (or drag bar with mouse) | | ||
+ | |||
+ | ^ Maximize Window / Pane / Window | ||
+ | ^ Context ^ Key ^ Action ^ | ||
+ | | vim | Leader,o | Maximize only this window in new tab (find [[https:// | ||
+ | | tmux | Prefix,z | toggle maximize | | ||
+ | | i3 | Mod+f | maximize window | | ||
+ | |||
+ | ^ Navigate Window, Buffer / Pane / Window | ||
+ | ^ Context ^ Key ^ Action ^ | ||
+ | | vim | C-w,hjkl | Select that window | | ||
+ | | vim | tab | Next buffer (in this window) (find [[https:// | ||
+ | | tmux | Prefix,hjkl | Select that pane | | ||
+ | | tmux | Prefix,tab | Next/prev pane, maximized (find [[https:// | ||
+ | | i3 | Mod+hjkl | select that window | | ||
+ | |||
+ | ^ Swap Window / Pane / Window | ||
+ | ^ Context ^ Key ^ Action ^ | ||
+ | | vim | C-w,HJKL | Move window in that direction | | ||
+ | | tmux | Prefix,{ or } | Swap panes | | ||
+ | | tmux | Prefix, | ||
+ | | i3 | Mod+HJKL | Move window in that direction | | ||
+ | |||
+ | ^ New Tab / Window / Workspace | ||
+ | ^ Context ^ Key ^ Action ^ | ||
+ | | vim | Leader,t,n or :tabnew | New tab | | ||
+ | | 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 | | ||
+ | | i3 | Ctrl+Mod+ <- or -> or h or l | Change workspaces | | ||
+ | |||
===== Git ===== | ===== Git ===== | ||
Line 36: | Line 153: | ||
| '' | | '' | ||
| '' | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' |
learn.1656365943.txt.gz · Last modified: 2023/04/12 20:44 (external edit)