Skip to content

Keymappings

hαrsh vαirαgi edited this page Jul 15, 2025 · 6 revisions

Keyboard shortcuts for code-editor

Customizations

You can edit the file ~/.code-editor/src/lua/user/keymaps.lua, if you really need to change some key mappings. Make sure to test that key mappings do not conflict with each other.

Default keyboard shortcuts

These are the instructions and shortcut keys in various modes.

Normal Mode

These are some of the shortcut keys mentioned here for normal mode.

Shortcut Description
. Repeat last command or shortcut key
~ Change case of character under cursor
dd Cut current line
>> Add indent (shift right) to current line
<< Remove indent (shift left) from current line
f Folds current block of code into single line
space Unfolds current block of code
ctrl + f Folds all block into their specific blocks
ctrl + j Unfolds all block of codes.
alt + e Open file explorer
alt + r Run current file
ctrl + q Close current file
alt + q Close all files
ctrl + t Open terminal like vscode
shift + r rename all references of selected document

These are some shortcuts that work on the file explorer tab.

Shortcut Description
enter or ctrl + o Open the file
right Open the folder
left Close the folder
q Close the file explorer
ctrl + n Create new file
ctrl + x Cut file
ctrl + c Copy file
ctrl + v Paste file
ctrl + d Delete file

Insert Mode

These are some of the shortcut keys mentioned here for insert mode.

Shortcut Description
i To use insert mode
a To use insert mode (cursor shift one letter forward)
o To use insert mode (cursor shift to a new blank line)
ctrl + c Copy whole line
ctrl + v Paste
ctrl + up Shift the current line upwards (use arrow key)
ctrl + down Shift the current line downwards (use arrow key)
ctrl + u Undo
ctrl + r Redo
ctrl + d Duplicate current line
ctrl + s Save
ctrl + q Save and exit

These shortcut keys work when auto completions will start displaying from language servers.

Shortcut Description
alt + up Scroll autocompletion upwards
alt + down Scroll autocompletion downwards
alt + c Abort autocompletions
enter Select autocompletion option

Visual Mode

These are some of the shortcut keys mentioned here for visual mode after selecting or highlighting text.

Shortcut Description
d or backspace Delete selected text
y Copy selected text
> Indent selected lines
< Unindent selected lines

Visual Block Mode

These are some instructions mentioned here for visual block mode because visual block mode has no keyboard shortcuts but instructions only.

Clone this wiki locally