- Features
- Showcase
- Dependencies
- Keymaps
- Other Notes
- Discussion
Built on modern devtools including LSP and treesitter. Treesitter delivers AST-level highlighting, text objects, and navigations, while LSP offers features like auto completion, go to definition and reference, and code diagnostics. By harnessing the power of both Ctags and LSP, this configuration brings a harmonic blend of old-school and modern development tools.
Vim's exceptional text editing capabilities are further amplified by a host of powerful plugins focusing on text editing. (Remember it is pure text editing makes vim vim.)
This configuration is specifically tailored toward data science toolsets, including python, R, SQL, Latex, rmarkdown, and quarto.
Curated configuration working together with vscode thanks to vscode-neovim. Access all the familiar neovim keybindings, including translations of equivalent commands in vscode, even when working with complex graphical content like Jupyter notebooks. And many neovim plugins, such as treesitter, can be embedded seamlessly in vscode, allowing for a smooth and uninterrupted workflow.
NOTE: If you plan to use this configuration with vscode-neovim
, please
use the vscode
branch. If you wish to use neovim both in the terminal
and in vscode, we suggest creating two folders in ~/.config
or your specified
$XDG_CONFIG
path. One is ~/.config/nvim
, which uses the default
configuration in the master
branch, and the other is
~/.config/vscode-neovim
, which uses the configuration in the vscode
branch. This takes advantage of the NVIM_APPNAME
feature in nvim 0.9
.
Then, Set vscode-neovim.NVIM_APPNAME
to vscode-neovim
in vscode settings.
Randomly select a theme from a curated list each time you start up and automatically switches between day and night themes at scheduled time. Additionally, the displayed verses on the welcome screen is also randomized with each launch. With neovim, you can have a fresh experience every time. Be casual and wild!
- The welcome screen displays two verses randomly selected from my curated collection. You can select new verses and color schemes at random or access frequently used commands from this screen.
- This screenshot showcases writing Lua code with smart autocompletion through
both language server (LSP) and universal-ctags (ctags). This combination
seamlessly blends old-school and modern tools. The bottom window shows the
occurrence of referenced symbols that you specify (via
lsp find references
), while the right window shows the symbol outline of the current file (vialsp document symbols
).
- This screenshot demonstrates the use of literate programming in neovim, which is highly beneficial for data science workflows. You can write code in both Python and R with intelligent autocompletion from both LSP and Ctags in quarto or markdown files. Moreover, you can send your code to both R and Python REPL simultaneously.
- This screenshot demonstrates how to debug Python program in neovim. Stepping through the code and watching variables and stack frames, just like in vscode.
You are responsible for installing the dependencies, but most of them are optional. They consist mainly of language servers and linters that correspond to their respective languages. You can choose the ones you need and leave out the others. Even if certain dependencies are absent, neovim will still operate and display notifications instead of halting completely.
If your system lacks a proper package manager, such as with Windows, or if the
packages are out of date, as with Debian, you can use Mason.nvim
, a neovim
plugin specifically to install some of the dependencies. Dependencies marked
with a *
can be installed through Mason.nvim
. To install these packages
within neovim, enter :Mason
in the prompt, and a popup window will appear
with the intuitive interface of Mason
. From there, you can easily install
packages.
This configuration relies on an external tool called efm-langserver
, which
can be installed via mason
. However, it needs to be separately configured
outside of neovim. An example configuration for efm
is provided in the dist
folder. To use this example configuration, simply copy the folder to
~/.config/
.
python
.debugpy
: this module should be included by thepython
at the top of your$PATH
.ipython
black*
efm-langserver*
basedpyright*
r-language-server
: this is a R package that should be installed by ther
at the top of your$PATH
radian
lua-language-server*
stylua*
selene*
efm-langserver*
vim-language-server*
prettierd*
vale*
efm-langserver*
sqls*
sql-formatter*
bash-language-server*
shellcheck*
texlab*
latexindent*
: while this package is shipped withtexlive
,perl
shipped by macOS cannot run this program, so I use ahomebrew
installedlatexindent
instead.
clangd*
: Apple'sxcode
command line tools ship this for you.
universal-ctags
treesitter-cli*
: this is required fornvim-treesitter
inmain
branch.lazygit
: this is only required if want to uselazygit
in neovim (which is binded to<leader>og
).
NOTE: this only includes keymaps defined by myself, and some of the default plugins keymaps that I used frequently.
The <Leader>
key is <Space>
,
the <LocalLeader>
key is <Space><Space>
or <Backslash>
.
In case you forget the keymaps
you can always use <Leader>fk
(:Telescope keymaps
)
to find all keymaps.
Mode | LHS | RHS/Functionality |
---|---|---|
ic | <C-b> |
<Left> |
ic | <C-p> |
<Up> |
ic | <C-f> |
<Right> |
ic | <C-n> |
<Down> |
ic | <C-a> |
Go to Beginning of the line |
ic | <C-e> |
Go to end of the line |
ic | <C-h> |
<Backspace> |
ic | <C-k> |
Del chars from cursor to line end |
ic | <C-d> |
Delete a char forwardly |
c | <A-f> |
Move cursor to next word |
c | <A-b> |
Move cursor to previous word |
it | jk |
Switch to normal mode |
Mode | LHS | RHS/Functionality |
---|---|---|
n | <A-f> |
Move current win to prev tab |
n | <A-b> |
Move current win to next tab |
n | <A-w> |
Go to next win |
n | <A-p> |
Go to Prev win |
n | <A-t> |
Move this win to new tab |
n | <A-q> |
Del this win |
n | <A-v> |
Vertically split current win |
n | <A-s> |
Horizontally split current win |
n | <A-h> |
Go to win to the left |
n | <A-j> |
Go to win to the below |
n | <A-k> |
Go to win to the above |
n | <A-l> |
Go to win to the right |
n | <A-H> |
Move current win to the left |
n | <A-J> |
Move current win to the below |
n | <A-K> |
Move current win to the above |
n | <A-L> |
Move current win to the right |
n | <A-o> |
Make current win the only win |
n | <A-=> |
Balance the win height/width |
n | <A-|> |
Maximize current win's width |
n | <A-_> |
Maximize current win's height |
n | <A-<> |
Decrease current win's width |
n | <A->> |
Increase current win's width |
n | <A-+> |
Increase current win's height |
n | <A--> |
Decrease current win's height |
n | <A-]> |
Downward scroll the float win |
n | <A-[> |
Upward scroll the float win |
n | <Leader>wf |
Move current win to prev tab |
n | <Leader>wb |
Move current win to next tab |
n | <Leader>ww |
Go to next win |
n | <Leader>wp |
Go to Prev win |
n | <Leader>wT |
Move this win to new tab |
n | <Leader>wq |
Del this win |
n | <Leader>wv |
Vertically split current win |
n | <Leader>ws |
Horizontally split current win |
n | <Leader>wh |
Go to win to the left |
n | <Leader>wj |
Go to win to the below |
n | <Leader>wk |
Go to win to the above |
n | <Leader>wl |
Go to win to the right |
n | <Leader>wH |
Move current win to the left |
n | <Leader>wJ |
Move current win to the below |
n | <Leader>wK |
Move current win to the above |
n | <Leader>wL |
Move current win to the right |
n | <Leader>wo |
Make current win the only win |
n | <Leader>w= |
Balance the win height/width |
n | <Leader>w] |
Downward scroll the float win |
n | <Leader>w[ |
Upward scroll the float win |
n | <Leader>w| |
Maximize current win's width |
n | <Leader>w_ |
Maximize current win's height |
n | <Leader>w] |
Jump to tags in a new window |
n | <Leader>wg] |
Select a tag to jump in a new window |
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader><Tab>[ |
Go to next tab |
n | <Leader><Tab>] |
Go to prev tab |
n | <Leader><Tab>n |
Create a new tab |
n | <Leader><Tab>c |
Close current tab |
n | <Leader><Tab>o |
Close other tabs except this one |
n | <Leader><Tab>h |
Move tab to the left |
n | <Leader><Tab>l |
Move tab to the right |
n | <Leader><Tab>1 |
Go to 1st tab |
n | <Leader><Tab>2 |
Go to 2nd tab |
n | <Leader><Tab>3 |
Go to 3rd tab |
n | <Leader><Tab>4 |
Go to 4th tab |
n | <Leader><Tab>5 |
Go to 5th tab |
n | <Leader><Tab>6 |
Go to 6th tab |
n | <Leader><Tab>7 |
Go to 7th tab |
n | <Leader><Tab>8 |
Go to 8th tab |
n | <Leader><Tab>9 |
Go to 9th tab |
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>bd |
Delete current buffer |
n | <Leader>bw |
Wipeout current buffer |
n | <Leader>bp |
Prev buffer |
n | <Leader>bn |
Next buffer |
Mode | LHS | RHS/Functionality |
---|---|---|
n | ]b |
Next buffer |
n | [b |
Previous buffer |
n | ]q |
Next quickfix list entry |
n | [q |
Prev quickfix list entry |
n | ]Q |
Set current quickfix list as newer one in qflist history |
n | [Q |
Set current quickfix list as older one in qflist history |
n | ]t |
Go to next tag location for currently searched symbol |
n | [t |
Go to previous tag location for currently searched symbol |
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>olx |
Open URI under cursor using xdg-open |
n | <Leader>olw |
Open URI under cursor using w3m |
n | <C-g> |
<ESC> |
n | <Leader>mt |
search current word from tags file and send to loclist |
n | <Leader>mdc |
Set working dir as current file's dir |
n | <Leader>mdu |
Set working dir up one level from current working dir |
n | <Leader>mc |
Pick a color scheme |
n | <Leader>th |
Toggle highlight serach (see :h hlsearch ) |
n | <Leader>tn |
Toggle display line number |
n | <Leader>tH |
Toggle cmdheight between 0 or 1 (see :h cmdheight ) |
n | <Leader>tw |
Toggle wrap (see :h wrap ) |
n | <Leader>tc |
set conceallevel between 0 and 2 (see :h wrap ) |
The following keymaps rely on Trouble.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>xw |
Toggle display of workspace diagnostics via Trouble |
n | <Leader>xd |
Toggle display of document diagnostics via Trouble |
n | <Leader>xl |
Toggle display of loclist via Trouble |
n | <Leader>xq |
Toggle display of quickfix list via Trouble |
n | <Leader>xr |
Toggle display of lsp references via Trouble |
The following keymaps rely on nvim-tree.lua
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>et |
Toggle file explorer via Nvimtree |
n | <Leader>ef |
Toggle file explorer fosusing on current file via Nvimtree |
n | <Leader>er |
Refresh Nvimtree file explorer |
The following keymaps rely on winshift.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>wm |
Rearrange windows layout |
The following keymaps rely on vim-easy-align
Mode | LHS | RHS/Functionality |
---|---|---|
nv | ga | Align the motion / text object / selected text by input separator |
The following keymaps rely on mini.comment
Mode | LHS | RHS/Functionality |
---|---|---|
nv | gc | Comment / uncomment the motion / text object / selected text |
n | gcc | Comment /uncomment current line |
o | gc | Text object: a commented text block |
The following keymaps rely on dsf.vim
Mode | LHS | RHS/Functionality |
---|---|---|
n | dsf | Delete a function call, don't delete the arguments |
n | dsnf | Delete next function call, don't delete the arguments |
n | csf | Change a function call, keep arguments the same |
n | csnf | Change next function call, keep arguments the same |
The following keymaps rely on vim-sneak
Mode | LHS | RHS/Functionality |
---|---|---|
nvo | f | Find the next input character |
nvo | F | Find the previous input character |
nvo | t | Guess from t vs f for vanilla vim |
nvo | T | Guess from T vs F for vanilla vim |
nv | s | Find the next 2 input chars |
o | z | Motion: Find the next 2 input chars |
n | S | Find the previous 2 input chars |
ov | Z | Motion: Find the previous 2 input chars |
The following keymaps rely on mini.ai
Mode | LHS | RHS/Functionality |
---|---|---|
ov | an | Text object: find the next following "around" text object |
ov | aN | Text object: find the previous following "around" text object |
ov | in | Text object: find the next following "inner" text object |
ov | iN | Text object: find the previous following "inner" text object |
nov | g( |
Motion: go to the start of the following "around" text object |
nov | g) |
Motion: go to the end of the following "around" text object |
The following keymaps rely on mini.move
Mode | LHS | RHS/Functionality |
---|---|---|
v | <A-h> |
Move left the block of text |
v | <A-j> |
Move down the block of text |
v | <A-k> |
Move up the block of text |
v | <A-l> |
Move right the block of text |
The following keymaps rely on mini.surround
Mode | LHS | RHS/Functionality |
---|---|---|
n | yss | Add a surround pair for the whole line |
n | ys | Add a surround pair for the following motion / text object |
n | yS | Add a surround pair from cursor to line end |
v | S | Add a surround pair for selected text |
n | cs | Change the surround pair |
n | ds | Delete the surround pair |
The following keymaps rely on substitute.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
nv | gs | Substitute the motion / text object / selected text by latest pasted text, don't cut the replaced text |
n | gss | Similar to gs , operate on the whole line |
n | gS | Similar to gs , operate on text from cursor to line end |
The following keymaps rely on vim-textobj-beween
Mode | LHS | RHS/Functionality |
---|---|---|
ov | ab | Text object: around text between the input character |
ov | ib | Text object: inner text between the input character |
The following keymaps rely on vim-textobj-chainmember
Mode | LHS | RHS/Functionality |
---|---|---|
ov | a. | Text object: around a chain of chained method calls |
ov | i. | Text object: inner of a chain of chained method calls |
The following keymaps rely on toggleterm.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>ot |
open the n th terminal, e.g <Leader>ot , 2<Leader>ot |
n | <Leader>t0 |
Toggle all terminals |
n | <Leader>t! |
Terminate the n th terminal |
n | <Leader>t1 |
Toggle the 1st terminal |
n | <Leader>t2 |
Toggle the 2nd terminal |
n | <Leader>t3 |
Toggle the 3rd terminal |
n | <Leader>t4 |
Toggle the 4th terminal |
The following keymaps rely on gitsigns.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>gp |
Preview current git diff hunk |
n | <Leader>ga |
Git actions |
n | <Leader>gB |
Git blame current file |
n | <Leader>gb |
Git blame current line |
n | <Leader>gs |
Stage current git diff hunk |
n | <Leader>gR |
Unstage current git diff hunk |
n | <Leader>gr |
Reset current git diff hunk |
n | <Leader>gq |
Send git diff hunks to qflist |
n | ]h |
Go to next git diff hunk |
n | [h |
Go to previous git diff hunk |
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>og |
Open Lazygit |
The following keymaps rely on mini.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>gd |
Show diff |
n | <Leader>gD |
Show staged diff |
n | <Leader>gl |
Show log |
n | <Leader>gL |
Show log of current buffer |
n | <Leader>gc |
commit |
n | <Leader>gc |
commit ammend |
nv | <Leader>gg |
DWIM (refer to mini-git 's doc for show_at_cursor() ') |
The following keymaps rely on grug-far.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
nv | <Leader>/ |
Open search and replace UI in a new tab |
nv | <Leader>ss |
search and replace with current word or selected text in horizontal split |
nv | <Leader>ss |
search and replace with current selected word or selected text in vertical split |
nv | <Leader>st |
search and replace with current selected word or selected text in new tab |
nv | <Leader>sf |
search and replace with current selected word or selected text within current file |
The following keymaps rely on Minuet
, an LLM-powered completion source.
Mode | LHS | RHS/Functionality |
---|---|---|
n | <M-y> |
Invoke minuet completion |
Note: with no numerical argument, the REPL is default for the first REPL.
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>tR |
Toggle float win for REPL |
n | <LocalLeader>rs |
Start REPL i , e.g. <LocalLeader>rs to start REPL 1 and 3<LocalLeader>rs to start REPL 3 |
n | <LocalLeader>rf |
Focus on the window of REPL attached or REPL i , e.g. <LocalLeader>rf , 2<LocalLeader>rf |
n | <LocalLeader>rs |
Swap two REPLs. |
n | <LocalLeader>rv |
View REPLs in telescope. |
n | <LocalLeader>rh |
Hide the window of REPL attached or REPL i , e.g. <LocalLeader>rf , 2<LocalLeader>rf |
n | <LocalLeader>ra |
Attach current buffer to a REPL |
n | <LocalLeader>rd |
Detach current buffer to any REPL |
n | <LocalLeader>rq |
Exit REPL attached or REPL i , usage the same as above |
n | <LocalLeader>rc |
Clear invalid REPLs |
Mode | LHS | RHS/Functionality |
---|---|---|
nv | <LocalLeader>s |
Send the motion / text object / selected text to the REPL attached or repl i , e.g. <LocalLeader>sap or 3<LocalLeader>ap |
n | <LocalLeader>ss |
Send current line to the REPL attached or REPL i , e.g. <LocalLeader>ss or 3<LocalLeader>ss |
Mode | LHS | RHS/Functionality |
---|---|---|
ov | af | Text object: around a function definition |
ov | if | Text object: inner of a function definition |
ov | ak | Text object: the same as aC |
ov | ik | Text object: the same as iC |
ov | al | Text object: around a loop |
ov | il | Text object: inner of a loop |
ov | ac | Text object: around if-else conditions |
ov | ic | Text object: inner of if-else conditions |
ov | ae | Text object: around a function call |
ov | aA |
Text object: around a parameter(argument) |
ov | iA |
Text object: inner of a parameter(argument) |
Mode | LHS | RHS/Functionality |
---|---|---|
n | ]f |
Go to the start of next function definition |
n | ]k |
The same as ]<Leader>c |
n | ]l |
Go to the start of next loop |
n | ]c |
Go to the start of next if-else conditions |
Mode | LHS | RHS/Functionality |
---|---|---|
n | ]F |
Go to the end of next function definition |
n | ]K |
The same as ]<Leader>C |
n | ]L |
Go to the end of next loop |
n | ]C |
Go to the end of next if-else conditions |
Mode | LHS | RHS/Functionality |
---|---|---|
n | [f |
Go to the start of previous function definition |
n | [k |
The same as [<Leader>c |
n | [l |
Go to the start of previous loop |
n | [c |
Go to the start of previous if-else conditions |
Mode | LHS | RHS/Functionality |
---|---|---|
n | [F |
Go to the end of previous function definition |
n | [K |
The same as [<Leader>C |
n | [L |
Go to the end of previous loop |
n | [C |
Go to the end of previous if-else conditions |
Mode | LHS | RHS/Functionality |
---|---|---|
n | g<CR> |
Jump to the start of the selected treesitter node |
n | g<BS> |
Jump to the end of the selected treesitter node |
v | <CR> |
Expand the region based on treesitter nodes range |
o | <CR> |
Expand the region based on treesitter node range |
The following keymaps rely on
telescope.nvim, nvim-notify, project.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>ff |
Preview files in current working dir |
n | <Leader>fg |
Search current working dir via grep |
n | <Leader>fb |
Preview buffers |
n | <Leader>fh |
Preview vimhelp |
n | <Leader>fo |
Preview recently visited (old) files |
n | <Leader>fp |
Show recently visited projects |
n | <Leader>fk |
Show keymaps |
n | <Leader>fc |
Show commands |
n | <A-x> |
Show commands |
n | <Leader>fC |
Show command history |
n | <Leader>fs |
Show lsp document symbols |
n | <Leader>fr |
Show registers |
n | <Leader>fj |
Show jumplist |
n | <Leader>fn |
Show notifications |
n | <Leader>fT |
Show treesitter nodes |
n | <Leader>ft |
Show tags |
n | <Leader>F |
Show all available telescope finders |
n | <Leader>fe |
The same as <Leader>F |
The following keymaps rely on nvim-lspconfig
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>lt |
Go to current symbol's type definition |
n | <Leader>la |
LSP code actions |
n | <Leader>ls |
Show signature help |
n | <Leader>lf |
Format document |
n | K |
Hover (Show doc of symbol under the cursor) |
Mode | LHS | RHS/Functionality |
---|---|---|
n | gr |
Show references of current symbol |
n | gd |
Show definitions of current symbol |
n | <Leader>li |
Show implementations of current symbol |
n | <Leader>ld |
Show diagnostics of current project |
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>ln |
Rename current symbol |
n | gh |
Hover (show documentation of) current symbol |
n | [d |
Go to previous diagnostics location |
n | ]d |
Go to previous diagnostics location |
Mode | LHS | RHS/Functionality |
---|---|---|
i | <A-s> |
Show signature help |
i | <A-h> |
Hover |
The following keymaps rely on aerial.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>lo |
Toggle the outline of document symbols |
The following keymaps rely on nvim-cmp
Mode | LHS | RHS/Functionality |
---|---|---|
i |
<C-b> |
Scoll up the documentation |
i |
<C-f> |
Scoll down the documentation |
i |
<C-n> |
Select next candidate |
i |
<C-p> |
Select previous candidate |
i |
<A-i> |
Manually invoke the completion |
i |
<Tab> |
Select the candidate / expand the snippet / go to next slot in snippet |
i |
<S-Tab> |
Select previous candidate / go to previous slot in snippet |
i |
<C-e> |
Abort the completion |
Mode | LHS | RHS/Functionality |
---|---|---|
n |
<F5> |
Continue |
n |
<F6> |
Pause |
n |
<S-F5> |
Close |
n |
<F8> |
Run to cursor |
n |
<F9> |
Toggle break point |
n |
<S-F9> |
Set conditional breakpoint |
n |
<F10> |
Step over |
n |
<F11> |
Step into |
n |
<S-F11> |
Step out |
n | <Leader>dh |
Hover the DAP information for current symbol |
n | <Leader>dr |
Toggle the REPL of the DAP session |
n | <Leader>du |
Toggle the fancy UI (side panel) of DAP |
n | <Leader>dc |
Show available DAP commands |
n | <Leader>dC |
Show available DAP configurations |
n | <Leader>db |
List breakpoints |
n | <Leader>dv |
List DAP variables |
n | <Leader>df |
List DAP frames |
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>oa |
Open org agenda |
n | <Leader>oc |
Open org capture |
Mode | LHS | RHS/Functionality |
---|---|---|
ov | a<Leader>c |
Text objects: a code chunk |
ov | i<Leader>c |
Text objects: inner code chunk |
The following keymaps rely on yarepl.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <LocalLeader>rs |
Start the R REPL |
n | <LocalLeader>rq |
Stop the R REPL |
Mode | LHS | RHS/Functionality |
---|---|---|
n | <LocalLeader>ss |
Send current line to console |
nv | <LocalLeader>s |
Send motion / text object / selected text to console |
nv | <LocalLeader>sc |
Send code chunk to console |
Mode | LHS | RHS/Functionality |
---|---|---|
ov | a<Leader>c |
Text objects: a code chunk |
ov | i<Leader>c |
Text objects: inner code chunk |
The following keymaps rely on yarepl.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <LocalLeader>rs |
Start the python REPL |
n | <LocalLeader>rq |
Stop the python REPL |
Mode | LHS | RHS/Functionality |
---|---|---|
n | <LocalLeader>sc |
Send code chunk to console 1 |
n | <LocalLeader>1sc |
Send code chunk to console 1 |
n | <LocalLeader>2sc |
Send code chunk to console 2 |
n | <LocalLeader>3sc |
Send code chunk to console 3 |
n | <LocalLeader>4sc |
Send code chunk to console 4 |
n | <LocalLeader>5sc |
Send code chunk to console 5 |
n | <LocalLeader>6sc |
Send code chunk to console 6 |
n | <LocalLeader>7sc |
Send code chunk to console 7 |
n | <LocalLeader>8sc |
Send code chunk to console 8 |
n | <LocalLeader>9sc |
Send code chunk to console 9 |
The following keymaps is useful for working on embedded languages. For example the embedded SQL code in python string.
Mode | LHS | RHS/Functionality |
---|---|---|
n | <LocalLeader>' |
Open a temp buffer to edit the string |
n | <LocalLeader>c |
write the change in temp buffer to original file |
n | <LocalLeader>k |
discard the temp buffer and don't write the change |
Mode | LHS | RHS/Functionality |
---|---|---|
ov | ac |
Text object: a code chunk |
ov | ic |
Text object: inner code chunk |
The following keymaps rely on dsf.vim
Mode | LHS | RHS/Functionality |
---|---|---|
ov | ae |
Text object: a function call |
ov | ie |
Text object: inner function call |
The following keymaps rely on markdown-previem.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>mmp |
Preview rmarkdown file |
n | <Leader>mmq |
Stop previewing |
The following keymaps rely on markdown-previem.nvim
Mode | LHS | RHS/Functionality |
---|---|---|
n | <Leader>mmp |
Preview markdown file |
n | <Leader>mmq |
Stop previewing |
The following keymaps rely on vimtex
Mode | LHS | RHS/Functionality |
---|---|---|
n | <LocalLeader>ll |
Toggle auto-compile process |
n | <LocalLeader>lc |
Clean the auxiliary files |
n | <LocalLeader>lt |
Toggle the table of contents |
n | <LocalLeader>lv |
View the generated document |
n | <LocalLeader>lk |
Stop the compilation |
n | <LocalLeader>lm |
Toggle compilation based on main file or current file |
n | <LocalLeader>la |
Show the context menu for symbol under the cursor |
n | <LocalLeader>lo |
Show the compile output |
n | <LocalLeader>ss |
Add a surround env pair for current line |
nv | <LocalLeader>s |
Add a surround env pair for motion / text object / selected text |
nv | <LocalLeader>c |
Add a surround command pair for motion / text object / selected text |
Mode | LHS | RHS/Functionality |
---|---|---|
n | dse |
Delete the surround env |
n | dsc |
Delete the surround command |
n | ds$ |
Delete the surround math delimiter |
n | dsd |
Delete the surround delimiter |
n | cse |
Change the surround env |
n | csc |
Change the surround command |
n | cs$ |
Change the surround math delimiter |
n | csd |
Change the surround delimiter |
-
vim-sneak
defines relatively inconsistent behavior: in normal mode, uses/S
, in operator pending mode, usez/Z
, in visual mode, uses/Z
. In normal mode, default mappings
is replaced. In op mode, usez/Z
is to be compatible withvim-surround
(mappings:ys/ds/cs
), in visual mode, uses/Z
is to be compatible with folding (mapping:zf
) andvim-surround
(mapping:S
) -
You need to define your leader key before defining any keymaps. Otherwise, keymap will not be correctly mapped with your leader key.
-
vim-matchup
will (intentionally) hide the status-line if the matched pair are spanned over entire screen to show the other side of the pair.
- It is recommended to use the mailing list
~northyear/[email protected]
. - Alternatively, you are also welcome to open a Github issue.