Please DO NOT just copy this configuration folder without really looking at it! Please, at least, read this README file!
- Requirements
- After Installation, You Need To
- After Installation, You Might Want To
- Keyboard Shortcuts
- Plugins Keybindings (Screenshots/GIF provided!)
- Custom Snippets
- Some Weird Stuff
- This nvim configuration REQUIRES NeoVim 0.5.0+
- Install
pip
, and dopip install --user pynvim
- Install
pip3
, and dopip3 install --user pynvim
- Install
node
, and donpm install -g neovim
- Install nerd-fonts (actually it's optional but it looks real good)
- Do
:checkhealth
- Install
debugpy
(pip
)
- Well, make sure you have python
- See
_machine_specific.vim
- Install
ctags
for function/class/variable list
- Install
fzf
- Install
ag
(the_silver_searcher
)
- Install
figlet
for inputing text ASCII art - Install
xclip
for system clipboard access (Linux
andxorg
only)
k
: switchs to INSERT
: mode (same as key i
in vanilla vim)
Q
: quits current vim window (same as command :q
in vanilla vim)
S
: saves the current file (same as command :w
in vanilla vim)
IMPORTANT
Since the i
key has been mapped to k
, every command (combination) that involves i
should use k
instead (for example, ciw
should be ckw
).
Shortcut | Action | Equivalent |
---|---|---|
k |
Cursor up a terminal line | k |
j |
Cursor down a terminal line | j |
h |
Cursor left | h |
l |
Cursor right | l |
K |
Cursor up 5 terminal lines | 5k |
J |
Cursor down 5 terminal lines | 5j |
N |
Cursor to the start of the line | 0 |
I |
Cursor to the end of the line | $ |
Ctrl u |
Move the view port up 5 lines without moving the cursor | Ctrl y |
Ctrl e |
Move the view port down 5 lines without moving the cursor | Ctrl e |
E |
Move to the end of this word | e |
W |
Move cursor five words forward | 5w |
B |
Move cursor five words forward | 5b |
Shortcut | Action |
---|---|
Ctrl a |
Move cursor to the end of the line |
Ctrl u |
Move the character on the right of the cursor to the end of the line |
Shortcut | Action |
---|---|
u |
undo |
< |
Un-indent |
> |
Indent |
SPACE SPACE |
Goto the next placeholder (<++> ) |
Shortcut | Action |
---|---|
r |
Compile/Run the current file |
SPACE s c |
Toggle spell suggestion a |
SPACE d w |
Find adjacent duplicated word |
SPACE t t |
Convert every 4 Spaces to a tab |
SPACE o |
Fold |
SPACE - |
Previous quick-fix position |
SPACE + |
Next quick-fix position |
\ p |
Show the path of the current file |
SPACE / |
Create a new terminal below the current window |
Shortcut | Action |
---|---|
Y |
Copy selected text to system clipboard |
Shortcut | Action |
---|---|
s k |
Create a new horizontal split screen and place it above the current window |
s j |
Create a new horizontal split screen and place it below the current window |
s h |
Create a new vertical split screen and place it left to the current window |
s l |
Create a new vertical split screen and place it right to the current window |
s t h |
Set the two splits to be horizontal |
s r v |
Rotate splits and arrange splits vertically |
s r h |
Rotate splits and arrange splits horizontally |
Shortcut | Action |
---|---|
SPACE + w |
Move cursor to the next window |
SPACE + h |
Move cursor one window left |
SPACE + l |
Move cursor one window right |
SPACE + k |
Move cursor one window up |
SPACE + j |
Move cursor one window down |
Use the arrow keys to resize the current window.
Shortcut | Action |
---|---|
Q |
Close the current window |
S |
Save current file |
SPACE q |
Close the window below the current window.\n |
(The current window will be closed if there is no window below) |
Shortcut | Action |
---|---|
Ctrl``t |
Create a new tab |
t h |
Go one tab left |
t l |
Go One tab right |
t m h |
Move tab left |
t m l |
Move tab right |
Shortcut | Action |
---|---|
Ctrl n |
Escape from terminal input mode |
Shortcut | Action |
---|---|
Space y |
Get yank history list |
gd |
Go to definition |
gr |
List references |
gi |
List implementation |
gy |
Go to type definition |
Space r n |
Rename a variable |
Shortcut | Action |
---|---|
Ctrl l |
Expand a snippet |
Ctrl k |
(in snippet) Previous Cursor position in snippet |
Ctrl j |
(in snippet) Next Cursor position in snippet |
Shortcut | Action |
---|---|
tt |
Open file browser |
? |
show help (in explorer) |
- Make sure you have ranger installed
Press R
to open Ranger (file selector)
And Within rnvimr (ranger), you can:
Shortcut | Action |
---|---|
Ctrl t |
Open the file in a new tab |
Ctrl x |
Split up and down with the file |
Ctrl v |
Split left and right with the file |
Shortcut | Action |
---|---|
Ctrl p |
FZF Files |
Ctrl u |
Move up 1 item |
Ctrl e |
Move down 1 item |
Ctrl w |
FZF Buffers |
Ctrl f |
FZF Files' Content |
Ctrl h |
FZF Recent Files |
Ctrl t |
FZF Tags |
Shortcut | What it creates |
---|---|
to |
Cycle tab mode |
\p |
Show current path |
Shortcut | Action |
---|---|
SPACE t m |
Toggle table mode |
SPACE t r |
Realign table |
See :help table-mode.txt
for more.
Shortcut | Action |
---|---|
Shift + L |
Open Undotree |
u |
Newer Version |
e |
Older Version |
Shortcut | Action |
---|---|
Ctrl +k |
Select next key (multiple cursors) |
q |
Deselect the current keys (multiple cursors) |
- |
Select the previous key |
= |
Select the next key |
Esc |
Quit mutiple cursors |
To add surround (string
-> "string"
):
string
press: yskw'
:
'string'
To change surround
'string'
press: cs'"
:
"string"
New operator: s
:
You can execute s<motion>
to substitute the text object provided by the motion with the contents of the default register (or an explicit register if provided). For example, you could execute skw
to replace the current word under the cursor with the current yank, or skp
to replace the paragraph, etc.
Press ga
+ symbol in normal or visual mode to align text based on symbol
Press \
f
to format code
In markdown
files, type :Gen
then tab, you'll see your options.
Press T
to toggle function and variable list
Press SPACE
f
r
to search in cwd.
Shortcut | Action |
---|---|
H |
Show git hunk at current line |
SPACE g - |
Go to previous git hunk |
SPACE g + |
Go to next git hunk |
SPACE g f |
Fold everything except hunks |
Press Space
g
i
to create a .gitignore
file
Shortcut | Action |
---|---|
\ \ |
Show clock |
\ c |
Show calendar |
Press g
y
to toggle Goyo
Forgot to sudo vim ...
? Just do :sudowrite
or :sw
Press ts
to translate word under cursor.
Shortcut | What it creates |
---|---|
,n |
--- |
,b |
Bold text |
,s |
|
,i |
italic text |
,d |
code block |
,c |
big block of code |
,m |
- [ ] check mark |
,p |
picture |
,a |
link |
,1 |
# H1 |
,2 |
## H2 |
,3 |
### H3 |
,4 |
#### H4 |
,l |
-------- |
,f
to go to the next <++>
(placeholder)
,w
to go to the next <++>
(placeholder) and then press Enter
for you
tx Hello<Enter>
_ _ _ _
| | | | ___| | | ___
| |_| |/ _ \ | |/ _ \
| _ | __/ | | (_) |
|_| |_|\___|_|_|\___/
This NeoVim configuration includes a customized vertical cursor movement tailored for Colemak users. It can be located in cursor.vim
, and it serves as an alternative to the "number + up/down" key combination.
In order to move the cursor up x
lines, press the [
key, and treat the middle row of the Colemak keyboard layout ("arstdhneio") as number 1 to 0. Press the numbers that you'd like your cursor to move (x
) and press the space bar.
To move the cursor down, press the '
key instead of the [
key, and the rest would be the same.
Example:
Shortcut | Action |
---|---|
[ a o o SPACE |
Move the cursor up 100 lines |
' a r s SPACE |
Move the cursor down 123 lines |
[ d o SPACE |
Move the cursor up 50 lines |
Note: As of now, you may only move vertically up to 199 lines with this key configuration!