Edit on Replit

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.

command palette

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.

move line

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.

clone line

Selecting Lines

On a Mac, press cmd+I to select a line.

On other computers, press ctrl+I.

select line

Deleting Lines

On a Mac, press shift+cmd+K to delete a line.

On other computers, press ctrl+shift+K.

delete line

Inserting Lines

On a Mac, press shift+cmd+enter to insert a line above.

On other computers, press ctrl+shift+enter.

insert line

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.

adding cursors

Find

On a Mac, press cmd+F to find.

On other computers, press ctrl+F.

find

Replace

On a Mac, press option+cmd+F to replace.

On other computers, press ctrl+H.

replace

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.

find next

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.

adding selections

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.

Open files

Go to Line

On a Mac, press cmd+G to go to a specified line.

On other computers, press ctrl+G.

go to line