-
Clone the repository into
~/.config/nvim
:git clone --depth=1 https://github.com/vuong-cuong-phoenix/neovim-config.git $HOME/.config/nvim
-
Install
vim-plug
:sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
-
Open
nvim
and:PlugInstall
to install all the plugins.
LHS + RHS: Hold LHS then press RHS in the same time. LHS → RHS: Press LHS first (don't need to hold, but has timeout) then press RHS. Essentials: Normal + Visual + Select + Operator-pending. Recursived?: Last key will be the start key of another keybinding (if present).
Key binding | Mode | Command | Recursived? |
---|---|---|---|
Space | Essentials | Vim's leader key | ✅ |
leader → [ | Normal | Toggle hlsearch | ✅ |
< | Normal + Select | Tab selected region | ✅ |
> | Normal + Select | Un-tab selected region | ✅ |
Alt + j | Normal + Visual + Select | Move current/selected region below | ✅ |
Alt + k | Normal + Visual + Select | Move current/selected region above | ✅ |
Ctlr + s | Normal | | :w | Alternative way to save | ✅ |
Ctlr + q | Normal | | :q! | Quit without saving | ✅ |
Ctlr + c | Visual + Select | Copy selected region to system's clipboard | ✅ |
Ctlr + x | Visual + Select | Cut selected region to system's clipboard | ✅ |
' + " | Essentials | Jump to position where last time quitted | ✅ |
leader → - | Normal | Split into panes horizontally | ✔️ |
leader → _ | Normal | Split into panes vertically | ✔️ |
Ctrl + h | Normal | Navigate to the left pane | ✅ |
Ctrl + j | Normal | Navigate to the lower pane | ✅ |
Ctrl + k | Normal | Navigate to the upper pane | ✅ |
Ctrl + l | Normal | Navigate to the right pane | ✅ |
Space + h | Essentials | Resize pane to the left | ✅ |
Space + j | Essentials | Resize pane to the lower side | ✅ |
Space + k | Essentials | Resize pane to the upper side | ✅ |
Space + l | Essentials | Resize pane to the right | ✅ |
t → l | Normal | Select next tab | ✅ |
t → h | Normal | Select previous tab | ✅ |
Key binding | Mode (Condition) | Command | Recursived? |
---|---|---|---|
Ctrl + p | Normal | Start FzF to find files/contents | ✅ |
leader → f → b | Normal | Show all buffers | ✅ |
leader → f → h | Normal | Show command histories | ✅ |
Ctrl + t | (FzF is running) | Open selected files as vim's tabs | ✅ |
Ctrl + j | (FzF is running) | Navigate to upper file | ✅ |
Ctrl + k | (FzF is running) | Navigate to lower file | ✅ |
Tab | (FzF is running) | Multi-select current file | ✅ |
Shift + Tab | (FzF is running) | Cancel Multi-select of current file | ✅ |
fugitive-object: Fugitive objects are either work tree files or Git revisions as defined in the "SPECIFYING REVISIONS" section in the git-rev-parse man page.
Key binding | Mode (Condition) | Command | Recursived? |
---|---|---|---|
leader → g → s | Normal | | :Gstatus | Open Git Status by Fugitive | ✔️ |
g → q | (Fugitive is running) | Quit Fugitive (:Git) | ✅ |
Enter | (Git Status & cursor at fugitive-object) | | :Gedit: | Edit the selected fugitive-object | ✅ |
c → c | (Git Status) | | :Gcommit | Commit Staged file(s) | ✅ |
s → Enter | (Git Status & cursor at 'Push:' line) | | :Git push ... | Push to remote in 'Push:' line | ✅ |
= | (Git Status & cursor at fugitive-object) | Toggle detailed changes of the selected fugitive-object | ✅ |
s | (Git Status & cursor at fugitive-object) | Mark the selected fugitive-object as Staged | ✅ |
u | (Git Status & cursor at fugitive-object) | Mark the selected fugitive-object as Unstaged | ✅ |
d → v | (Git Status & cursor at fugitive-object) | Perform Git diff mode against the selected fugitive-object & split vertically | ✅ |
d → s | (Git Status & cursor at fugitive-object) | Perform Git diff mode against the selected fugitive-object & split horizontally | ✅ |
leader → g → h | Normal (Git Diff mode) | Keep contents of the left side | ✔️ |
leader → g → l | Normal (Git Diff mode) | Keep contents of the right side | ✔️ |
Ctrl + w → Shift + o | Normal (Git Diff mode) | Save file & quit Git Diff mode | ✔️ |
Key binding | Mode (Condition) | Command | Recursived? |
---|---|---|---|
leader → g → j | Normal | Jump to the next Hunk | ✔️ |
leader → g → k | Normal | Jump to the previous Hunk | ✔️ |
Key binding | Mode (Condition) | Command | Recursived? |
---|---|---|---|
Alt + d | Essentials | Select next word | ✅ |
g → Alt + d | Essentials | Select next key | ✅ |
leader → Alt + d | Essentials | Select all words | ✅ |
leader → g → Alt + d | Essentials | Select all keys | ✅ |
Alt + u | Essentials | Select previous word/key | ✅ |
Alt + x | Essentials | Skip current word | ✅ |
Esc | Essentials | Quit multi-cursor | ✅ |
Key binding | Mode (Condition) | Command | Recursived? |
---|---|---|---|
Ctrl + / | Normal + Visual + Select | Toggle comment for selected region | ✔️ |
For more information & examples, go to author's github. The following key bindings are only for common usecase.
Key binding | Mode (Condition) | Command | Recursived? |
---|---|---|---|
Shift + s + new surround | Visual + Select | Surround selected region with new surround | ✅ |
c → s → current surround → new surround | Essentials | Change from current surround to new surround | ✅ |
d → s → current surround | Essentials | Delete current surround | ✅ |
c → s → t → new surround | Essentials | Change circularly to new surround | ✅ |
Key binding | Mode (Condition) | Command | Recursived? |
---|---|---|---|
F12 | Essentials | Toggle markdown preview | ✅ |
Key binding | Mode (Condition) | Command | Recursived? |
---|---|---|---|
Tab | Insert (Popup Menu is visible) | Move to next suggestion | ✅ |
Shift + Tab | Insert (Popup Menu is visible) | Move to previous suggestion | ✅ |
Ctrl + j | Insert (Popup Menu is visible) | Move to next suggestion | ✅ |
Ctrl + k | Insert (Popup Menu is visible) | Move to previous suggestion | ✅ |
Enter | Insert (Popup Menu is visible) | Select current suggestion | ✅ |
Ctrl + leader | Insert | Open Popup Menu if CoC find any suggestion | ✅ |
g → d | Normal | Go to definition | ✔️ |
g → y | Normal | Go to type's definition | ✔️ |
g → i | Normal | Go to implementation | ✔️ |
g → r | Normal | Go to references | ✔️ |
g → h | Normal | Open documentation | ✅ |
leader → r → n | Normal | Rename symbol | ✅ |
leader → c → r | Normal | Restart CoC's server | ✅ |
leader → c → f | Normal + Visual + Select | Format selected region | ✔️ |
g → a | Normal + Visual + Select | Run selected codes's action for current file | ✔️ |
leader → f → c | Normal | Show list of Coc's commands | ✅ |
Key binding | Mode (Condition) | Command | Recursived? |
---|---|---|---|
Ctrl + b | Normal | Open CoC Explorer | ✅ |
? | (CoC Explorer is showing) | Open help | ✅ |
* | (CoC Explorer is showing) | Toggle Selection | ✅ |
. | (CoC Explorer is showing) | Toggle hidden | ✅ |
Shift + r | (CoC Explorer is showing) | Refresh | ✅ |
q | (CoC Explorer is showing) | Quit | ✅ |
Esc | (CoC Explorer is showing) | Esc | ✅ |
t | (CoC Explorer is showing) | Open selected file(s) in new tab(s) | ✅ |
h | (CoC Explorer is showing) | Collapse folder | ✅ |
l | (CoC Explorer is showing) | Expand folder if possible, else open | ✅ |
r → h | (CoC Explorer is showing) | Collapse recursively | ✅ |
r → l | (CoC Explorer is showing) | Expand recursively | ✅ |
Backspace | (CoC Explorer is showing) | Go to parent directory | ✅ |
Enter | (CoC Explorer is showing) | cd to folder is expandable, else open | ✅ |
y | (CoC Explorer is showing) | Copy file's path | ✅ |
Shift + y | (CoC Explorer is showing) | Copy file's name | ✅ |
c | (CoC Explorer is showing) | Copy selected file(s) | ✅ |
x | (CoC Explorer is showing) | Cut selected file(s) | ✅ |
p | (CoC Explorer is showing) | Paste selected file(s) | ✅ |
d | (CoC Explorer is showing) | Delete selected file(s) (to trash) | ✅ |
Shift + d | (CoC Explorer is showing) | Delete selected file(s) (forever) | ✅ |
a | (CoC Explorer is showing) | Add (create) new file | ✅ |
Shift + a | (CoC Explorer is showing) | Add (create) new folder | ✅ |
r | (CoC Explorer is showing) | Rename selected file(s)/folder(s) | ✅ |
f | (CoC Explorer is showing) | Search for file(s) | ✅ |
Shift + f | (CoC Explorer is showing) | Search for file(s) recursively | ✅ |
X | (CoC Explorer is showing) | Execute System's command | ✅ |