- Initial System Setup
- Purpose
- Installation
- Pre-setup
- Fonts
- Brew & NPM Installs
- Safari Extensions
- Apps
- Sublime Text 3
- Package Control
- Environment & Interface
- Coding
- Customization
- iTerm
- zsh
- Git
- Sublime Text 3
- Icon
- User Settings
- User Key Bindings
- Theme Scheduler Settings
- View In Browser Settings
- Table of comments Settings
- LineEndings Settings (deprecated)
- Syntax Specific Settings: HTML & CSS
- Xcode
The purpose of this project is to setup a freshly formatted OS X system to my personal preference.
Perform the following in order:
- Install Xcode and Xcode command line tools.
- Agree to Xcode license.
- Install Homebrew. (Should be automatically done in
initialSystemSetupScript.sh
)
Install the following fonts:
- Source Code Pro
- Operator Mono (Located in Fonts directory.)
Run
initialSystemSetupScript.sh
to do majority of the install work. Check the script for better understanding.
- Streak
- uBlock
- f.lux
- Install Package Control, a package manager for Sublime.
- Look for it on google. Copy paste the installer script in the console.
- Open Command Palette by pressing Super+Shift+P. (Super is cmd key on mac)
- Check installation by searching for Package Control in the command palette.
Install the following sublime packages using the package control.
Theme | Helper | Keyboard |
---|---|---|
Material Theme | SideBarEnhancements | FindKeyConflicts |
ThemeTweaker | AutomaticFullscreen | Keymaps |
ThemeScheduler | ReadmePlease | |
Themes Menu Switcher | MarkAndMove |
Install the following sublime packages using the package control.
Helper | Commenting & Documentation | Web | Markdown |
---|---|---|---|
All Autocomplete | Comment-Snippets | Emmet | Markdown Preview |
SublimeCodeIntel | Center Comment | View In Browser | MarkdownTOC |
BracketHighlighter | Fold Comments | HTML5 | |
HyperlinkHelper | Table of comments | HTML-CSS-JS Prettify | |
Line Endings Unify | Readme-Helper | ||
Surround |
- Surround: Trial removal. Newer versions seems to take care of this functionality.
- Import & load color presets from Material Color Scheme.
- Set the text font to 13pt Operator Mono Light.
- Set vertical character spacing to 1.3 and horizontal character spacing to roughly the 6th tick.
- Change the Tab theme from Appearance section to Dark.
- Change the Closing settings from the General tab
- Uncheck 'Confirm closing multiple sessions'.
- Uncheck 'Confirm "Quit iTerm2...'
- Fullscreen mode by default
- Switch to fullscreen mode.
- Window > Save Window Arrangement
- Name it "Fullscreen"
- Preference > Arrangements > Select Fullscreen > Set Default
- Preference > General > Startup > Open Default Window Arrangement
-
Add the custom aliases in oh-my-zsh custom directory
~/.oh-my-zsh/custom
# Example (~/.oh-my-zsh/custom/customize.zsh): # alias chrome="osascript -e 'activate application \"Google Chrome\"' && /opt/homebrew-cask/Caskroom/google-chrome/latest/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" alias chrome="open -a Google\ Chrome" alias safari="open -a Safari" alias cd_projects="cd /Volumes/SeagateSlimC/Projects/" alias cd_coursera="cd /Volumes/SeagateSlimC/Projects/Coursera/" alias cd_tdev="cd /Volumes/SeagateSlimC/Projects/Topcoder/Develop/" alias cd_udacity="cd /Volumes/SeagateSlimC/Projects/Udacity/" alias cd_ios_apps="cd /Volumes/SeagateSlimC/Projects/Udacity/Nanodegrees/iOS/Apps" alias vlc="open -a vlc" # Make & simultaneously change directory path mcd () { mkdir -p -- "$1" && cd -P -- "$1" }
-
You might want to add a newline before each prompt. Add the following in
~/.zshrc
at the end# For robbyrussell theme, insert a newline before each prompt export PROMPT=$'\n'$PROMPT
-
Set sublime text as default text editor for git
git config --global core.editor "code --wait --new-window"
-
Apply the color settings
git config --global color.ui auto
-
Also add the following git config commands
git config --global push.default upstream git config --global merge.conflictstyle diff3
-
User settings
git config --global user.email "YOUR_EMAIL_ADDRESS"
-
Line endings
git config --global core.autocrlf input # Configure Git on OS X or Linux to properly handle line endings # git config --global core.autocrlf true # Configure Git on Windows to properly handle line endings
-
SSH Login
- Create ssh folder
mcd ~/.ssh/
- Generate Key pairs (private and public keys) for different ids with:
ssh-keygen -t rsa -b 4096 -C "YOUT_EMAIL_ADDRESS"
- Config file (~/.ssh/config). Code for reference:
# Reference: # https://help.github.com/articles/using-ssh-over-the-https-port/ # https://about.gitlab.com/2016/02/18/gitlab-dot-com-now-supports-an-alternate-git-plus-ssh-port/ # https://confluence.atlassian.com/bitbucket/configure-multiple-ssh-identities-for-gitbash-mac-osx-linux-271943168.html # Default GitHub user # =================== Host github.com # Uncomment following line if default ssh port is not blocked. # HostName github.com # Comment following 2 lines if default ssh port is not blocked. Hostname ssh.github.com Port 443 PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa_compscience # Old GitHub user # =============== Host old.github.com # Uncomment following line if default ssh port is not blocked. # HostName github.com # Comment following 2 lines if default ssh port is not blocked. Hostname ssh.github.com Port 443 PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa_phoenix # Default Gitlab user # =================== Host gitlab.com # Uncomment following line if default ssh port is not blocked. # HostName gitlab.com # Comment following 2 lines if default ssh port is not blocked. Hostname altssh.gitlab.com Port 443 PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa_compscience # macOS Sierra 10.12.2 or later # ============================= Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_rsa_compscience IdentityFile ~/.ssh/id_rsa_phoenix # Support for Professional id (deprecated) # Default GitHub user # =================== Host Professional # Uncomment following line if default ssh port is not blocked. # HostName github.com # Comment following 2 lines if default ssh port is not blocked. Hostname ssh.github.com Port 443 PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa_compscience
- Add each public key to their respective github or gitlab etc. accounts.
# Copy public key to clipboard pbcopy < PATH_TO_PUBLIC_KEY
- Ensure ssh-agent is running
eval "$(ssh-agent -s)"
- Add private keys in ssh-agent
# See all the keys already added to ssh-agent ssh-add -l # Delete (if needed) cached keys and list the keys again to double check ssh-add -D ssh-add -l # Add new keys and list the keys again to double check ssh-add PATH_TO_PRIVATE_KEY ssh-add -l
- Test (Should get a successful authentication or welcome message.)
# Example Test ssh -T git@github.com
Change the icon for Sublime Text using the instructions in Readme provided with the icons.
{
"added_words":
[
"Xcode",
"Homebrew",
"Pre"
],
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Lighter.tmTheme",
"font_face": "Operator Mono",
"font_size": 13,
"ignored_packages":
[
"Vintage"
],
"ignored_words":
[
"depth=0"
],
"line_padding_bottom": 3,
"line_padding_top": 3,
"material_theme_small_statusbar": true,
"material_theme_small_tab": true,
"show_line_endings": true,
"tab_size": 4,
"theme": "Material-Theme-Lighter.sublime-theme",
"trim_trailing_white_space_on_save": true
}
[
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+shift+/"], "command": "toggle_fold_comments" },
{ "keys": ["super+shift+m"], "command": "center_comment" },
{ "keys": ["super+shift+c"], "command": "expand_selection_to_paragraph"},
{ "keys": ["f1"], "command": "table_of_comments" },
{ "keys": ["alt+up"], "command": "table_of_comments", "args":{ "move":"up" } },
{ "keys": ["alt+down"], "command": "table_of_comments", "args":{ "move":"down" }},
{ "keys": ["alt+shift+t"], "command": "surround_selection"},
{ "keys": ["alt+shift+c"], "command": "surround_change"},
{ "keys": ["alt+shift+d"], "command": "surround_delete"},
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["super+m"], "command": "mark_and_move_do_it_all"},
]
{
"enabled": true,
"themes": [
{
"theme": "Packages/Material Theme/schemes/Material-Theme-Lighter.tmTheme",
"ui_theme": "Material-Theme-Lighter.sublime-theme",
"filters": "brightness(0.95)@fg",
"time": "6:00"
},
{
"theme": "Packages/Material Theme/schemes/Material-Theme-Lighter.tmTheme",
"ui_theme": "Material-Theme-Lighter.sublime-theme",
"filters": "brightness(0.90)@fg",
"time": "9:00"
},
{
"theme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"ui_theme": "Material-Theme.sublime-theme",
"time": "17:00"
},
{
"theme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"ui_theme": "Material-Theme.sublime-theme",
"filters": "brightness(1.15)@fg",
"msg": "Prep for sleep now son... don't mess this up.",
"time": "19:00"
}
]
}
Depends upon the setup.
{
"browser": "safari"
}
Access through the command palette.
{
"toc_char" : "\t",
"toc_title": "- - Document Outline - -", // Title to display (and look for) for table of contents creation
"toc_line": "\t", // Prefix of each line within table of contents
"comment_chars": "/*#|=-"
}
{
// show an alert when the line ending is on the list.
"alert_when_line_ending_is" : ["Windows"],
//example: "alert_when_line_ending_is":["Windows","Unix","CR"]
}
{
"save_on_focus_lost": true
}
- Import all the color themes from Xcode folder.
- Preferences >
- Accounts
- Add Apple Id
- Fonts & Colors
- Set Solarized Light 2 as default theme.
- Text Editing
- Line numbers
- Page guide at column 80
- Key Bindings > Conflicts
- Move Subword Forward (Selection) ^⌥➞
- Move Subword Backword (Selection) ^⌥←
- Accounts