Working with shortcuts
Be more productive with Replit by learning the code editor’s powerful shortcuts for editing, writing, and inspecting code.
Command Palette
The command palette allows you to view all available commands based on your current context.
To access the command palette, press F1
or Ctrl+Shift+P
(cmd+shift+P
on a Mac). Note: If you are using Firefox, Ctrl+Shift+P
will open an incognito window, so use the F1
option instead.
Frequently Used Keyboard Shortcuts
The following keyboard shortcuts can be used in a variety of ways. If you forget a keyboard shortcut, check the command palette.
Moving the Current Line
On a Mac, press option+up
or option+down
to move the current line up or down.
On other computers, press alt+up
or alt+down
.
Clone the Current Line
On a Mac, press shift+option+up
or shift+option+down
to clone the current line above or below.
On other computers, press shift+alt+up
or shift+alt+down
.
Selecting Lines
On a Mac, press cmd+I
to select a line.
On other computers, press ctrl+I
.
Deleting Lines
On a Mac, press shift+cmd+K
to delete a line.
On other computers, press ctrl+shift+K
.
Inserting Lines
On a Mac, press shift+cmd+enter
to insert a line above.
On other computers, press ctrl+shift+enter
.
Adding Cursors
On a Mac, press cmd+option+up
or cmd+option+down
to add cursors above or below your current line.
On other computers, press ctrl+alt+up
or ctrl+alt+down
.
Find
On a Mac, press cmd+F
to find.
On other computers, press ctrl+F
.
Replace
On a Mac, press option+cmd+F
to replace.
On other computers, press ctrl+H
.
Find Next/Previous
On a Mac, press cmd+G
to find next or shift+cmd+G
to find previous.
On other computers, press F3
to find next or shift+F3
to find previous.
Adding Selections to Next Find Match
On a Mac, press cmd+D
to add a selection to the next find match.
On other computers, press ctrl+D
.
Navigation
Use the following shortcuts to navigate the editor.
Open Files
On a Mac, press cmd+P
to quickly open files.
On other computers, press ctrl+P
.
Go to Line
On a Mac, press cmd+G
to go to a specified line.
On other computers, press ctrl+G
.