feat: add mini.ai
This commit is contained in:
parent
6476de3f61
commit
600306f9be
4 changed files with 67 additions and 77 deletions
|
|
@ -1,14 +1,15 @@
|
||||||
# Neovim cheat sheet
|
# Neovim cheat sheet
|
||||||
|
|
||||||
|
Heavily customized. Related blog post: https://lugh.ch/neovim-lessons-learned.html
|
||||||
|
|
||||||
## BASICS
|
## BASICS
|
||||||
|
|
||||||
- `:checkhealth [<pluginname>]` check base or plugin status
|
- `:checkhealth [<pluginname>]` check base or plugin status
|
||||||
- `:checkhealth vim.lsp` show details of LSP attached to buffer
|
- `:checkhealth vim.lsp` show details of LSP attached to buffer
|
||||||
- `:verbose set expandtab?` check where `expandtab` has been set last
|
- `:verbose set expandtab?` check where `expandtab` has been set last
|
||||||
- `:Lazy` show package manager UI
|
- `:Lazy` show package manager TUI
|
||||||
- `:Mason` show Mason UI
|
- `:Mason` show LSP management TUI
|
||||||
- `:TSUpdate` update all Tree-sitter parsers
|
- `:TSUpdate` update all Tree-sitter parsers
|
||||||
- `:LspInfo` show attached LSP client details
|
|
||||||
- `:ConformInfo` useful to debug why a formatter times out
|
- `:ConformInfo` useful to debug why a formatter times out
|
||||||
|
|
||||||
## NAVIGATING
|
## NAVIGATING
|
||||||
|
|
@ -27,19 +28,19 @@
|
||||||
## Buffers
|
## Buffers
|
||||||
|
|
||||||
- `leader`+`leader` lists open buffers in `snipe.nvim`
|
- `leader`+`leader` lists open buffers in `snipe.nvim`
|
||||||
- In snipe.nvim popup: Hit `d` to close the selected buffer
|
- In snipe.nvim popup: Hit `D` to close the selected buffer
|
||||||
- `:bd` close current buffer
|
- `:bd` close current buffer
|
||||||
|
|
||||||
## Text
|
## Text
|
||||||
|
|
||||||
- `w/e` move to **start/end of next word** (ignores punctuation due to remap)
|
- `w/e` move to **start/end of next word**
|
||||||
- `b` move to **start of previous word** (ignores punctuation due to remap)
|
- `b` move to **start of previous word**
|
||||||
- `Ctrl`+`0` start of line
|
- `Ctrl`+`0` start of line
|
||||||
- `Ctrl`+`$` end of line
|
- `Ctrl`+`$` end of line
|
||||||
- `Ctrl`+`d/u` scroll down/up 1/2 page while keeping the cursor centered
|
- `Ctrl`+`d/u` scroll down/up 1/2 page while keeping the cursor centered
|
||||||
- `Ctrl`+`o` jump to location you were before (e.g. after using `gg`)
|
- `Ctrl`+`o` jump to location you were before (e.g. after using `gg`)
|
||||||
- `Ctrl`+`i` jump back to location you were before (after using `Ctrl`+`o`)
|
- `Ctrl`+`i` jump back to location you were before (after using `Ctrl`+`o`)
|
||||||
- `s<chars>` highlight jump targets via `flash.nvim`
|
- `s<chars>` highlight jump targets w/ `flash.nvim`
|
||||||
|
|
||||||
## LSP, Code & Diagnostics
|
## LSP, Code & Diagnostics
|
||||||
|
|
||||||
|
|
@ -92,6 +93,8 @@
|
||||||
- `:windo diffthis` open `vimdiff` for open splits
|
- `:windo diffthis` open `vimdiff` for open splits
|
||||||
- `:vert diffsplit <other/file>` diff this file and `<other/file>`
|
- `:vert diffsplit <other/file>` diff this file and `<other/file>`
|
||||||
- `:windo diffoff` to close diff view
|
- `:windo diffoff` to close diff view
|
||||||
|
- `ciq` change inside quotes w/ `mini.ai`
|
||||||
|
- `caq` change around quotes w/ `mini.ai`
|
||||||
|
|
||||||
## SELECTING
|
## SELECTING
|
||||||
|
|
||||||
|
|
|
||||||
BIN
CHEATSHEET.pdf
BIN
CHEATSHEET.pdf
Binary file not shown.
|
|
@ -51,7 +51,7 @@ return {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
-- { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||||
|
|
|
||||||
|
|
@ -4,22 +4,9 @@ return {
|
||||||
version = false,
|
version = false,
|
||||||
config = function()
|
config = function()
|
||||||
require("mini.icons").setup()
|
require("mini.icons").setup()
|
||||||
require("mini.ai").setup({ n_lines = 500 })
|
-- require("mini.ai").setup({ n_lines = 500 })
|
||||||
require("mini.trailspace").setup()
|
require("mini.trailspace").setup()
|
||||||
require("mini.cursorword").setup()
|
require("mini.cursorword").setup()
|
||||||
require("mini.surround").setup({
|
require("mini.ai").setup()
|
||||||
mappings = {
|
|
||||||
-- add = "wq", -- Add surrounding in Normal and Visual modes
|
|
||||||
-- delete = "wd", -- Delete surrounding
|
|
||||||
-- -- find = "sf", -- Find surrounding (to the right)
|
|
||||||
-- -- find_left = "sF", -- Find surrounding (to the left)
|
|
||||||
-- highlight = "hs", -- Highlight surrounding
|
|
||||||
-- replace = "wc", -- Replace surrounding
|
|
||||||
-- -- update_n_lines = "sn", -- Update `n_lines`
|
|
||||||
--
|
|
||||||
-- -- suffix_last = "l", -- Suffix to search with "prev" method
|
|
||||||
-- -- suffix_next = "n", -- Suffix to search with "next" method
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue