Created
November 27, 2018 20:27
-
-
Save andre3k1/e1b791ae0402f31a2d3213c17c630899 to your computer and use it in GitHub Desktop.
Editing long shell commands in Sublime Text with edit-and-execute-command
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
## Editing long shell commands in Sublime Text with edit-and-execute-command | |
## | |
## | |
## Typing "subl" on command line will open Sublime Text by adding this symlink | |
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl ~/bin/subl | |
## | |
## | |
## Make Sublime Text the default editor... | |
## | |
## ...if using BASH | |
cat <<EOL >> ~/.bashrc | |
export VISUAL='subl -w' | |
export EDITOR="$VISUAL" | |
EOL | |
## | |
## ...or if using ZSHELL | |
cat <<EOL >> ~/.zshrc | |
export VISUAL='subl -w' | |
export EDITOR="$VISUAL" | |
EOL | |
## | |
## All done! Try typing Ctrl-x Ctrl-e | |
## | |
## Type (Ctrl-x Ctrl-e) on the command line to open the current line in | |
## Sublime Text, and once you save & close the Sublime window, your shell | |
## will execute the command. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment