documenting changes
This commit is contained in:
73
nvim/.config/nvim/README.md
Normal file
73
nvim/.config/nvim/README.md
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
# Neovim Notes
|
||||||
|
|
||||||
|
## Splits
|
||||||
|
|
||||||
|
Horizontal split:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:sp
|
||||||
|
```
|
||||||
|
|
||||||
|
Vertical split:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:vs
|
||||||
|
```
|
||||||
|
|
||||||
|
Open a file in a horizontal split:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:sp path/to/file
|
||||||
|
```
|
||||||
|
|
||||||
|
Open a file in a vertical split:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:vs path/to/file
|
||||||
|
```
|
||||||
|
|
||||||
|
## Window Navigation
|
||||||
|
|
||||||
|
Move between windows with:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
<C-w>h/j/k/l
|
||||||
|
```
|
||||||
|
|
||||||
|
Cycle through windows:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
<C-w>w
|
||||||
|
```
|
||||||
|
|
||||||
|
## Terminal
|
||||||
|
|
||||||
|
Open a terminal in the current window:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:term
|
||||||
|
```
|
||||||
|
|
||||||
|
Open a terminal in a horizontal split:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:sp | term
|
||||||
|
```
|
||||||
|
|
||||||
|
Open a terminal in a vertical split:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:vs | term
|
||||||
|
```
|
||||||
|
|
||||||
|
Leave terminal mode and return to normal mode:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
<C-\><C-n>
|
||||||
|
```
|
||||||
|
|
||||||
|
In this config, `<Esc>` in terminal mode is mapped to the same command:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
<Esc>
|
||||||
|
```
|
||||||
@@ -34,6 +34,6 @@ vim.opt.listchars = {
|
|||||||
|
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
-- only show the invisible characters inside the code editing buffers
|
-- only show the invisible characters inside the code editing buffers
|
||||||
vim.cmd([[autocmd BufWinEnter,TermOpen * if &buftype != '' | setlocal nolist | endif]])
|
vim.cmd([[autocmd BufWinEnter * if &buftype != '' | setlocal nolist | endif]])
|
||||||
|
|
||||||
vim.opt.shell = "bash"
|
vim.opt.shell = "bash"
|
||||||
|
|||||||
Reference in New Issue
Block a user