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:38] – [CLI Navigation (vim / i3 / tmux)] dblumelearn [2024/04/09 19:32] (current) – Added tmux resize window recipe dblume
Line 3: Line 3:
 Things to learn through repetition. Things to learn through repetition.
  
-===== CLI Navigation (vim / i3 / tmux) =====+===== CLI/UI Navigation (vim / tmux / i3) =====
  
-^  New Pane/Window  ^^^+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          | tabs       | 
 +| tmux | panes            | windows    | 
 +| 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 ssh+tmux+vim+entr, or i3+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 24:
 | 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 Pane/Window  ^^^+^  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 33:
 | i3   | | Close the app its normal way | | i3   | | Close the app its normal way |
  
-^  Resize Pane/Window  ^^^+^  Resize Window / Pane / Window  ^^^
 ^ Context ^ Key ^ Action ^ ^ Context ^ Key ^ Action ^
 | vim  | C-w,= | Make windows equal size | | vim  | C-w,= | Make windows equal size |
-| vim  | C-w,< or > | Change width +| vim  | C-w,<>+- <,> for width; +,- for height |
-| vim  | C-w,+ or | Change 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 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 |
  
-^  Switch Pane/Buffer/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 (find [[https://git.dlma.com/dotfiles.git/raw/HEAD/.tmux.conf|Tab]]) |
 | i3 | Mod+hjkl | select that window | | i3 | Mod+hjkl | select that window |
  
-^  Swap Pane/Window  ^^^+^  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 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 |
  
-^  New Tab/Workspace  ^^^+^  New Tab / Window / Workspace  ^^^
 ^ 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 |+| 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]]) |
  
  
-^  Navigate Tab/Workspace  ^^^+^  Navigate Tab / Window / Workspace  ^^^
 ^ Context ^ Key ^ Action ^ ^ Context ^ Key ^ Action ^
 | vim  | gt or gT | Navigate prev or next tab | | vim  | gt or gT | Navigate prev or next tab |
Line 97: Line 111:
 | ''[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.1702193929.txt.gz · Last modified: 2023/12/09 23:38 by dblume