1
Fork 0
satellite/dotfiles/neovim/README.md

129 lines
4.9 KiB
Markdown
Raw Normal View History

2022-03-09 19:44:21 +01:00
# Neovim config
2022-06-18 23:09:21 +02:00
## Articles
- [Textobjects](https://blog.carbonfive.com/vim-text-objects-the-definitive-guide/)
- [Registers](https://www.brianstorti.com/vim-registers/)
2022-07-19 13:03:03 +02:00
- [Markers](https://vim.fandom.com/wiki/Using_marks)
2022-06-18 23:09:21 +02:00
2022-03-09 19:44:21 +01:00
## Keybinds
2022-04-04 10:55:57 +02:00
Table of my own keybinds. Here as documentation for myself. I am yet to include any of the keybinds for cmp here.
2022-03-09 19:44:21 +01:00
> Things written using italics are chords
2022-04-04 09:01:13 +02:00
> (aka all the keys need to be pressed at the same time)
2022-03-09 19:44:21 +01:00
2022-06-18 23:09:21 +02:00
| Keybind | Description | Plugins |
| ------------ | ----------------------------------- | ------------------ |
2022-07-19 13:03:03 +02:00
| _vs_ | Create vertical split | |
2022-06-18 23:09:21 +02:00
| _cp_ | Use system clipboard | |
| _jl_ | Save | |
| _jk_ | Exit insert mode | |
2022-07-19 20:19:36 +02:00
| _rw_ | Rename word under cursor | |
2022-06-18 23:09:21 +02:00
| _\<leader>k_ | Insert digraph | |
| _\<leader>a_ | Swap last 2 used buffers | |
| C-n | Open tree | nvim-tree |
2022-07-19 13:03:03 +02:00
| _vc_ | Clear vimux window | vimux |
| _vl_ | Rerun last vimux command | vimux |
2022-06-18 23:09:21 +02:00
| _vp_ | Run command in another tmux pane | vimux |
| C-hjkl | Navigation between vim & tmux panes | vim-tmux-navigator |
| J | Show line diagnostics | lspconfig |
| K | Show hover info | lspconfig |
| L | Signature help (?) | lspconfig |
| gD | Go to declaration | lspconfig |
| gd | Go to definition | lspconfig |
| gi | Go to implementation | lspconfig |
| \<leader>rn | Rename | lspconfig |
| \<leader>f | format | lspconfig |
2022-07-27 10:00:25 +02:00
| \<leader>ca | code actions | lspconfig |
2022-04-04 10:55:57 +02:00
### Telescope
2022-04-04 10:58:22 +02:00
| Keybind | Description | Plugins |
| ----------- | ------------------------------ | ---------------------- |
| Ctrl-P | Find files | |
| Ctrl-F | Grep in project | |
| \<leader>d | Diagnostics | lspconfig |
| \<leader>ca | Code actions | lspconfig |
| \<leader>t | Show builtin pickers | |
| \<leader>s | Show symbols using tree-sitter | |
| \<leader>gj | List git commits | |
| \<leader>gk | List git branches | |
2022-04-05 20:17:08 +02:00
| _jp_ | Interactive file broswer | telescope-file-browser |
2022-04-04 10:58:22 +02:00
| _ui_ | Insert unicode char | |
2022-04-04 09:01:13 +02:00
### Idris
> The idris and arpeggio plugins are implicit here
| Keybind | Description |
| ------- | ------------------- |
2022-07-19 20:19:36 +02:00
| _isc_ | Case split |
| _imc_ | Make case |
| _iml_ | Make lemma |
| _ies_ | Expression search |
| _igd_ | Generate definition |
| _irh_ | Refine hole |
| _iac_ | Add clause |
2022-04-04 09:01:13 +02:00
2022-07-19 13:03:03 +02:00
### Purescript
| Keybind | Description |
| ------- | ------------------------------------------- |
| _vb_ | Make tmux run spago build in sepearate pane |
| _vt_ | Make tmux run spago test in separate pane |
2022-07-19 20:19:36 +02:00
### Nix
2022-07-27 10:00:25 +02:00
| Keybind | Description |
| ------- | ------------------------------------ |
2022-07-19 20:19:36 +02:00
| _ug_ | Run nix-fetchgit on the current file |
2022-04-04 09:01:13 +02:00
### Lean
- Extra brackets: ⟨⟩
2022-03-09 19:44:21 +01:00
## Some cool vim keybinds I sometimes forget about
Documentation for myself
2022-09-12 13:50:02 +02:00
| Keybind | Description | Plugins |
| ------- | ----------------------- | ------- |
| zz | Center the current line | |
## Important plugins I use the default mappins of
- paperplanes
| Keybind | Description |
| ------- | ------------------------- |
| :PP | Create pastebin-like link |
- nvim-comment
| Keybind | Description |
| ------- | ----------------- |
| gcc | Comment line |
| gc | Comment selection |
- neogit
| Keybind | Description |
| ------- | ----------- |
| C-g | Open neogit |
- gitlinker
| Keybind | Description |
| ---------- | ------------------ |
| <leader>gy | Create remote link |
- nvim-surround
| Keybind | Description | Mode |
| -------- | ----------------------------------- | ---- |
| cs[a][b] | Change surrounding pair from a to b | n |
| ds[a] | Delete surrounding pair of a | n |
| ys[m][a] | Surround the motion m with a | n |
| S[a] | Surround selected code with a | v |