Post

Charles Neovim Configuration Information

Well structured lazy config with several setup scripts and a Wiki

  • Install and initialize: lazyman -w Charles
  • Configuration category: Personal
  • Base configuration: Custom
  • Plugin manager: Lazy
  • Installation location: ~/.config/nvim-Charles

Git repository

https://github.com/CharlesChiuGit/nvimdots.lua

Lazy managed plugins

Charles Keymaps

Normal mode keymaps

Descriptionbuffer: Switch to next
Left hand side<Tab>
Right hand side:BufferLineCycleNext<CR>
Descriptionedit: Clear search highlight
Left hand side<Esc>
Right hand side:noh<CR>
Descriptionedit: Split code block
Left hand side s
Right hand side:<C-U>TSJSplit<CR>
Descriptionedit: Join code block
Left hand side j
Right hand side:<C-U>TSJJoin<CR>
DescriptionNvim builtin
Left hand side&
Right hand side:&&<CR>
Descriptionedit: Increment
Left hand side+
Right hand side<C-A>
Descriptionbuffer: Sort by direrctory
Left hand side,bd
Right hand side:BufferLineSortByDirectory<CR>
Descriptionbuffer: Sort by extension
Left hand side,be
Right hand side:BufferLineSortByExtension<CR>
Descriptionfind: Word in project
Left hand side,fw
Right hand side 
Descriptionlsp: Show loclist
Left hand side,tl
Right hand side:TroubleToggle loclist<CR>
Descriptionlsp: Show quickfix list
Left hand side,tq
Right hand side:TroubleToggle quickfix<CR>
Descriptiondebug: Open REPL
Left hand side,do
Right hand side 
Descriptionui: Change colorscheme for current session
Left hand side,fc
Right hand side:<C-U>Telescope colorscheme<CR>
Descriptionfind: File in project
Left hand side,ff
Right hand side:<C-U>Telescope find_files<CR>
Descriptionfind: File by history
Left hand side,fe
Right hand side:<C-U>Telescope oldfiles<CR>
Descriptionfind: File by frecency
Left hand side,fr
Right hand side 
Descriptionfind: Project
Left hand side,fp
Right hand side 
Descriptionedit: Show undo history
Left hand side,u
Right hand side 
Descriptionlsp: Show workspace diagnostics
Left hand side,tw
Right hand side:TroubleToggle workspace_diagnostics<CR>
Descriptionlsp: Show document diagnostics
Left hand side,td
Right hand side:TroubleToggle document_diagnostics<CR>
Descriptionlsp: Show lsp references
Left hand side,tr
Right hand side:TroubleToggle lsp_references<CR>
Descriptionlsp: Toggle trouble list
Left hand side,tt
Right hand side:TroubleToggle<CR>
Descriptiongit: Toggle lazygit
Left hand side,lg
Right hand side 
Descriptiondebug: Run last
Left hand side,dl
Right hand side 
Descriptiondebug: Run to cursor
Left hand side,dc
Right hand side 
Descriptiondebug: Set breakpoint with condition
Left hand side,db
Right hand side 
Descriptionfind: Session
Left hand side,fd
Right hand side:<C-U>Telescope persisted<CR>
Descriptionfind: Current word
Left hand side,fs
Right hand side:<C-U>Telescope grep_string<CR>
Descriptionfind: Buffer opened
Left hand side,fb
Right hand side:<C-U>Telescope buffers<CR>
Descriptiontool: Run code by file
Left hand side,R
Right hand side:<C-U>%SnipRun<CR>
Descriptionfind: file in git project
Left hand side,fg
Right hand side:<C-U>Telescope git_files<CR>
Descriptionbuffer: New
Left hand side,fn
Right hand side:<C-U>:enew<CR>
Descriptionfiletree: Refresh
Left hand side,nr
Right hand side:NvimTreeRefresh<CR>
Descriptionfiletree: Find file
Left hand side,nf
Right hand side:NvimTreeFindFile<CR>
Descriptiongit: Open git-fugitive
Left hand side,G
Right hand side:<C-U>Git<CR>
Description 
Left hand side,-
Right hand side 
Description 
Left hand side,=
Right hand side 
Descriptiongit: Show diff
Left hand side,dv
Right hand side:DiffviewOpen<CR>
Descriptionedit: Add comment box around multi lines of texts
Left hand side,cF
Right hand side 
Descriptiongit: Close diff
Left hand side,,dv
Right hand side:DiffviewClose<CR>
Descriptionedit: Add comment box around the texts
Left hand side,cf
Right hand side 
Descriptionsession: Delete
Left hand side,sd
Right hand side:<C-U>SessionDelete<CR>
Descriptionsession: Load current
Left hand side,sl
Right hand side:<C-U>SessionLoad<CR>
Descriptionsession: Save
Left hand side,ss
Right hand side:<C-U>SessionSave<CR>
Descriptionedit: Search-repacle multi buffers CFile
Left hand side,rbf
Right hand side:<C-U>SearchReplaceMultiBufferCFile<CR>
Descriptionedit: Search-repacle multi buffers CExpr
Left hand side,rbe
Right hand side:<C-U>SearchReplaceMultiBufferCExpr<CR>
Descriptionedit: Search-repacle multi buffers CWORD
Left hand side,rbW
Right hand side:<C-U>SearchReplaceMultiBufferCWORD<CR>
Descriptionedit: Search-repacle multi buffers CWord
Left hand side,rbw
Right hand side:<C-U>SearchReplaceMultiBufferCWord<CR>
Descriptionedit: Search-repacle in multi buffers
Left hand side,rbo
Right hand side:<C-U>SearchReplaceMultiBufferOpen<CR>
Descriptionedit: Show search-repacle menu for multi buffer
Left hand side,rbs
Right hand side:<C-U>SearchReplaceMultiBufferSelections<CR>
Descriptionedit: Search-repacle current buffer CFile
Left hand side,rf
Right hand side:<C-U>SearchReplaceSingleBufferCFile<CR>
Descriptionedit: Search-repacle current buffer CExpr
Left hand side,re
Right hand side:<C-U>SearchReplaceSingleBufferCExpr<CR>
Descriptionedit: Search-repacle current buffer CWORD
Left hand side,rW
Right hand side:<C-U>SearchReplaceSingleBufferCWORD<CR>
Descriptionedit: Search-repacle current buffer CWord
Left hand side,rw
Right hand side:<C-U>SearchReplaceSingleBufferCWord<CR>
Descriptionedit: Search-repacle in current buffer
Left hand side,ro
Right hand side:<C-U>SearchReplaceSingleBufferOpen<CR>
Descriptionedit: Show search-repacle menu in current buffer
Left hand side,rs
Right hand side:<C-U>SearchReplaceSingleBufferSelections<CR>
Descriptionpackage: Profile
Left hand side,pp
Right hand side:Lazy profile<CR>
Descriptionpackage: Sync
Left hand side,ps
Right hand side:Lazy sync<CR>
Descriptionpackage: Debug
Left hand side,pd
Right hand side:Lazy debug<CR>
Descriptionpackage: Show
Left hand side,ph
Right hand side:Lazy<CR>
Descriptionpackage: Check
Left hand side,pc
Right hand side:Lazy check<CR>
Descriptionpackage: Log
Left hand side,pl
Right hand side:Lazy log<CR>
Descriptionpackage: Clean
Left hand side,px
Right hand side:Lazy clean<CR>
Descriptionpackage: Install
Left hand side,pi
Right hand side:Lazy install<CR>
Descriptionpackage: Restore
Left hand side,pr
Right hand side:Lazy restore<CR>
Descriptionpackage: Update
Left hand side,pu
Right hand side:Lazy update<CR>
Descriptionedit: Start replacment mode of current word
Left hand side,,s
Right hand side<Cmd>%s/\<lt><C-R><C-W>\>/<C-R><C-W>/gI<Left><Left><Left>
Descriptionfiletree: Open Oil
Left hand side,o
Right hand side 
Descriptionfile: chmod +x current file
Left hand side,,x
Right hand side<Cmd>!chmod +x %<CR>
Descriptionedit: Decrement
Left hand side-
Right hand side<C-X>
Descriptionbuffer: Move current to prev
Left hand side<lt>tab-S-k>
Right hand side:BufferLineMovePrev<CR>
Descriptionbuffer: Move current to next
Left hand side<lt>tab-S-j>
Right hand side:BufferLineMoveNext<CR>
Descriptionedit: Delete text to EOL
Left hand sideD
Right hand sided$
Descriptionleapn: Jump backward to character
Left hand sideF
Right hand side 
Descriptionjump: Jump to specified node
Left hand sideJ
Right hand side 
Descriptionedit: Prev search result
Left hand sideN
Right hand sideNzzzv
Descriptionleapn: Jump backward till character
Left hand sideT
Right hand side 
Descriptionedit: Yank text to EOL
Left hand sideY
Right hand sidey$
Descriptionedit: Change a surrounding pair
Left hand sidecs
Right hand side 
Descriptionedit: Delete a surrounding pair
Left hand sideds
Right hand side 
Descriptionleapn: Jump to character
Left hand sidef
Right hand side 
Descriptiongit: Pull
Left hand sidegpl
Right hand side:G pull<CR>
Descriptiongit: Push
Left hand sidegps
Right hand side:G push<CR>
Descriptionedit: Toggle comment for block with operator
Left hand sidegb
Right hand side<Plug>(comment_toggle_blockwise)
Descriptionedit: Align with delimiter
Left hand sidegea
Right hand side:EasyAlign<CR>
Descriptionedit: Toggle comment for line with operator
Left hand sidegc
Right hand side<Plug>(comment_toggle_linewise)
Descriptionedit: Toggle comment for block
Left hand sidegbc
Right hand side 
Descriptionedit: Toggle comment for line
Left hand sidegcc
Right hand side 
Descriptionleapn: Jump to character across windows
Left hand sidegt
Right hand side 
Descriptionjump: Jump to functions
Left hand sidejif
Right hand side 
Descriptionjump: Jump to functions
Left hand sidejfu
Right hand side 
Descriptionjump: Jump to visible variable_declarations
Left hand sidejv
Right hand side 
Description 
Left hand sidej
Right hand side 
Description 
Left hand sidek
Right hand side 
DescriptionJumpx: Jump across syntax tree
Left hand sidem
Right hand side 
Descriptionedit: Next search result
Left hand siden
Right hand sidenzzzv
Descriptionedit: Split or Join code block with autodetect
Left hand sidesj
Right hand side:<C-U>TSJToggle<CR>
Descriptionleapn: Jump till character
Left hand sidet
Right hand side 
Descriptiontab: Only keep current tab
Left hand sideto
Right hand side<Cmd>tabonly<CR>
Descriptiontab: Move to previous tab
Left hand sidetj
Right hand side<Cmd>tabprevious<CR>
Descriptiontab: Move to next tab
Left hand sidetk
Right hand side<Cmd>tabnext<CR>
Descriptiontab: Create a new tab
Left hand sidetn
Right hand side<Cmd>tabnew<CR>
Descriptionedit: Visual select current node
Left hand sidevn
Right hand side:<C-U>STSSelectCurrentNode<CR>
Descriptionedit: Visual select master node
Left hand sidevx
Right hand side:<C-U>STSSelectMasterNode<CR>
Descriptionedit: Add a surrounding pair around the current line, on new lines
Left hand sideySS
Right hand side 
Descriptionedit: Add a surrounding pair around a motion, on new lines
Left hand sideyS
Right hand side 
Descriptionedit: Add a surrounding pair around current line
Left hand sideyss
Right hand side 
Descriptionedit: Add a surrounding pair around a motion
Left hand sideys
Right hand side 
Descriptiontmux: Resize tmux/nvim pane rightward
Left hand side<M-l>
Right hand side 
Descriptionterminal: Toggle float
Left hand side<M-d>
Right hand side:execute v:count . "ToggleTerm direction=float"<CR>
Descriptionterminal: Toggle vertical
Left hand side<F5>
Right hand side:execute v:count . "ToggleTerm direction=vertical"<CR>
Descriptionterminal: Toggle vertical
Left hand side<M-Bslash>
Right hand side:execute v:count . "ToggleTerm direction=vertical"<CR>
Descriptiondebug: Step over
Left hand side<F11>
Right hand side 
Descriptionterminal: Toggle horizontal
Left hand side<C-Bslash>
Right hand side:execute v:count . "ToggleTerm direction=horizontal"<CR>
Descriptiondebug: Step out
Left hand side<F10>
Right hand side 
Descriptiondebug: Step into
Left hand side<F9>
Right hand side 
Descriptiontmux: Resize to tmux/nvim pane leftward
Left hand side<M-h>
Right hand side 
Descriptiondebug: Toggle breakpoint
Left hand side<F8>
Right hand side 
Descriptiontmux: Resize to tmux/nvim pane upward
Left hand side<M-k>
Right hand side 
Descriptiondebug: Stop
Left hand side<F7>
Right hand side 
Descriptiontmux: Resize tmux/nvim pane downward
Left hand side<M-j>
Right hand side 
Descriptiondebug: Run/Continue
Left hand side<F6>
Right hand side 
Descriptiontool: Preview markdown
Left hand side<F12>
Right hand side:MarkdownPreviewToggle<CR>
Descriptionbuffer: Close current
Left hand side<F4>
Right hand side:BufDel<CR>
Descriptioneditn: Save file using sudo
Left hand side<M-s>
Right hand side:<C-U>SudaWrite<CR>
DescriptionFormater: Toggle format on save
Left hand side<M-f>
Right hand side<Cmd>FormatToggle<CR>
Descriptionedit: Save file
Left hand side<C-S>
Right hand side:<C-U>write<CR>
Descriptionedit: Select all
Left hand side<C-A>
Right hand sidegg0vG$
Descriptionbuffer: Switch to prev
Left hand side<S-Tab>
Right hand side:BufferLineCyclePrev<CR>
Descriptionedit: Force quit
Left hand side<M-Q>
Right hand side:q!<CR>
Descriptionfiletree: Toggle
Left hand side<C-N>
Right hand side:NvimTreeToggle<CR>
Descriptiontool: Toggle command panel
Left hand side<C-P>
Right hand side 
Descriptionedit: Save file and quit
Left hand side<C-Q>
Right hand side:wq<CR>
Descriptionwindow: Resize +2 horizontally
Left hand side<M-'>
Right hand side:resize +2<CR>
Descriptionwindow: Resize -2 horizontally
Left hand side<M-;>
Right hand side:resize -2<CR>
Descriptionwindow: Resize +5 vertically
Left hand side<M-]>
Right hand side:vertical resize +5<CR>
Descriptionwindow: Resize -5 vertically
Left hand side<M-[>
Right hand side:vertical resize -5<CR>
Descriptiontmux: Move to tmux/nvim top window
Left hand side<C-K>
Right hand side 
Descriptiontmux: Move to tmux/nvim bottom window
Left hand side<C-J>
Right hand side 
Descriptiontmux: Move to tmux/nvim left window
Left hand side<C-H>
Right hand side 
Descriptiontmux: Move tmux/nvim right window
Left hand side<C-L>
Right hand side 

Visual mode keymaps

DescriptionNvim builtin
Left hand side#
Right hand sidey?\V<C-R>"<CR>
DescriptionNvim builtin
Left hand side*
Right hand sidey/\V<C-R>"<CR>
Description 
Left hand side,=
Right hand side 
Description 
Left hand side,-
Right hand side 
Descriptiontool: Run code by range
Left hand side,R
Right hand side:SnipRun<CR>
Descriptionmove: Change selection region to child node
Left hand side-
Right hand side:<C-U>STSSelectChildNode<CR>
Descriptionedit: Decrease indent
Left hand side<lt>
Right hand side<lt>gv
Descriptionmove: Change selection region to parent node
Left hand side=
Right hand side:<C-U>STSSelectParentNode<CR>
Descriptionedit: Increase indent
Left hand side>
Right hand side>gv
Descriptionleapx: Visual select backward to character
Left hand sideF
Right hand side 
Descriptionedit: Move this line down
Left hand sideJ
Right hand side:m '>+1<CR>gv=gv
Descriptionedit: Move this line up
Left hand sideK
Right hand side:m '<lt>-2<CR>gv=gv
Descriptionleapx: Visual select backward till character
Left hand sideT
Right hand side 
Descriptionmove: Change selection region to preivous sibling node
Left hand side[
Right hand side:<C-U>STSSelectPrevSiblingNode<CR>
Descriptionmove: Change selection region to next sibling node
Left hand side]
Right hand side:<C-U>STSSelectNextSiblingNode<CR>
Descriptionleapx: Visual select to character
Left hand sidef
Right hand side 
Descriptionedit: Toggle comment for line with selection
Left hand sidegc
Right hand side<Plug>(comment_toggle_linewise_visual)
Descriptionedit: Toggle comment for block with selection
Left hand sidegb
Right hand side<Plug>(comment_toggle_blockwise_visual)
Descriptionedit: Align with delimiter
Left hand sidegea
Right hand side:EasyAlign<CR>
DescriptionJumpx: Jump across syntax tree
Left hand sidem
Right hand side 
Descriptionleapx: Visual select till character
Left hand sidet
Right hand side 
Descriptionedit: Add a surrounding pair around a visual selection, on new lines
Left hand sideyS
Right hand side 
Descriptionedit: Add a surrounding pair around a visual selection
Left hand sideys
Right hand side 
Descriptionedit: Search-replace with selection within one line
Left hand side<C-R>
Right hand side:<C-U>SearchReplaceSingleBufferVisualSelection<CR>
Descriptionedit: Search-replace with selection within one line CWord
Left hand side<C-W>
Right hand side:<C-U>SearchReplaceWithinVisualSelectionCWord<CR>
Descriptionedit: Select all
Left hand side<C-A>
Right hand side<Esc>gg0vG$

Operator mode keymaps

Descriptionleapo: Operatate backward to character
Left hand sideF
Right hand side 
Descriptionleapo: Operatate backward till character
Left hand sideT
Right hand side 
Descriptionleapo: Operatate to character
Left hand sidef
Right hand side 
DescriptionJumpo: Jump across syntax tree
Left hand sidem
Right hand side 
Descriptionleapo: Operatate till character
Left hand sidet
Right hand side