JumpStart Live (JSL)
There are number of ways to split your screen, and move your windows around, a few options are listed below
- Native to MacOSX, use Desktops and Split Views
- Install Spectacle (Free)
- Install Moom ($10)
- Install Divvy ($13.99)
When programming you should always have a Terminal window open
cmd+spacebar
to open spotlight, then type Terminal- Drag Terminal to your Dock (if it's not already there)
Command | Description |
---|---|
cmd + K |
clear your screen |
touch <filename> |
creates a new file named filename |
pwd |
prints the working directory (displays the full path of the current directory) |
cd |
choose a directory |
cd .. |
go back a directory |
cd ~ |
choose home directory |
ls |
list the items in the directory |
ls -a |
list the items in the directory, including hidden files |
mkdir |
make a new directory |
rm <filename> |
removes the file named filename |
rm -r <dirname> |
removes the directory (and everything in it) named dirname |
↑ | view the previous command |
ctrl + a |
go to beginning of line |
ctrl + e |
go to end of line |
alt + → |
move to the right, one word |
alt + ← |
move to the left, one word |
ctrl + c |
interrupt or stop a command |
Command | Description |
---|---|
irb |
start interactive ruby session |
exit |
exit an irb session |
ctrl + c |
interrupt or stop a command |
- Type
ruby
followed by the name of the Ruby file (e.g.,ruby hello_world.rb
)
- If VS Code is not already in your Applications folder move it there
- In VS Code, type
shift-command-p
and type shell command to install the terminal shell command. - Now, to launch VS Code from terminal, type
code
followed by the file name or directory name
If you are running a Mac computer with an operating system prior to Catalina your terminal uses a shell (command-line program) called Bash. You can customize your Bash shell with a unique prompt and other items.
.bash_profile
is a hidden file in your user directory that you can edit to customize the terminal prompt (among a number of other things)- Type
code ~/.bash_profile
to open it (if it doesn't already exist, this command will create it)
PS1
is the environment variable for the bash promptPS1
stands for Prompt String 1, there is alsoPS2
,PS3
, andPS4
- The default string stored in
PS1
is\s-\v\$
- To change
PS1
, addexport PS1=" "
to your.bash_profile
(no spaces on either side of the equal sign) - Add anything in the quotes that you would like (some options below)
\s
– name of shell (e.g., bash)\v
– version of bash\d
– current date\t
– current time\u
– user name\W
– current working directory- You can even add emoji, in Code, click Edit > Emjoi & Symbols
- When you are done editing, save in VS Code and then type
source ~/.bash_profile
in Terminal to apply the changes
If you are running Catalina, the latest Mac operating system, you are probably using the zsh shell. There is a wonderful tutorial on sriptingosx.com which walks you through different ways to customize zsh. I particularly like the part on git integration.
To customize your zsh shell you can edit or create the ~/.zshrc
file and put your configurations in there. There is also a nice zsh plugin called ohmyzsh.
- Ada Workflow Video (~13 min)