Thursday, January 2, 2014

Terminal command shortcut for Windows, Mac and Visual Studio Code

For Windows

start .
open Windows File Explorer at the current folder of command line console. 

code .
open Visual Studio Code at the current folder of command line console.

 
For MAC

Command+T
create a new tab

Command+D
split terminal window

Command+shife+D
unsplit terminal window

Command+option +D
hide or show dock bar

open .bash_history
open terminal history in editor

history
display all terminal history

alias name='command text'
Create a command alias for current terminal session. The alias must be the first word when run from the terminal. Set the alias to profile if the alias is used for every terminal window.

Note, when running .sh file from mac terminal, first you need to set it executable file attribute with
chmod +x myshell.sh
In addition, bash command does not search the current directory for the file to run, so you need to specify the full path to run it as below (assume the shell file is in the current directory)
./myshell.sh


For Visual Studio Code OnWindows

Shortcut for visual studio code on Windows
to open a file in new VS code window, first select the file, then Ctrl + K, and O

Comment a block of code in visual studio code on Windows
select the block of code, then Ctrl + K + C to comment,
Ctrl + K + U to uncomment.


For Chrome Debugger on Windows

Ctrl + O to open the javascript source file based on file name.

No comments:

Post a Comment