learning operations please refer to vim-vide
Contents
git clone --depth 1 https://github.com/lzhnb/neovim-vide ~/.config/nvim
- run
vimtutorin terminal to learn the base operation - run
:hinvim/neovimto refer the document ofvim/neovim
| hot key | function |
|---|---|
g |
First line |
G |
Last line |
:n |
n-th line |
n |
n-th line after the current line |
0/| |
head of the current line |
$ |
tail of the current line |
n|/0nl |
n-column of the current line |
| hot key | function |
|---|---|
yy |
copy the current line |
dd |
cut the current line |
p |
paste under the current line |
P |
paste upper the current line |
x |
cut the selection |
| hot key | function |
|---|---|
u |
Undo |
ctrl+r |
Redo |
:[addr]s/src/tar/[option]
srcstring to be replacedtarstring to replaceaddrsearching scope:n,m: fromn-th tom-th line%: current file globally.,$: from the current to the last line
optionoperation modegglobal replacecconfirm one by onepindicates that the replacement displayed line by line (Ctrl+lcover)
Commonly used global replacement :%s/src/tar/g
we press ctrl-v and enter the Visual mode, then choose multiple lines(gg to the first line,G to the last line):
- press
Iand then enter the Insert mode, enterEscafter finishing editing, the edited content will appear in the selected lines. - press
cand then enter theReplacemode, enterEscafter replacement, the replacement will be applied to the selected lines. - press
dand delete the selected content. - press
<to indent forwardTab, press to indent backwardTab.
| hot key | function |
|---|---|
zf |
create folding |
zo |
open folding |
zc |
close folding |
:mkview / :loadview |
save and load view |
Our installed coc list:
coc-git
coc-highlight
coc-snippets
coc-json
coc-explorer
coc-pyrightctrl-n: Next completionctrl-p: Previou completionctrl-y: Confirm completion
Using coc-pyright to realize completion, and using jedi-vim to realize go-to.
We disable the autocompletion of jedi-vim.
<leader>d: go to definitionK: check documentation of class or method<leader>n: show the usage of a name in current file<leader>r: rename a name
| hot key | function |
|---|---|
ctrl+j |
switch to the previous buffer |
ctrl+k |
switch to the next buffer |
ctrl+d |
exit opening file and close buffer |
F3 |
switch highlight search |
F4 |
switch paste mode (deprecated feature) |
| hot key | function |
|---|---|
gcc |
comment/uncomment current line(Normal mode) |
gc |
comment/uncomment selection (Visual mode) |
gcip |
comment/uncomment a paragraph |
bilibili/vim-vide ayamir/nvimdots
TODO