{"id":144,"date":"2019-12-19T17:12:54","date_gmt":"2019-12-19T17:12:54","guid":{"rendered":"https:\/\/www.srivittal.com\/wp\/?p=144"},"modified":"2021-08-31T10:12:24","modified_gmt":"2021-08-31T09:12:24","slug":"create-a-new-explorer-file-folder-mac-touch-bar-extension-for-vscode","status":"publish","type":"post","link":"https:\/\/www.srivittal.com\/wp\/?p=144","title":{"rendered":"Create a new explorer file &#038; folder Mac Touch Bar extension for VSCode"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I was sitting and doing more ReactJS on my laptop when it became apparent that creating a new file using the Cmd+N shortcut ends up creating an Untitled-1 file, which then has to be saved into a specific path. There is no such shortcut (or I have not come across one) for creating a folder. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The easiest way to create a file or a folder in a specific path is by pressing the new file or new folder icon within the explorer as shown in the picture below<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"566\" height=\"78\" src=\"https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-19-at-17.02.10.png\" alt=\"\" class=\"wp-image-145\" srcset=\"https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-19-at-17.02.10.png 566w, https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-19-at-17.02.10-300x41.png 300w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Since I am creating lots of files and folders during the course of programming, it is cumbersome to move the mouse and click on these icons. I was trying to reduce the chances of RSI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After trawling through the Internet as usual, I stumbled upon an excellent article by Dan Kelch here <a href=\"https:\/\/spin.atomicobject.com\/2018\/01\/28\/vs-code-mac-touch-bar\/\">https:\/\/spin.atomicobject.com\/2018\/01\/28\/vs-code-mac-touch-bar\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Following his footsteps, I developed a simple extension that shows two icons on the Touch Bar like shown in the picture below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2170\" height=\"60\" src=\"https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/TouchBar.png\" alt=\"\" class=\"wp-image-146\" srcset=\"https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/TouchBar.png 2170w, https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/TouchBar-300x8.png 300w, https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/TouchBar-768x21.png 768w, https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/TouchBar-1536x42.png 1536w, https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/TouchBar-2048x57.png 2048w, https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/TouchBar-1600x44.png 1600w, https:\/\/www.srivittal.com\/wp\/wp-content\/uploads\/2019\/12\/TouchBar-780x22.png 780w\" sizes=\"auto, (max-width: 2170px) 100vw, 2170px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The entire source code can be downloaded from GitHub here <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/github.com\/testofwill22\/svil-new-explorer-ext\" target=\"_blank\">https:\/\/github.com\/testofwill22\/svil-new-explorer-ext<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please feel free to modify the code or extend it as required. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was sitting and doing more ReactJS on my laptop when it became apparent that creating a new file using the Cmd+N shortcut ends up creating an Untitled-1 file, which then has to be saved into a specific path. There is no such shortcut (or I have not come across one) for creating a folder. &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,70],"tags":[78,80,65,79,64],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-mac-osx","category-visual-studio-code","tag-development","tag-extensions","tag-javascript","tag-programming","tag-visual-studio-code","entry entry-center"],"_links":{"self":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=144"}],"version-history":[{"count":1,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions\/147"}],"wp:attachment":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}