Skip to content

Zachary-Blundell/Zeovim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todos

  • fix cmp/lsp-zero
    • comfermations / tab / super tab
  • format shortcuts in readme
  • fix live grep in Telescope
  • fix nvim-tree doesnt close when last thing open
  • add color previewer
  • add gitsigns
  • add windwp/nvim-ts-autotag
  • add a formatter like null-ls

Keymaps

leader = space

Sections

  • General
  • Editing
  • Navigation / Display
  • Search and Replace

General

Keymap Description Mode
jk fast to enter normal mode Insert, Visual

Editing

Keymap Description Mode
Alt j move text up Normal, Visual Block
Alt k move text down Normal, Visual Block
Leader x !chmod +x % Normal
J :move '>+1gv-gv Visual Block
K :move '<-2gv-gv Visual Block

CMP

-- [''] = cmp.mapping.confirm({select = true}), -- [''] = cmp.mapping.abort(), -- [''] = cmp.mapping.scroll_docs(-4), -- [''] = cmp.mapping.scroll_docs(4), -- [''] = cmp.mapping.select_prev_item(cmp_select_opts), -- [''] = cmp.mapping.select_next_item(cmp_select_opts), -- [''] = cmp.mapping(function() -- if cmp.visible() then -- cmp.select_prev_item(cmp_select_opts) -- else -- cmp.complete() -- end -- end), -- [''] = cmp.mapping(function() -- if cmp.visible() then -- cmp.select_next_item(cmp_select_opts) -- else -- cmp.complete() -- end -- end), -- }, -- snippet = { -- expand = function(args) -- require('luasnip').lsp_expand(args.body) -- end, -- }, [""] = cmp.mapping.select_prev_item(), [""] = cmp.mapping.select_next_item(), [""] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }), [""] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }), [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), -- [""] = cmp.config.disable, -- Specify cmp.config.disable if you want to remove the default <C-y> mapping. [""] = cmp.mapping { i = cmp.mapping.abort(), c = cmp.mapping.close(), }, -- Accept currently selected item. If none selected, select first item. -- Set select to false to only confirm explicitly selected items. [""] = cmp.mapping.confirm { select = true }, [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() elseif luasnip.expandable() then luasnip.expand() elseif luasnip.expand_or_jumpable() then luasnip.expand_or_jump() elseif check_backspace() then fallback() else fallback() end end, { "i", "s", }),

Comment

Keymap Description Mode
gcc Toggles the current line using linewise comment Normal
gbc Toggles the current line using blockwise comment Normal
[count]gcc Toggles the number of line given as a prefix-count using linewise Normal
[count]gbc Toggles the number of line given as a prefix-count using blockwise Normal
gc[count]{motion} (Op-pending) Toggles the region using linewise comment Normal
gb[count]{motion} (Op-pending) Toggles the region using blockwise comment Normal
gc Toggles the region using linewise comment Visual
gb Toggles the region using blockwise comment Visual
Extra mappings
gco Insert comment to the next line and enters INSERT mode Normal
gcO Insert comment to the previous line and enters INSERT mode Normal
gcA Insert comment to end of the current line and enters INSERT mode Normal

Examples

Linewise

`gcw` - Toggle from the current cursor position to the next word
`gc$` - Toggle from the current cursor position to the end of line
`gc}` - Toggle until the next blank line
`gc5j` - Toggle 5 lines after the current cursor position
`gc8k` - Toggle 8 lines before the current cursor position
`gcip` - Toggle inside of paragraph
`gca}` - Toggle around curly brackets

Blockwise

`gb2}` - Toggle until the 2 next blank line
`gbaf` - Toggle comment around a function (w/ LSP/treesitter support)
`gbac` - Toggle comment around a class (w/ LSP/treesitter support)

Navigation / Display

Remaps

Keymap Description Mode
Better Window Navigation
Leader h move to window on the left Normal
Leader l move to window on the right Normal
Leader j move to window below Normal
Leader k move to window above Normal
Other
Leader e opens tree explorer Normal
Navigate buffers
L move to next buffer Normal
H move to previous buffer Normal
Ctrl j Close current buffer Normal
Resize with arrows
Up arrow increase hight Normal
Down arrow decrease hight Normal
Right arrow increase width Normal
Left arrow decrease width Normal
Ctrl u going half page up Nromal
Ctrl d going half page down Nromal

Telescope

Keymap Description Mode
leader ff Open fuzzy find menu Normal
Ctrl p> Open find git files menu Normal
leader ps Live grep files Normal

Harpoon

Keymap Description Mode
leader a add file to Harpoon Normal
leader fh open quick menu Normal
leader t go to file 1 Normal
leader g go to file 2 Normal
leader b go to file 3 Normal
leader y go to file 4 Normal
leader h go to file 5 Normal
leader n go to file 6 Normal

Search and Replace

find and replace the word cursor is on

map("n", "s", [[:%s/<>//gI]])

--- Insert --- map("i", "", "")

--- Visual ---

Stay in indent mode

map("v", "<", "<gv") map("v", ">", ">gv")

greatest remap ever

map("x", "p", [["_dP]])

Plugins

Packer

  • packer.nvim -- Have packer manage itself
  • popup.nvim -- An implementation of the Popup API from vim in Neovim
  • plenary.nvim -- Useful lua functions used ny lots of plugins

Quality of life

Visuals

Colorschemes

Navigation

Lsp-zero

LSP Support

Autocompletion

Snippets

About

My neovim config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published