Created
May 17, 2016 17:16
-
-
Save stewhouston/77d0fbd0e42486bc71363b969295f7d1 to your computer and use it in GitHub Desktop.
Custom atom command to toggle the atom-typescript (TypeStrong) panel
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
# Atom Init Script (atom/init.coffee) | |
atom.commands.add 'atom-text-editor', 'custom:toggle-typescript-pane', -> | |
editor = atom.workspace.getActiveTextEditor() | |
tsPane = document.querySelector('.atomts') | |
if (!tsPane) | |
return | |
isHidden = tsPane.classList.contains('atomts-hidden') | |
if (!isHidden) | |
tsPane.classList.add('atomts-hidden') | |
else | |
tsPane.classList.remove('atomts-hidden') | |
# Atom Keymap (atom/keymap.cson) | |
'atom-text-editor': | |
'f1': 'custom:toggle-typescript-pane' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment