Oh my zsh
Install oh my Zsh¶
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Install Powerline fonts¶
git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh
Change the Theme to “agnoster”¶
- Open ~/.zshrc file in vi
- Change the theme to agnoste and save the file
ZSH_THEME="agnoster"
Quit ITerm2 and reopen it.¶
Set Powerline font¶
Open ITerm2 > Preferences > Profiles > Text > Change Font and set it to something that has “for Powerline”.
Meslo LG s for Powerline
Install iTerm2 “color schemes” (ITerm2 Themes)¶
- Clone https://github.com/mbadolato/iTerm2-Color-Schemes
cd /tmp git clone https://github.com/mbadolato/iTerm2-Color-Schemes.git
-
The “Schemes” folder contains all the color scheme files — they end with .itermcolors
-
Open iTerm2 > Preferences > Profile > Colors > Color Presets > Import
- In the import window, navigate to the “Schemes” folder (from step 2)
- Select all the files so you can import all the color schemes at once
- Simply select whichever color scheme you like.
- My favorites are Batman and Argonaut and Synthwave
Add Syntax Highlighting and ZSH-AutoSuggestion Plugins¶
`git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting`
`git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions`
~/.zshrc
by adding zsh-syntax-highlighting
and zsh-autosuggestions
to the Plugins section
- Open
~/.zshrc
and add to the Plugins section
Exmaple:
plugins=(
brew
colorize
colored-man-pages
docker
dirhistory
git
macos
pip
python
web-search
zsh-autosuggestions
zsh-syntax-highlighting
)
Install K plugin (Optional)¶
brew install coreutils
git clone https://github.com/supercrabtree/k $ZSH_CUSTOM/plugins/k
Add autojump¶
Install autojump
brew install autojump
~/.zshrc
if autojump is installed in /usr/local/ folder
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
add the following line to ~/.zshrc
if autojump is installed in /opt/homebrew folder
[ -f /opt/homebrew/etc/profile.d/autojump.sh ] && . /opt/homebrew/etc/profile.d/autojump.sh
Fix prompt¶
- add the following line to .zshrc
prompt_context(){}
Modify aliases¶
complete -o nospace -C /usr/local/bin/terraform terraform
alias awscli="aws-azure-login --mode=gui"
alias python=~/venv/python3/bin/python
alias pip=~/venv/python3/bin/pip3
zsh slow pasting¶
First, edit the misc.zsh file.
vim $ZSH/lib/misc.zsh
Second, Comment the following code.
--- a/lib/misc.zsh
+++ b/lib/misc.zsh
@@ -5,11 +5,11 @@ if [[ $ZSH_VERSION != 5.1.1 ]]; then
for d in $fpath; do
if [[ -e "$d/url-quote-magic" ]]; then
if is-at-least 5.1; then
- autoload -Uz bracketed-paste-magic
- zle -N bracketed-paste bracketed-paste-magic
+ # autoload -Uz bracketed-paste-magic
+ # zle -N bracketed-paste bracketed-paste-magic
fi
- autoload -Uz url-quote-magic
- zle -N self-insert url-quote-magic
+ # autoload -Uz url-quote-magic
+ # zle -N self-insert url-quote-magic
break
fi
done
You can also do:
After the latest update (run upgrade_oh_my_zsh), you can add DISABLE_MAGIC_FUNCTIONS=true to your zshrc (before OMZ is sourced) to bypass the loading of these functions.
Fix agnoster theme issue in vscode.¶
Clone the Meno-for-Powerline font
git clone https://github.com/abertsch/Menlo-for-Powerline.git
Add the font to the Mac:
- Open folder in Finder where the fonts were cloned from gitlab (Menlo-for-Powerline)
- Double click on Menlo for Powerline.ttf
- This will open Fontbook. Click on Install font to install this font
- Change the default font of the vscode terminsl by adding the followng line to
settings.json
"terminal.integrated.fontFamily": "Menlo for Powerline"
VS Code settings¶
{
"workbench.colorTheme": "Atom One Dark",
"workbench.startupEditor": "newUntitledFile",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[terraform]": {
"editor.defaultFormatter": "hashicorp.terraform"
},
"editor.fontSize": 12,
"editor.codeLens": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"editor.wordWrap": "on",
"editor.minimap.enabled": false,
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.python",
"editor.formatOnType": true
},
"python.envFile": "${workspaceFolder}/PythonEnv",
"python.languageServer": "Pylance",
"python.analysis.autoImportCompletions": true,
"python.pythonPath": "~/venv/python3/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.flake8Enabled": false,
"python.linting.enabled": true,
"python.venvFolders": ["~/venv"],
"python.formatting.autopep8Args": ["--max-line-length=120"],
"python.analysis.extraPaths": [
"AA-API/app",
"cicd-templates-dap20/app",
"./"
],
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"vs-kubernetes": {
"vs-kubernetes.minikube-path.mac": "/Users/jeevandk/.vs-kubernetes/tools/minikube/darwin-amd64/minikube",
"vs-kubernetes.knownKubeconfigs": [
"/Users/jeevandk/.kube/MicroK8S_t470s",
"/Users/jeevandk/.kube/OCEAN-PA-EUC1-DEV",
"/Users/jeevandk/.kube/OCEAN-PA-EUC1-TST",
"/Users/jeevandk/.kube/OCEAN-PA-EUC1-UAT",
"/Users/jeevandk/.kube/PA-OP-DEV",
"/Users/jeevandk/.kube/PA-OP-PRD",
"/Users/jeevandk/.kube/KF-OP-UAT",
"/Users/jeevandk/.kube/PA-EU-PROD",
"/Users/jeevandk/.kube/PA-US-DEV",
"/Users/jeevandk/.kube/PA-US-PROD",
"/Users/jeevandk/.kube/PA-US-TST",
"/Users/jeevandk/.kube/PA-VAA-US-PRD01",
"/Users/jeevandk/.kube/RAAD-EKS-USW2-PRD",
"/Users/jeevandk/.kube/TRE-EKS-EUC1-PRD-01",
"/Users/jeevandk/.kube/TRE-EKS-EUC1-SB",
"/Users/jeevandk/.kube/WAYFINDR-EU-SBX",
"/Users/jeevandk/.kube/jeeva-test-cluster"
],
"vs-kubernetes.kubeconfig": "/Users/jeevandk/.kube/PA-US-DEV",
"disable-linters": ["resource-limits"],
"vscode-kubernetes.minikube-path.mac": "/Users/jeevandk/.vs-kubernetes/tools/minikube/darwin-amd64/minikube"
},
"files.associations": {
"*.tfvars": "terraform"
},
"terminal.integrated.scrollback": 50000,
"terminal.external.osxExec": "iTerm.app",
"workbench.editorAssociations": {
"*.ipynb": "jupyter-notebook"
},
"gitlens.codeLens.recentChange.enabled": false,
"gitlens.codeLens.authors.enabled": false,
"python.defaultInterpreterPath": "~/venv/python3/bin/python",
"notebook.cellToolbarLocation": {
"default": "right",
"jupyter-notebook": "left"
},
"redhat.telemetry.enabled": false,
"yaml.customTags": [
"!And",
"!And sequence",
"!If",
"!If sequence",
"!Not",
"!Not sequence",
"!Equals",
"!Equals sequence",
"!Or",
"!Or sequence",
"!FindInMap",
"!FindInMap sequence",
"!Base64",
"!Join",
"!Join sequence",
"!Cidr",
"!Ref",
"!Sub",
"!Sub sequence",
"!GetAtt",
"!GetAZs",
"!ImportValue",
"!ImportValue sequence",
"!Select",
"!Select sequence",
"!Split",
"!Split sequence"
],
"[markdown]": {
"editor.formatOnSave": false
},
"yaml.schemas": {},
"aws.profile": "profile:default",
"workbench.iconTheme": "vscode-icons",
"json.schemas": [],
"terminal.integrated.enableMultiLinePasteWarning": false,
"editor.suggest.showMethods": true,
"editor.suggest.preview": true,
"editor.acceptSuggestionOnEnter": "on",
"terraform.languageServer.enable": true,
"files.trimTrailingWhitespace": true,
"window.zoomLevel": 1,
"editor.codeActionsOnSave": {
}
//gitlens.currentLine.enabled": false
}
Atom settings¶
{
"python.pythonPath": "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/bin/python3.7",
"workbench.colorTheme": "Atom One Dark",
"workbench.startupEditor": "newUntitledFile",
"window.zoomLevel": 0,
"editor.fontSize": 12,
"editor.codeLens": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"editor.wordWrap": "on",
"editor.minimap.enabled": false,
"terraform.indexing": {
"enabled": false,
"liveIndexing": false,
"delay": 500,
"exclude": [
".terraform/**/*",
"**/.terraform/**/*"
]
},
"terraform.languageServer": {
"enabled": true,
"args": []
},
"terraform.format": {
"ignoreExtensionsOnSave": [
".tfsmurf"
]
},
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Args": [
"--max-line-length=120"
],
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.jediEnabled": false,
"vs-kubernetes": {
"vs-kubernetes.minikube-path.mac": "/Users/jeevandk/.vs-kubernetes/tools/minikube/darwin-amd64/minikube"
},
"files.associations": {
},
"django.snippets.exclude": [
"cms",
"wagtail"
],
"editor.rulers": [],
"workbench.iconTheme": "material-icon-theme"
}
Sublime cusomization¶
Install Package Control
Install SublimeLinter
Install: SublimeLinter-pycodestyle
Install: SublimeLinter-pyflakes
Install: SideBarEnhancements
Install: GitGutter
Install: afterglow theme
Install: One Dark color scheme
Install: Material-Theme-Darker
Install: A File Icon