User Tools

Site Tools


learn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn [2023/12/09 23:58] – [CLI Navigation (vim / i3 / tmux)] dblumelearn [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://github.com/CopilotC-Nvim/CopilotChat.nvim?tab=readme-ov-file#features|Features and Short cut keys]].
 +
 +^ Insert ^ Normal ^ Action ^
 +| <Tab> | -     | Trigger/accept completion menu for tokens |
 +| <C-s> | <CR>  | Submit the current prompt |
 +| -     | 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's Suggestions:
 +
 +^ Insert ^ Action ^
 +| <C-]>       | Dismiss the current suggestion. |
 +| <M-]>, <M-[> | Cycle to the next/prev suggestion, if one is available. |
 +| <M-Right>   | Accept the **next word** of the current suggestion. |
 +| <M-C-Right> | Accept the next line of the current suggestion. |
 +| <M-\>       | Explicitly request a suggestion. |
 +
 +
 +
 +===== LSP in vim =====
 +
 +^ Insert ^ Normal ^ Action ^
 +| | ]d, [d,   | Next/Prev diagnostic |
 +| | <C-w>d, <leader> | Show diagnostic popup   |
 +| | gra | if "(fixes available)" then [[https://neovim.io/doc/user/lsp.html#_global-defaults|code actions]] appear at bottom |
 +| | K | hover window (details on selected word) |
 +| | ]q, [q, :ccl  | Next/Prev close QuickFix List   |
 +| | ]l, [l, :lcl  | Next/Prev close Location List  |
 +| | gq<dir>  | Format lines (best with visual mode) uses .clang-format  |
 +| | <C-w>, | Close preview window   |
  
 ===== CLI/UI Navigation (vim / tmux / i3) ===== ===== CLI/UI Navigation (vim / tmux / i3) =====
Line 13: Line 57:
 | i3   | windows          | workspaces | | i3   | windows          | workspaces |
  
-If I'm in i3, I'm usually local to the machine and don't start tmux sessions. So for me it's either vim+tmux+entr, or vim+i3+entr.+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, or i3+vim+entr.
  
 These are the everyday things I have to do in each: These are the everyday things I have to do in each:
Line 24: 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   | Mod+or Enter or g | Every app launches into a new window |+| i3   | Mod+or Enter or g | Every app launches into a new window (find [[https://git.dlma.com/dotfiles.git/raw/HEAD/.config/i3/config|mod+g]]) |
  
 ^  Close Window / Pane / Window  ^^^ ^  Close Window / Pane / Window  ^^^
Line 38: Line 82:
 | vim  | C-w,<>+- | <,> for width; +,- for height | | vim  | C-w,<>+- | <,> for width; +,- for height |
 | tmux | Prefix,HJKL | Change dimension in that direction | | tmux | Prefix,HJKL | Change dimension in that direction |
 +| tmux | Prefix,C-arrow | Change dimension in that direction |
 | i3   | Mod+r,hjkl | Enter resize mode (or drag bar with mouse) | | i3   | Mod+r,hjkl | Enter resize mode (or drag bar with mouse) |
  
 ^  Maximize Window / Pane / Window  ^^^ ^  Maximize Window / Pane / Window  ^^^
 ^ 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://git.dlma.com/dotfiles.git/raw/HEAD/.vimrc|<leader>o]]) |
 | tmux | Prefix,z | toggle maximize | | tmux | Prefix,z | toggle maximize |
-| i3 | Mod,f | maximize window |+| i3 | Mod+f | maximize window |
  
 ^  Navigate Window, Buffer / Pane / Window  ^^^ ^  Navigate Window, Buffer / Pane / 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://git.dlma.com/dotfiles.git/raw/HEAD/.vimrc|<Tab>]]) |
 | tmux | Prefix,hjkl | Select that pane | | tmux | Prefix,hjkl | Select that pane |
-| tmux | Prefix,tab | Next/prev pane, maximized |+| tmux | Prefix,tab | Next/prev pane, maximized (find [[https://git.dlma.com/dotfiles.git/raw/HEAD/.tmux.conf|Tab]]) |
 | i3 | Mod+hjkl | select that window | | i3 | Mod+hjkl | select that window |
  
Line 57: Line 102:
 ^ 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 panes |+| tmux | Prefix,{ or } | Swap panes 
 +| tmux | Prefix,space | Rotate splits |
 | i3   | Mod+HJKL | Move window in that direction | | i3   | Mod+HJKL | Move window in that direction |
  
Line 64: Line 110:
 | 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 |+| i3   | Ctrl+Mod+Shift+o | Move to first available workspace (find [[https://git.dlma.com/dotfiles.git/raw/HEAD/.config/i3/config|$mod+Shift+Ctrl+o]]) |
  
  
Line 109: Line 155:
 | ''[q'', '']q'' | Quickfix window navigation | | ''[q'', '']q'' | Quickfix window navigation |
 | ''c-hjkl'' | quick Window navigation | | ''c-hjkl'' | quick Window navigation |
-| ''\w'' | Vertical split and switch window | 
 | ''\o'' | Open window in new tab (for quick fullscreen) | | ''\o'' | Open window in new tab (for quick fullscreen) |
learn.1702195096.txt.gz · Last modified: 2023/12/09 23:58 by dblume