DEV Community

özkan pakdil
özkan pakdil

Posted on • Originally published at ozkanpakdil.github.io on

Add `open with vscode` into context menu in linux mint cinnamon

one liner for bash

cat << EOF > ~/.local/share/nemo/actions/vscode.nemo_action
[Nemo Action]
Name=Open in VS Code
Comment=Open in VS Code
Exec=code "%F"
Icon-Name=visual-studio-code
Selection=Any
Extensions=dir;
EOF
Enter fullscreen mode Exit fullscreen mode

Add code below to ~/.local/share/nemo/actions/vscode.nemo_action

[Nemo Action]
Name=Open in VS Code
Comment=Open in VS Code
Exec=code "%F"
Icon-Name=visual-studio-code
Selection=Any
Extensions=dir;

Enter fullscreen mode Exit fullscreen mode

Then in files go to folder you want to open with VScode then right click and choose open in VS Code.

Top comments (5)

Collapse
 
geometrian profile image
agatha

Very useful, thanks! Note, however, that this will fail if the path contains spaces. You can fix that by changing the single Exec line to the following three lines:

Exec=code %F
Quote=Double
EscapeSpaces=false
Enter fullscreen mode Exit fullscreen mode
Collapse
 
smgh_smgh_6f559e984323f2d profile image
Smgh Smgh

Thank you soooooooo much

Collapse
 
zeuspod profile image
ZeusPod

thanks man

Collapse
 
trancadev profile image
Fran

Thanks!

Collapse
 
carlos_alvarado_a141d2eb5 profile image
Carlos Alvarado

Perfect, thank you very much..

Some comments may only be visible to logged-in visitors. Sign in to view all comments.