Skip to content

Instantly share code, notes, and snippets.

@Cycymomo
Last active May 11, 2018 08:48
Show Gist options
  • Save Cycymomo/82012182dfe9a4f2eaa7ddf1a1e38844 to your computer and use it in GitHub Desktop.
Save Cycymomo/82012182dfe9a4f2eaa7ddf1a1e38844 to your computer and use it in GitHub Desktop.
Set up a Windows/Mac env (IDE + Term) like a boss

Windows only

Babun

64 bit version : https://github.com/babun/babun/wiki/64-bit

HOME env var

https://babun.github.io/faq.html#_how_to_use_the_windows_user_profile_directory_as_my_home_directory_in_babun

Windows et macOS

Setup zsh (via oh-my-zsh)

oh-my-zsh : sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Syntax highlight : https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md#oh-my-zsh

Pure theme : https://github.com/sindresorhus/pure

There is a bug on Windows : pure.zsh, replace `local git_color=242` by `local git_color=white`

.zshrc

ZSH_THEME="refined"
plugins=(git ssh-agent zsh-syntax-highlighting)
export PATH=$HOME/bin:/usr/local/bin:$PATH

# ssh
export SSH_KEY_PATH="~/.ssh/id_dsa"
if [ -z "$SSH_AUTH_SOCK" ] ; then
  ssh-add
fi

# .zshrc
autoload -U promptinit; promptinit
prompt pure

Hyper

https://hyper.is/

.hyper.js :

shell: 'C:\\Users\\USERNAME\\.babun\\cygwin\\bin\\zsh.exe',
shell: '/bin/zsh',
Plugins : [
  'hyper-snazzy',
  'hyperlinks',
  'hyper-startup',
  'hyperfull',
  'hyper-pane',
]

VS Code

Police : FiraCode and Script12 BT (Flott flott like for ligature)

  • Extension : Custom CSS and JS Loader
  • F1 & type : Reload Custom CSS and JS

Config file (Ctrl+,)

"editor.fontFamily": "'Fira Code'",
"editor.fontSize": 13,
"editor.fontLigatures": true,
"vscode_custom_css.imports": ["file:///C:/Users/<username>/styles.css"],

Theme: Snazzy Operator Plus

styles.css

.type.storage,
.type.storage.declaration,
.storage.class.modifier {
  font-family: 'Script12 BT';
  font-size: 1.3em;
}

.type.storage.arrow.function {
  font-family: 'Fira Code';
}

.decorator.name,
.decorator.punctuation:not(.block),
.import.keyword {
  font-family: 'Script12 BT';
  font-size: 1.3em;
  color: #68f39b !important;
}

.attribute-name {
  font-family: 'Script12 BT';
  font-size: 1.3em;
}

.html.quoted.double {
  color: #a6f3a6 !important;
}

.comment {
  color: #c5c5fd !important;
}

.comment:not(.punctuation) {
  font-family: 'Script12 BT';
  font-size: 1.3em;
}

.mtk16,
.mtk3 {
  font-family: 'Script12 BT';
  font-size: 1.3em;
}

.slider {
  background-color: #a6f3a6 !important;
}

more info : https://medium.com/@zamamohammed/multiple-fonts-alternative-to-operator-mono-in-vscode-7745b52120a0

Known issues :

Fix "git cache clone issue" on Cygwin like system :

npm/npm#7357 (comment)

Module build failed: TypeError: Cannot read property 'targets' of undefined: modif ce fichier : \dm-ui-settings\node_modules\babel-preset-env\lib\index.js

function buildPreset(context, opts = {
  "targets": {
    "browsers": [
      "Chrome >= 52",
      "FireFox >= 44",
      "Safari >= 7",
      "Explorer 11",
      "last 4 Edge versions"
    ]
  },
})

à la place de function buildPreset(context, opts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment