Coder Social home page Coder Social logo

open-folder-with-vs-code's Introduction

open-folder-with-vs-code

A Finder toolbar icon to open current selected file/folder with VS Code.

How to use?

How to create the app manually?

Open AppleScript Editor, copy the following source and export as Application.

(*
 Open in VS Code
 To use:
  * Drag Open In VS Code to the toolbar of any finder
  window to add it to the toolbar
*)

on run
	tell application "Finder"
		if selection is {} then
			set finderSelection to folder of the front window as string
		else
			set finderSelection to selection as alias list
		end if
	end tell
	
	subl(finderSelection)
end run

-- script was drag-and-dropped onto
on open (theList)
	subl(theList)
end open

-- open in Visual Studio Code
on subl(listOfAliases)
	tell application "Visual Studio Code"
		activate
		open listOfAliases
	end tell
end subl

Looking the same thing for Sublime?

Please see this repo open-folder-with-sublime

Credits

Thanks for the following github users for feedback & suggestion:

For icons, you can find them here:

open-folder-with-vs-code's People

Contributors

hamxiaoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

open-folder-with-vs-code's Issues

I Made Some Dark Icons

Howdy!

Thanks for sharing your shortcuts! I got them up and running with no trouble.

To match the colour-scheme of my system, I made some "dark mode" icons and thought I'd share if you or anyone else wanted them.

dark-icons-preview

Cheers!

dark-icons.zip

Incorrect comment in README.md

README says - its a commented line -

-- open in Sublime Text

it should actually say

-- open in Visual Studio Code

so as to not confuse the reader. There is a different github page for Sublime Text finder icon, where it correctly says 'open in Sublime Text'

Not an issue

Hi, this is not an issue, But I wanted to just say thank you for putting together this little script and for taking the time to not only post it, but also adding a few screenshots, and a 'how to recreate with applescript' section.

I'll get a lot of use out of this and I really appreciate that you put it out there.

Thank you!

  • Jack

(PS, if there is another way for someone to contact an author outside of the "issues" area, I don't know what it is, please let me know!)

cmd+Q Problem...

When I quit open VSCode windows with cmd+Q, and open another folder with this shortcut, all the closed windows reopen. It doesn't happen when I close from the button on the top. I am a TA for a CS course and close/open many folders to check student work, it would be great if you fix this.
I am on VSCode 1.50.1 and macOS Catalina 10.15.7.

Cant handle Command+Q correctly

  1. open folder1, click the icon to open a VScode Instance
    2.open folder2,click the icon to open a VScode Instance

  2. hit Command + Q to close all instance

  3. open folder1,click the icon open 2 VScode instance. Expect: open instance for folder1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.