Skip to content
/ nvim Public

This is my neovim, good vim configuration.

Notifications You must be signed in to change notification settings

zlj-zz/nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catalog

This is my neovim

This is just my configuration of NEOVIM, for reference only.

now can use the configuration in windows easyly.

demo

After Installation, You Need To

Install pynvim (pip)

Install nodejs, and do npm install -g neovim

Install nerd-fonts (actually it's optional)

After Installation, You Might Want To

First of all(neovim)

Do :checkhealth

For Python Debugger (via vimspector)

Install debugpy (pip)

Config Python path

Well, make sure you have python

For Taglist:

Install ctags for function/class/variable list

For FZF

Install fzf

Install ag (the_silver_searcher)

And may also...

Install figlet for inputing text ASCII art

Install xclip for system clipboard access (Linux and xorg only)

Keyboard Shortcuts

Let <LEADER> to be <space>.

Let S to save file (same as command :w).

Let Q to quit (same as command :q).

Let ctrl+q to force quit (same as command :q!).

Let Y to copy till the end of the line in normal mode(same as y$).

Let Y copy to system clipboard in visual mode(same as "+y).

Cursor movement

h j k l

gj and gk move line by line if the text wraps.

Remapped cursor movement

shortcut action equavilent
K cursor up 7 lines 7k
J cursor down 7 lines 7j
H cursor left 5 chars 5h
L cursor right 5 chars 5l
ctrl+K move the view port up 5 lines without moving the cursor 5<c-y>
ctrl+J move the view port down 5 lines without moving the cursor 5<c-e>
alt+a ← in insert mode <left>
alt+s ↓ in insert mode <down>
alt+w ↑ in insert mode <up>
alt+d → in insert mode <right>

Remapped commands in Normal Mode

shortcut action
< un-indent
> indent
<LEADER><LEADER> go to the next placeholder (<++>)
<LEADER><Enter> cancel the highlight search
<LEADER>z switch full screen
<LEADER>go open current file in default browser
<LEADER>sc spelling check toggle
<LEADER>fd find two same word
<LEADER>rc open the neovim config anytime
,rc resource neovim config

Window management

shortcut action shortcut action
sh split window to the left th move cursor to the left window
sj split window to the down tj move cursor to the down window
sk split window to the up tk move cursor to the up window
sl split window to the right tl move cursor to the right window
ck place the two screens up and down ch place the two screens side by side

Tab management

shortcut action
st create a new tab
t- previous tab
t= next tab
alt + 1~9 switch to 1~9 tab

Buffer management

shortcut action
b# last buffer
b- previous buffer
b= next buffer
b + 1~9 switch to 1~9 buffer

Other

Let ctrl+a to select all (same as ggVG).

You can use ZZ command, this command writes the file and exits.

ctrl+z makes vim hang and enter shell, fg returns vim form shell.

dip clear the black lien around the current cursor.

<leader>fc find git conflict line.

Plugin

Enter F5 to open a new tab and running Startify.

vim-startup

coc-complete (a auto-complete plugin)

shortcut action shortcut action
<tab> next item gd jump to definition
<shift>+<tab> previous item gt jump to type definition
<enter> select item gi jump to implementation
<leader>rn symbol renaming gr jump to/show references
  • yarn global add bash-language-server

coc-complete

coc-snippet (a code snippet plugin)

shortcut action
<c-j> trigger snippet expand
<c-j> jump to next placeholder
<c-k> jump to previous placeholder

coc-snippet

coc-explorer (a file browser plugin)

shortcut action shortcut action shortcut action
tt coc-explorer toggle p paste file y copy file path
kandj up and down d delete Y copy file name
handl collapse and expand a add file c copy file
e open file A add directory x cut file
sandE open split or vsplit r rename f search
t open in new tab . toggleHidden R refresh
q quit ? help

explorer

coc-translator

Translation extension for coc.nvim. Inspired by vim-translator

View and search LSP symbols, tags in Vim/NeoVim.

Press ti to toggle Vista.

shortcut action
q quit
p preview

Vista gif

Things you can do with fzf and Vim.

shortcut action
, f FZF file
, h FZF history
, b FZF Buffers
, d Del buffer
, l FZF Lines
, c FZF history command

It can help you realize the function of multi-cursor.

  • select words with Ctrl-N (like Ctrl-d in Sublime Text/VS Code)
  • create cursors vertically with Ctrl-Down/Ctrl-Up
  • select one character at a time with Shift-Arrows
  • press n/N to get next/previous occurrence
  • press -/= to select next/previous cursor
  • press q to skip current and get next occurrence
  • press Q to remove current cursor/selection
  • start insert mode with i,a,I,A
  • u to undo, ctrl + r to redo, like vim native.

Press ga + symbol in normal or visual mode to align text based on symbol.

easy-align

A code comment plugin.

shortcut action
<LEADER>cn comment a line
<LEADER>cu uncomment a line
<LEADER>/ toggle comment

Preview markdown on your modern browser with synchronised scrolling and flexible configuration.

you should make sure install hook success. :call mkdp#util#install()

(generate table of contents for markdown files)

In markdown files, type :Gen then tab, you'll see your options.

markdown-toc

shortcut action
space t m toggle table mode
space t r realign table

\k view key mapping.

Adds file type icons to Vim plugins such as: NERDTree, vim-airline, CtrlP, unite, Denite, lightline, vim-startify and many more.

If you want to use it, you must sure the font you using support it.

For pacman

sudo pacman -S nerd-fonts-complete
sudo pacman -S adobe-source-code-pro-fonts

For MacOS

Best optio if on macOS and want to use Homebrew.

All fonts are available via Homebrew Cask Fonts on macOS (OS X)

brew tap homebrew/cask-fonts
brew cask install font-hack-nerd-font

If you installed the font, don't forget to select it in you terminal. If you are other system, you can try to use your package manager to install them. Or you maybe can find answer in https://github.com/ryanoasis/nerd-fonts.

Use for vim

ln -s xxx/nvim ~/.vim
ln -s xxx/nvim/init.vim ./vimrc

This is bottom [top]

Releases

No releases published

Packages

No packages published