Skip to content

cuongvuong-phoenix/neovim-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeoVim configurations

Installation

  1. Clone the repository into ~/.config/nvim:

    git clone --depth=1 https://github.com/vuong-cuong-phoenix/neovim-config.git $HOME/.config/nvim
  2. 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'
  3. Open nvim and :PlugInstall to install all the plugins.

Customized Keyboard Shortcuts

LHS + RHS: Hold LHS then press RHS in the same time. LHSRHS: 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).

Core

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
tl Normal Select next tab
th Normal Select previous tab

Plugins/Extensions

Key binding Mode (Condition) Command Recursived?
Ctrl + p Normal Start FzF to find files/contents
leaderfb Normal Show all buffers
leaderfh 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?
leadergs Normal | :Gstatus | Open Git Status by Fugitive ✔️
gq (Fugitive is running) Quit Fugitive (:Git)
Enter (Git Status & cursor at fugitive-object) | :Gedit: | Edit the selected fugitive-object
cc (Git Status) | :Gcommit | Commit Staged file(s)
sEnter (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
dv (Git Status & cursor at fugitive-object) Perform Git diff mode against the selected fugitive-object & split vertically
ds (Git Status & cursor at fugitive-object) Perform Git diff mode against the selected fugitive-object & split horizontally
leadergh Normal (Git Diff mode) Keep contents of the left side ✔️
leadergl Normal (Git Diff mode) Keep contents of the right side ✔️
Ctrl + wShift + o Normal (Git Diff mode) Save file & quit Git Diff mode ✔️
Key binding Mode (Condition) Command Recursived?
leadergj Normal Jump to the next Hunk ✔️
leadergk Normal Jump to the previous Hunk ✔️
Key binding Mode (Condition) Command Recursived?
Alt + d Essentials Select next word
gAlt + d Essentials Select next key
leaderAlt + d Essentials Select all words
leadergAlt + 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
cscurrent surroundnew surround Essentials Change from current surround to new surround
dscurrent surround Essentials Delete current surround
cstnew 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
gd Normal Go to definition ✔️
gy Normal Go to type's definition ✔️
gi Normal Go to implementation ✔️
gr Normal Go to references ✔️
gh Normal Open documentation
leaderrn Normal Rename symbol
leadercr Normal Restart CoC's server
leadercf Normal + Visual + Select Format selected region ✔️
ga Normal + Visual + Select Run selected codes's action for current file ✔️
leaderfc 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
rh (CoC Explorer is showing) Collapse recursively
rl (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

About

My personal neovim configurations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published