Created
May 3, 2017 14:45
-
-
Save jdforsythe/4e3f5e2f8c70b95474d43d2abfe04c49 to your computer and use it in GitHub Desktop.
Use Visual Studio Code as long command editor in Git Bash on Windows
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
## Bash lets you use CTRL+X CTRL+E to edit-and-execute a command | |
## This will allow you to set up VS Code as the editor for this (and other Bash edit functions) | |
echo "export VISUAL=\"code -n -w\"" >> ~/.bashrc | |
source ~/.bashrc | |
## Then when you're typing a long command and need to change something or otherwise want better | |
## editing control over a command, simply hit CTRL+X CTRL+E and edit the command, then save | |
## and exit VS Code and the command will execute | |
## For Sublime Text | |
echo "export VISUAL=\"subl -w\"" >> ~/.bashrc | |
source ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment