Skip to content

Interacting with serve with ease via VSCode

Serve is usually a share space where multiple users sharing the computational resources. Therefore, it is important to remember that the server can go down,… So, it’s important to backup your work, especially the codes, via Github, for example. For heavy items like the model weights or private things like API keys, you can ignore them by using git ignore.

How to browser files on serve interactively using VSCode

In this box, select Show and Run Commands:

Search File > Open folder as circled red in this image:

Click on it, paste in the path and then press OK.

Now, on the left panel of VSCode, you may see something like this

Now, you can right click a folder or a file and options like Download, Cut, Copy, will pop up as in the following figure:


Useful Visual Studio Code shortcuts

🔎 Navigation

ActionWindows / LinuxmacOS
Quick file openCtrl + PCmd + P
Go to symbol in fileCtrl + Shift + OCmd + Shift + O
Go to lineCtrl + GCmd + G
Go to definitionF12F12
Peek definitionAlt + F12Option + F12
Go back / forwardAlt + ← / →Ctrl + - / Ctrl + Shift + -

✏️ Editing

ActionWindows / LinuxmacOS
Copy line down/upShift + Alt + ↓ / ↑Shift + Option + ↓ / ↑
Move line down/upAlt + ↓ / ↑Option + ↓ / ↑
Delete lineCtrl + Shift + KCmd + Shift + K
Duplicate lineShift + Alt + ↓Shift + Option + ↓
Toggle commentCtrl + /Cmd + /
Block commentShift + Alt + AShift + Option + A

🧠 Multi-Cursor (Super Powerful)

ActionWindows / LinuxmacOS
Add cursor above/belowCtrl + Alt + ↑ / ↓Cmd + Option + ↑ / ↓
Select next occurrenceCtrl + DCmd + D
Select all occurrencesCtrl + Shift + LCmd + Shift + L
Column selectionShift + Alt + DragShift + Option + Drag

🔍 Search & Replace

ActionWindows / LinuxmacOS
Find in fileCtrl + FCmd + F
Replace in fileCtrl + HCmd + Option + F
Global searchCtrl + Shift + FCmd + Shift + F
Replace in projectCtrl + Shift + HCmd + Shift + H

🧰 Productivity

ActionWindows / LinuxmacOS
Command paletteCtrl + Shift + PCmd + Shift + P
Quick fix / suggestionsCtrl + .Cmd + .
Rename symbolF2F2
Format documentShift + Alt + FShift + Option + F
Show problems panelCtrl + Shift + MCmd + Shift + M

🗂️ Tabs & Panels

ActionWindows / LinuxmacOS
Switch tabCtrl + TabCmd + Tab
Close tabCtrl + WCmd + W
Split editorCtrl + \Cmd + \
Toggle terminalCtrl + `Cmd + `

💡 Tip:
The single most powerful shortcut in VS Code is:

See also  submitted a job but don't see it in the SLURM queue

Ctrl + Shift + P (or Cmd + Shift + P)
→ Opens the Command Palette where you can access almost everything.

Leave a Reply

error: Content is protected !!