This README file provides a comprehensive guide to various Neovim shortcuts and their functionalities. It is organized by mode and categories to help you understand and efficiently use the commands in your workflow.
-
Add current file to list:
Space + a
- Adds the current file to the Harpoon list, which acts as a quick access list for frequently used files.
-
Toggle harpoon menu:
Ctrl + e
- Opens and closes the Harpoon menu, allowing you to view and select from your list of marked files.
-
Move to file at a specific number on Harpoon list:
Ctrl + h
(File 1)Ctrl + t
(File 2)Ctrl + n
(File 3)Ctrl + s
(File 4)- Quickly jump to a specific file in the Harpoon list using these shortcuts.
-
Move to next suggestion:
Ctrl + n
- Navigate to the next suggestion in the autocomplete list.
-
Move to previous suggestion:
Ctrl + p
- Navigate to the previous suggestion in the autocomplete list.
-
Select suggestion:
Ctrl + y
- Confirm and insert the currently highlighted suggestion.
-
Display info over what you’re hovering:
Shift + k
- Shows detailed information about the symbol or function currently under the cursor.
-
Search workspace for specific keyword:
Space + v + w + s
- Initiates a search across the entire workspace for a given keyword.
-
Rename all instances of the symbol you're hovering:
Space + v + r + n
- Renames all occurrences of the symbol under the cursor within the workspace.
-
Grep:
Space + p + s
- Opens the Grep search, allowing you to search for text patterns across your project.
-
Open find files:
Space + p + f
- Opens a file search dialog, making it easy to locate and open files by name.
-
Open find git:
Ctrl + p
- Searches for files specifically tracked by Git.
- Open terminal:
Ctrl + \
- Opens an embedded terminal within Neovim, useful for running shell commands without leaving the editor.
-
Open lazy git:
Space + l + g
- Opens the LazyGit interface, a terminal UI for Git operations.
-
Scroll up/down in main window:
Shift + k/j
- Scrolls up or down within the LazyGit main window.
-
Move between tabs in the windows on the left:
[
or]
- Navigates between different tabs in the LazyGit interface.
- Open undo tree:
Space + u
- Opens the Undo Tree, a visual representation of your editing history.
-
Open new window:
Ctrl + v + w
- Splits the current window vertically.
-
Move between windows:
Ctrl + w + w
- Cycles between open windows.
-
Up (20 lines):
Ctrl + u
- Scrolls up 20 lines.
-
Down (20 lines):
Ctrl + d
- Scrolls down 20 lines.
-
Brings the next line up to current line:
Shift + j
- Joins the line below with the current line.
-
Go back page:
Space + p + v
- Navigates to the previous page.
-
Copy:
y
- Copies the selected text.
-
Highlight entire word:
y + i + w
- Selects the entire word under the cursor and copies it.
-
Copy into clipboard:
Space + y
- Copies the selected text into the system clipboard.
-
Paste below:
Space + e + e
- Inserts the following template below the current line:
if err != nil { return err }
- Inserts the following template below the current line:
- Open git menu:
Space + g + s
- Opens the Git status menu.
-
Copy:
y
- Copies the selected text.
-
Copy into clipboard:
Space + y
- Copies the selected text into the system clipboard.
-
Paste:
p
- If pasted at the cursor then it will not be overwritten but if pasted over a selection then it will be overwritten.
-
Paste over selection without overwriting clipboard:
Space + p
- Pastes the clipboard content over the current selection without altering the clipboard.
- Move entire current line up/down:
Shift + j/k
- Moves the entire current line up or down.
- Highlight entire word:
i + w
- Selects the entire word under the cursor.
-
Move left:
h
-
Move down:
j
-
Move up:
k
-
Move right:
l
-
Move to beginning of the line:
0
-
Move to end of the line:
$
-
Move forward one word:
w
-
Move backward one word:
b
-
Move to the top of the screen:
H
-
Move to the middle of the screen:
M
-
Move to the bottom of the screen:
L
-
Move to the start of the file:
gg
-
Move to the end of the file:
G
-
Delete the word your cursor at the start of:
d + i
-
Delete the entire section of words until the next whitespace on either side:
d + i + W
-
Move to a specific line:
:line_number
- For example,
:10
moves to line 10.
- For example,
-
Run !chmod +x %< command:
Space + x
- Makes the current file executable.
-
Run JS file with node:
:!node &
- Runs the current file using node.
A tmux session is like a container, or a "box," where you can manage multiple terminal environments. This container is called a window. Inside a window, you can split the view into multiple panes, allowing you to work with different directories, instances of nvim
, or shell commands simultaneously. Each pane acts as a separate terminal, giving you a powerful way to multitask.
Ctrl + b
This key combination must be pressed before executing any tmux command.
c
Creates a new window and shows it in the status bar with its number and name.
,
Renames the current window for easy identification.
n
Switches to the next window in the session.
{number}
Press the number of the window (e.g., 1
, 2
, etc.) to switch directly to that window.
d
Detaches from the current session, allowing it to continue running in the background.
s
Opens a menu to navigate between different tmux sessions. Use x
in this menu to kill a window.
%
Splits the current window into two panes side by side.
"
Splits the current window into two panes stacked on top of each other.
l
Quickly switch back and forth between the last two windows you used.
Ctrl + b
followed by arrow keys
Use arrow keys after the prefix to resize the current pane in the desired direction.
x
Closes the current pane.
&
Closes the current window and all its panes.
:setw synchronize-panes on
When this is enabled, any command you type in one pane will be mirrored in all panes of the window. Disable it with :setw synchronize-panes off
.
[
Enter copy mode to scroll back through the buffer or select text. Use q
to exit.
]
Paste the last copied text from the tmux buffer into the current pane.
If Ctrl + b
is not comfortable, you can change it. For example, change it to Ctrl + a
by adding this line to your .tmux.conf
file:
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
- Switch between sessions:
s
- This will bring up a menu in which you can navigate between sessions
- Inside this menu you can use just
x
to delete a window