A clean, organized pre-configured Neovim configuration guide in a single ‘init.lua’
- Install and initialize:
lazyman -x SingleFile - Configuration category: Starter
- Base configuration: Custom
- Plugin manager: Packer
- Installation location:
~/.config/nvim-SingleFile
Git repository
https://github.com/creativenull/nvim-oneconfig
Packer managed plugins
SingleFile Keymaps
Normal mode keymaps
| Description | Toggle file tree (neo-tree) |
|---|
| Left hand side | ff |
| Right hand side | <Cmd>Neotree reveal toggle right<CR> |
| Description | Paste from system clipboard |
|---|
| Left hand side | p |
| Right hand side | "+p |
| Description | Yank from system clipboard |
|---|
| Left hand side | y |
| Right hand side | "+y |
| Description | Reload current buffer with the file |
|---|
| Left hand side | r |
| Right hand side | <Cmd>edit!<CR> |
| Description | Reload init.lua |
|---|
| Left hand side | vs |
| Right hand side | <Cmd>ConfigReload<CR> |
| Description | Open init.lua |
|---|
| Left hand side | ve |
| Right hand side | <Cmd>edit $MYVIMRC<CR> |
| Description | Close all buffers except current |
|---|
| Left hand side | bx |
| Right hand side | <Cmd>%bd|e#|bd#<CR> |
| Description | Close current buffer |
|---|
| Left hand side | bd |
| Right hand side | <Cmd>bp|sp|bn|bd<CR> |
| Description | Previous buffer |
|---|
| Left hand side | bp |
| Right hand side | <Cmd>bprevious<CR> |
| Description | Next buffer |
|---|
| Left hand side | bn |
| Right hand side | <Cmd>bnext<CR> |
| Description | Show buffers |
|---|
| Left hand side | bl |
| Right hand side | <Cmd>buffers<CR> |
| Description | Disable search highlight |
|---|
| Left hand side | <CR> |
| Right hand side | <Cmd>noh<CR> |
| Description | |
|---|
| Left hand side | % |
| Right hand side | <Plug>(MatchitNormalForward) |
| Description | Nvim builtin |
|---|
| Left hand side | & |
| Right hand side | :&&<CR> |
| Description | Nvim builtin |
|---|
| Left hand side | Y |
| Right hand side | y$ |
| Description | |
|---|
| Left hand side | [% |
| Right hand side | <Plug>(MatchitNormalMultiBackward) |
| Description | |
|---|
| Left hand side | ]% |
| Right hand side | <Plug>(MatchitNormalMultiForward) |
| Description | Change a surrounding pair. |
|---|
| Left hand side | cs |
| Right hand side | |
| Description | Delete a surrounding pair. |
|---|
| Left hand side | ds |
| Right hand side | |
| Description | Comment insert end of line |
|---|
| Left hand side | gcA |
| Right hand side | |
| Description | Comment insert above |
|---|
| Left hand side | gcO |
| Right hand side | |
| Description | Comment insert below |
|---|
| Left hand side | gco |
| Right hand side | |
| Description | Comment toggle current block |
|---|
| Left hand side | gbc |
| Right hand side | |
| Description | Comment toggle current line |
|---|
| Left hand side | gcc |
| Right hand side | |
| Description | Comment toggle blockwise |
|---|
| Left hand side | gb |
| Right hand side | <Plug>(comment_toggle_blockwise) |
| Description | Comment toggle linewise |
|---|
| Left hand side | gc |
| Right hand side | <Plug>(comment_toggle_linewise) |
| Description | |
|---|
| Left hand side | gx |
| Right hand side | <Plug>NetrwBrowseX |
| Description | |
|---|
| Left hand side | g% |
| Right hand side | <Plug>(MatchitNormalBackward) |
| Description | Add a surrounding pair around the current line, on new lines (normal mode). |
|---|
| Left hand side | ySS |
| Right hand side | |
| Description | Add a surrounding pair around a motion, on new lines (normal mode). |
|---|
| Left hand side | yS |
| Right hand side | |
| Description | Add a surrounding pair around the current line (normal mode). |
|---|
| Left hand side | yss |
| Right hand side | |
| Description | Add a surrounding pair around a motion (normal mode). |
|---|
| Left hand side | ys |
| Right hand side | |
| Description | |
|---|
| Left hand side | <Plug>(vsnip-cut-text) |
| Right hand side | :set operatorfunc=<SNR>42_vsnip_cut_text_normal<CR>g@ |
| Description | |
|---|
| Left hand side | <Plug>(vsnip-select-text) |
| Right hand side | :set operatorfunc=<SNR>42_vsnip_select_text_normal<CR>g@ |
| Description | |
|---|
| Left hand side | <Plug>PlenaryTestFile |
| Right hand side | :lua require('plenary.test_harness').test_directory(vim.fn.expand("%:p"))<CR> |
| Description | |
|---|
| Left hand side | <C-Q>m |
| Right hand side | <Plug>(emmet-merge-lines) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-merge-lines) |
| Right hand side | :call emmet#mergeLines()<CR> |
| Description | |
|---|
| Left hand side | <C-Q>A |
| Right hand side | <Plug>(emmet-anchorize-summary) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-anchorize-summary) |
| Right hand side | :call emmet#anchorizeURL(1)<CR> |
| Description | |
|---|
| Left hand side | <C-Q>a |
| Right hand side | <Plug>(emmet-anchorize-url) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-anchorize-url) |
| Right hand side | :call emmet#anchorizeURL(0)<CR> |
| Description | |
|---|
| Left hand side | <C-Q>k |
| Right hand side | <Plug>(emmet-remove-tag) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-remove-tag) |
| Right hand side | :call emmet#removeTag()<CR> |
| Description | |
|---|
| Left hand side | <C-Q>j |
| Right hand side | <Plug>(emmet-split-join-tag) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-split-join-tag) |
| Right hand side | :call emmet#splitJoinTag()<CR> |
| Description | |
|---|
| Left hand side | <C-Q>/ |
| Right hand side | <Plug>(emmet-toggle-comment) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-toggle-comment) |
| Right hand side | :call emmet#toggleComment()<CR> |
| Description | |
|---|
| Left hand side | <C-Q>I |
| Right hand side | <Plug>(emmet-image-encode) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-image-encode) |
| Right hand side | :call emmet#imageEncode()<CR> |
| Description | |
|---|
| Left hand side | <C-Q>i |
| Right hand side | <Plug>(emmet-image-size) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-image-size) |
| Right hand side | :call emmet#imageSize()<CR> |
| Description | |
|---|
| Left hand side | <Plug>(emmet-move-prev-item) |
| Right hand side | :call emmet#moveNextPrevItem(1)<CR> |
| Description | |
|---|
| Left hand side | <Plug>(emmet-move-next-item) |
| Right hand side | :call emmet#moveNextPrevItem(0)<CR> |
| Description | |
|---|
| Left hand side | <C-Q>N |
| Right hand side | <Plug>(emmet-move-prev) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-move-prev) |
| Right hand side | :call emmet#moveNextPrev(1)<CR> |
| Description | |
|---|
| Left hand side | <C-Q>n |
| Right hand side | <Plug>(emmet-move-next) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-move-next) |
| Right hand side | :call emmet#moveNextPrev(0)<CR> |
| Description | |
|---|
| Left hand side | <C-Q>D |
| Right hand side | <Plug>(emmet-balance-tag-outword) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-balance-tag-outword) |
| Right hand side | :call emmet#balanceTag(-1)<CR> |
| Description | |
|---|
| Left hand side | <C-Q>d |
| Right hand side | <Plug>(emmet-balance-tag-inward) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-balance-tag-inward) |
| Right hand side | :call emmet#balanceTag(1)<CR> |
| Description | |
|---|
| Left hand side | <C-Q>u |
| Right hand side | <Plug>(emmet-update-tag) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-update-tag) |
| Right hand side | :call emmet#updateTag()<CR> |
| Description | |
|---|
| Left hand side | <C-Q>; |
| Right hand side | <Plug>(emmet-expand-word) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-expand-word) |
| Right hand side | :call emmet#expandAbbr(1,"")<CR> |
| Description | |
|---|
| Left hand side | <C-Q>, |
| Right hand side | <Plug>(emmet-expand-abbr) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-expand-abbr) |
| Right hand side | :call emmet#expandAbbr(3,"")<CR> |
| Description | Comment toggle blockwise with count |
|---|
| Left hand side | <Plug>(comment_toggle_blockwise_count) |
| Right hand side | |
| Description | Comment toggle linewise with count |
|---|
| Left hand side | <Plug>(comment_toggle_linewise_count) |
| Right hand side | |
| Description | Comment toggle current block |
|---|
| Left hand side | <Plug>(comment_toggle_blockwise_current) |
| Right hand side | |
| Description | Comment toggle current line |
|---|
| Left hand side | <Plug>(comment_toggle_linewise_current) |
| Right hand side | |
| Description | Comment toggle blockwise |
|---|
| Left hand side | <Plug>(comment_toggle_blockwise) |
| Right hand side | |
| Description | Comment toggle linewise |
|---|
| Left hand side | <Plug>(comment_toggle_linewise) |
| Right hand side | |
| Description | Open text search (telescope) |
|---|
| Left hand side | <C-T> |
| Right hand side | |
| Description | Open file finder (telescope) |
|---|
| Left hand side | <C-P> |
| Right hand side | |
| Description | |
|---|
| Left hand side | <Plug>NetrwBrowseX |
| Right hand side | :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<CR> |
| Description | |
|---|
| Left hand side | <Plug>(MatchitNormalMultiForward) |
| Right hand side | :<C-U>call matchit#MultiMatch("W", "n")<CR> |
| Description | |
|---|
| Left hand side | <Plug>(MatchitNormalMultiBackward) |
| Right hand side | :<C-U>call matchit#MultiMatch("bW", "n")<CR> |
| Description | |
|---|
| Left hand side | <Plug>(MatchitNormalBackward) |
| Right hand side | :<C-U>call matchit#Match_wrapper('',0,'n')<CR> |
| Description | |
|---|
| Left hand side | <Plug>(MatchitNormalForward) |
| Right hand side | :<C-U>call matchit#Match_wrapper('',1,'n')<CR> |
| Description | Previous buffer |
|---|
| Left hand side | <C-H> |
| Right hand side | <Cmd>bprevious<CR> |
| Description | |
|---|
| Left hand side | <Right> |
| Right hand side | <Cmd>vertical resize +2<CR> |
| Description | |
|---|
| Left hand side | <Left> |
| Right hand side | <Cmd>vertical resize -2<CR> |
| Description | |
|---|
| Left hand side | <Down> |
| Right hand side | <Cmd>resize -2<CR> |
| Description | |
|---|
| Left hand side | <Up> |
| Right hand side | <Cmd>resize +2<CR> |
| Description | Next buffer |
|---|
| Left hand side | <C-L> |
| Right hand side | <Cmd>bnext<CR> |
Visual mode keymaps
| Description | Yank from system clipboard |
|---|
| Left hand side | y |
| Right hand side | "+y |
| Description | Nvim builtin |
|---|
| Left hand side | # |
| Right hand side | y?\V<C-R>"<CR> |
| Description | |
|---|
| Left hand side | % |
| Right hand side | <Plug>(MatchitVisualForward) |
| Description | Nvim builtin |
|---|
| Left hand side | * |
| Right hand side | y/\V<C-R>"<CR> |
| Description | Add a surrounding pair around a visual selection. |
|---|
| Left hand side | S |
| Right hand side | <Esc><Cmd>lua require'nvim-surround'.visual_surround()<CR> |
| Description | |
|---|
| Left hand side | [% |
| Right hand side | <Plug>(MatchitVisualMultiBackward) |
| Description | |
|---|
| Left hand side | ]% |
| Right hand side | <Plug>(MatchitVisualMultiForward) |
| Description | |
|---|
| Left hand side | a% |
| Right hand side | <Plug>(MatchitVisualTextObject) |
| Description | Comment toggle blockwise (visual) |
|---|
| Left hand side | gb |
| Right hand side | <Plug>(comment_toggle_blockwise_visual) |
| Description | Comment toggle linewise (visual) |
|---|
| Left hand side | gc |
| Right hand side | <Plug>(comment_toggle_linewise_visual) |
| Description | Add a surrounding pair around a visual selection, on new lines. |
|---|
| Left hand side | gS |
| Right hand side | <Esc><Cmd>lua require'nvim-surround'.visual_surround(true)<CR> |
| Description | |
|---|
| Left hand side | gx |
| Right hand side | <Plug>NetrwBrowseXVis |
| Description | |
|---|
| Left hand side | g% |
| Right hand side | <Plug>(MatchitVisualBackward) |
| Description | Paste from yanked contents only |
|---|
| Left hand side | p |
| Right hand side | "_dP |
| Description | |
|---|
| Left hand side | <Plug>(vsnip-cut-text) |
| Right hand side | :<C-U>call <SNR>42_vsnip_visual_text(visualmode())<CR>gv"_c |
| Description | |
|---|
| Left hand side | <Plug>(vsnip-select-text) |
| Right hand side | :<C-U>call <SNR>42_vsnip_visual_text(visualmode())<CR>gv |
| Description | |
|---|
| Left hand side | <C-Q>c |
| Right hand side | <Plug>(emmet-code-pretty) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-code-pretty) |
| Right hand side | :call emmet#codePretty()<CR> |
| Description | |
|---|
| Left hand side | <C-Q>D |
| Right hand side | <Plug>(emmet-balance-tag-outword) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-balance-tag-outword) |
| Right hand side | <Esc>:call emmet#balanceTag(-1)<CR> |
| Description | |
|---|
| Left hand side | <C-Q>d |
| Right hand side | <Plug>(emmet-balance-tag-inward) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-balance-tag-inward) |
| Right hand side | <Esc>:call emmet#balanceTag(1)<CR> |
| Description | |
|---|
| Left hand side | <C-Q>, |
| Right hand side | <Plug>(emmet-expand-abbr) |
| Description | |
|---|
| Left hand side | <Plug>(emmet-expand-abbr) |
| Right hand side | :call emmet#expandAbbr(2,"")<CR> |
| Description | Comment toggle blockwise (visual) |
|---|
| Left hand side | <Plug>(comment_toggle_blockwise_visual) |
| Right hand side | <Esc><Cmd>lua require("Comment.api").locked("toggle.blockwise")(vim.fn.visualmode())<CR> |
| Description | Comment toggle linewise (visual) |
|---|
| Left hand side | <Plug>(comment_toggle_linewise_visual) |
| Right hand side | <Esc><Cmd>lua require("Comment.api").locked("toggle.linewise")(vim.fn.visualmode())<CR> |
| Description | |
|---|
| Left hand side | <Plug>NetrwBrowseXVis |
| Right hand side | :<C-U>call netrw#BrowseXVis()<CR> |
| Description | |
|---|
| Left hand side | <Plug>(MatchitVisualTextObject) |
| Right hand side | <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward) |
| Description | |
|---|
| Left hand side | <Plug>(MatchitVisualMultiForward) |
| Right hand side | :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv`` |
| Description | |
|---|
| Left hand side | <Plug>(MatchitVisualMultiBackward) |
| Right hand side | :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv`` |
| Description | |
|---|
| Left hand side | <Plug>(MatchitVisualBackward) |
| Right hand side | :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv`` |
| Description | |
|---|
| Left hand side | <Plug>(MatchitVisualForward) |
| Right hand side | :<C-U>call matchit#Match_wrapper('',1,'v')<CR>:if col("''") != col("$") | exe ":normal! m'" | endif<CR>gv`` |
| Description | |
|---|
| Left hand side | <Right> |
| Right hand side | |
| Description | |
|---|
| Left hand side | <Left> |
| Right hand side | |
| Description | |
|---|
| Left hand side | <Down> |
| Right hand side | |
| Description | |
|---|
| Left hand side | <Up> |
| Right hand side | |
Operator mode keymaps
| Description | |
|---|
| Left hand side | % |
| Right hand side | <Plug>(MatchitOperationForward) |
| Description | |
|---|
| Left hand side | [% |
| Right hand side | <Plug>(MatchitOperationMultiBackward) |
| Description | |
|---|
| Left hand side | ]% |
| Right hand side | <Plug>(MatchitOperationMultiForward) |
| Description | |
|---|
| Left hand side | g% |
| Right hand side | <Plug>(MatchitOperationBackward) |
| Description | |
|---|
| Left hand side | <Plug>(MatchitOperationMultiForward) |
| Right hand side | :<C-U>call matchit#MultiMatch("W", "o")<CR> |
| Description | |
|---|
| Left hand side | <Plug>(MatchitOperationMultiBackward) |
| Right hand side | :<C-U>call matchit#MultiMatch("bW", "o")<CR> |
| Description | |
|---|
| Left hand side | <Plug>(MatchitOperationBackward) |
| Right hand side | :<C-U>call matchit#Match_wrapper('',0,'o')<CR> |
| Description | |
|---|
| Left hand side | <Plug>(MatchitOperationForward) |
| Right hand side | :<C-U>call matchit#Match_wrapper('',1,'o')<CR> |
| Description | |
|---|
| Left hand side | <Right> |
| Right hand side | |
| Description | |
|---|
| Left hand side | <Left> |
| Right hand side | |
| Description | |
|---|
| Left hand side | <Down> |
| Right hand side | |
| Description | |
|---|
| Left hand side | <Up> |
| Right hand side | |