Created
February 26, 2019 20:21
-
-
Save josefaidt/b106c1cdc230ffcd05693a2b8f9bda7e to your computer and use it in GitHub Desktop.
Ranger command: Open in VSCode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ranger.api.commands import Command | |
class code(Command): | |
""" | |
:code | |
Opens current directory in VSCode | |
""" | |
def execute(self): | |
dirname = self.fm.thisdir.path | |
codecmd = ["code", dirname] | |
self.fm.execute_command(codecmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment