Need help with nvim-config?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

jdhao
388 Stars 84 Forks MIT License 710 Commits 3 Opened issues

Description

My custom Neovim configuration with full battery for Python, C++, Markdown, LaTeX and more... 来不及解释了,快上车

Services available

!
?

Need anything else?

Contributors list

# 144,004
TypeScr...
Vim
color-s...
Lua
700 commits

Introduction

This repo hosts my Nvim configuration for all the platforms I am using (Linux, Windows and macOS).

init.vim
is the config entry point for terminal Nvim, and
ginit.vim
is the additional config file for GUI client of Nvim (I am using neovim-qt for now on Windows).

My configurations are heavily documented to make it as clear as possible. While you can download the whole repository and use it, it is not recommended though. Good configurations are personal. Everyone should have his or her unique config file. You are encouraged to copy from this repo the part you feel useful and add it to your own Nvim config.

See doc here on how to install Nvim's dependencies, Nvim itself, and how to set up on different platforms (Linux, macOS and Windows).

This config is tested against Nvim 0.5.0 release. No backward compatibility is guaranteed.

Features

Demo

Autocompletion

Git add, commit and push via fugitive.vim

Tags

Cursor jump via vim-sneak

Go to a string starting with

se

GUI-style notification

For more UI demos, see here.

Shortcuts

Some of the shortcuts I use frequently. In the following shortcuts,


represents ASCII character 
,
.

| Shortcut | Mode | platform | Description | |-------------------|---------------|-----------------|------------------------------------------------------------------| |

f
| Normal | Linux/macOS/Win | Fuzzy file search in a floating window | |
h
| Normal | Linux/macOS/Win | Fuzzy help search in a floating window | |
t
| Normal | Linux/macOS/Win | Fuzzy buffer tag search in a floating window | |
 | Normal        | Linux/macOS/Win | Remove trailing white spaces                                     |
| 
v
| Normal | Linux/macOS/Win | Reselect last pasted text | |
ev
| Normal | Linux/macOS/Win | Edit Nvim config in a new tabpage | |
sv
| Normal | Linux/macOS/Win | Reload Nvim config | |
st
| Normal | Linux/macOS/Win | Show highlight group for cursor text | |
q
| Normal | Linux/macOS/Win | Quit current window | |
Q
| Normal | Linux/macOS/Win | Quit all window and close Nvim | |
w
| Normal | Linux/macOS/Win | Save current buffer content | |
cd
| Normal | Linux/macOS/Win | Change current directory to where current file is | |
y
| Normal | Linux/macOS/Win | Copy the content of entire buffer to default register | |
cl
| Normal | Linux/macOS/Win | Toggle cursor column | |
cd
| Normal | Linux/macOS/Win | Change current working directory to to the dir of current buffer | |
t
| Normal | Linux/macOS/Win | Toggle tag window (show project tags in the right window) | |
gs
| Normal | Linux/macOS/Win | Show Git status result | |
gc
| Normal | Linux/macOS/Win | Run git commit | |
            | Normal        | Linux/macOS/Win | Run current source file (for Python, C++)                        |
| 
           | Normal        | Linux/macOS/Win | Toggle spell checking                                            |
| 
           | Normal        | Linux/macOS/Win | Toggle paste mode                                                |
| 
\x
| Normal | Linux/macOS/Win | Close location or quickfix window | |
\d
| Normal | Linux/macOS/Win | Close current buffer and go to previous buffer | |
{count}gb
| Normal | Linux/macOS/Win | Go to buffer {count} or next buffer in the buffer list. | |
Alt-M
| Normal | macOS/Win | Render Markdown to HTML and open it in system browser | |
ob
| Normal/Visual | macOS/Win | Open link under cursor or search visual selection | |
ctrl-u
| Insert | Linux/macOS/Win | Turn word under cursor to upper case | |
ctrl-t
| Insert | Linux/macOS/Win | Turn word under cursor to title case | |
jk
| Insert | Linux/macOS/Win | Return to Normal mode without lagging |

Trouble shooting

If you come across an issue, you can first use

:checkhealth
command provided by
nvim
to trouble-shoot yourself. Please read carefully the messages provided by health check.

If you still have an issue, open a new issue.

Further readings

Some of the resources that I find helpful in mastering Vim is documented here. You may also be interested in my post in configuring Vim on different platforms:

1: Not enabled by default for Linux, see this issue on how to enable vimtex on Linux.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.