Skip to content

Instantly share code, notes, and snippets.

@jacob-ogre
Created June 12, 2013 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacob-ogre/5769419 to your computer and use it in GitHub Desktop.
Save jacob-ogre/5769419 to your computer and use it in GitHub Desktop.
Close the pseudo-NerdTree and return focus in Sublime Text 2
import sublime, sublime_plugin
class NerdTreeCloseCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.run_command("focus_group", {"group": 0} )
self.window.run_command("toggle_side_bar")
@jacob-ogre
Copy link
Author

I use 'nt' in Vim to toggle NerdTree; in ST2, to avoid any conflict, use 'nt' to open and 'tn' to close the sidebar (and return focus to group 0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment