forked from extern/nix-config
Add a variety of window commands to vim.md
This commit is contained in:
parent
d6b5497b50
commit
5c79e8c6b1
@ -6,7 +6,7 @@ For some vim commands, I use a `<leader>` keybinding as an alternative since I f
|
|||||||
|
|
||||||
## Starting vim
|
## Starting vim
|
||||||
|
|
||||||
- Open a file at a particular line number: `vim +<number> <file>`
|
- Open a file at a specific line number: `vim +<number> <file>`
|
||||||
- Open multiple files in separate tabs: `vim -p <files>`
|
- Open multiple files in separate tabs: `vim -p <files>`
|
||||||
- Open all files that contain the function / variable / string `str` in the current directory: `vim -p "grep -l <str> [files]"`
|
- Open all files that contain the function / variable / string `str` in the current directory: `vim -p "grep -l <str> [files]"`
|
||||||
- Note that `[files]` is optional, allowing you to only search for e.g. `*.js` files
|
- Note that `[files]` is optional, allowing you to only search for e.g. `*.js` files
|
||||||
@ -152,7 +152,11 @@ Note that you can use `<C-o>` at any time while in insert mode to execute a sing
|
|||||||
|
|
||||||
Note that there are a lot of buffer commands, however, I only document the ones I actively use here.
|
Note that there are a lot of buffer commands, however, I only document the ones I actively use here.
|
||||||
|
|
||||||
There are also a lot of window commands; however, I don't need to use most of them.
|
- Switch to the next window: `<C-w>w`
|
||||||
|
- Switch to a specific window: `<C-w><h/j/k/l>`
|
||||||
|
- Move a window up *or* to the left: `<C-w>R`
|
||||||
|
- Move a window down *or* to the right: `<C-w>r`
|
||||||
|
- Move the current window to a specific side: `<C-w><H/J/K/L>`
|
||||||
|
|
||||||
Also note that vim tabs is a thing, although you really shouldn't be using them.
|
Also note that vim tabs is a thing, although you really shouldn't be using them.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user