{"id":17351280,"url":"https://github.com/apidcloud/apiddevconfigs","last_synced_at":"2025-10-26T14:13:24.908Z","repository":{"id":67595073,"uuid":"117746804","full_name":"Apidcloud/ApidDevConfigs","owner":"Apidcloud","description":" Step-by-step guide to configure oh-my-zsh in Windows and use it within VS Code","archived":false,"fork":false,"pushed_at":"2021-04-19T17:57:49.000Z","size":26,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T16:48:44.632Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Apidcloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-16T21:52:09.000Z","updated_at":"2022-08-05T22:18:50.000Z","dependencies_parsed_at":"2023-02-26T18:31:35.667Z","dependency_job_id":null,"html_url":"https://github.com/Apidcloud/ApidDevConfigs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apidcloud%2FApidDevConfigs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apidcloud%2FApidDevConfigs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apidcloud%2FApidDevConfigs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apidcloud%2FApidDevConfigs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Apidcloud","download_url":"https://codeload.github.com/Apidcloud/ApidDevConfigs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245842728,"owners_count":20681388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T17:09:27.799Z","updated_at":"2025-10-26T14:13:24.846Z","avatar_url":"https://github.com/Apidcloud.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apidcloud Development Configurations\nPersonal Development Configurations - Shells, etc.\n\nFor now, this is a step-by-step guide to configure oh-my-zsh in Windows and allow it to be used inside editors at will (e.g., VS Code, WebStorm)\n\n![WithinVSCodeAndGit](https://imgur.com/nF5VHod.png)\n\n# Basic Setup\n1. Install [Cygwin](https://www.cygwin.com/)\n2. When running the above setup, select the desired packages for download, including:\n    - zsh (required)\n    - wget (required)\n    - git (required)\n    - lynx (required for apt-cyg - similar to apt-get)\n    - nano and/or vim editors (not required)\n    - ssh (not required)\n3. Open Cygwin bash and run:\n    ```sh\n    $ mkpasswd -l -p \"$(cygpath -H)\" \u003e /etc/passwd\n    ```\n4. Open `/etc/passwd` with a text editor. It should be inside the installation path of Cygwin (e.g., `C:\\cygwin64`)\n5. Replace `/bin/bash` at the end of the users we want for `/bin/zsh`\n6. Close the terminal and open again. **It should now be using zsh instead of bash**.\n7. Install oh-my-zsh \n    ```sh\n    $ sh -c \"$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)\"\n    ```\n\n# Configure Theme\n1. Color theme - e.g., **Solarized Dark**:\n    ```sh\n    $ git clone https://github.com/karlin/mintty-colors-solarized.git ~/.solarized\n    $ echo 'source ~/.solarized/mintty-solarized-dark.sh' \u003e\u003e ~/.zshrc # for light, replace dark with light\n    ```\n2. Powerline (if you want powerline fonts with fancy symbols and additional customization) - e.g., **Powerlevel9k**:\n    ```sh\n    $ git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k\n    ```\n    Then edit your `~/.zshrc` and set `ZSH_THEME=\"powerlevel9k/powerlevel9k\"`\n\n# Configure Font\n1. Download Powerline fonts - e.g., the following [repository](https://github.com/powerline/fonts)\n2. Install a font you'd like (e.g., Meslo LG M for Powerline). Keep in mind that **to use Powerlevel9k, a powerline-patched font is needed**.\n3. To effectively use it in the terminal, you can **right click on the terminal header » options » fonts** and **select it**. \n    *If*, however, *it doesn't show up in that list*, run the following command to **change it manually**:\n    ```sh\n    $ C:\\cygwin64\\bin\\mintty.exe -i /Cygwin-Terminal.ico -o Font=\"Meslo LG L for Powerline\" -\n    ```\n4. Test if it's working correctly by running\n    ```sh\n    $ echo \"\\ue0b0 \\u00b1 \\ue0a0 \\u27a6 \\u2718 \\u26a1 \\u2699\"\n    ```\n    ![Result of symbols rendering](https://imgur.com/5GGfJwQ.png)\n5. It should now be able to render the characters from the echo command. Note that to load the font correctly, **you might need** to **run that command everytime**. To do so, you can start a zsh shell on demand, and add that batch script (.bat extension) to your path or start menu. As an alternative, you can install **ConEmu** and use it as default shell (startup task) command - see ConEmu section.\n\n# 256 colors Warning:\n\nIf the following message shows up, which it should:\n```sh\nWARNING! Your terminal appears to support less than 256 colors!\nIf your terminal supports 256 colors, please export the appropriate environment variable\n_before_ loading this theme in your ~/.zshrc. In most terminal emulators, putting\nexport TERM=\"xterm-256color\" at the top of your ~/.zshrc is sufficient.\n```\nAs the warning suggests, you can edit the file and copy paste the export command manually. \nYou can also accomplish the same thing by going to **Cygwin options » terminal » type** and **change to xterm-256color**\n\n# Editor integration\n\n**This section could particularly use the help of some contributions, as each editor handles these configurations differently.**\n\nIn order to get the terminal and shell to work within an editor, such as VS Code, there are two things left:\n1. Create a new file with the name **editorTerminalScript.bat** and add the following to it:\n    ```sh\n    @echo off\n    set INTELLIJ=true\n    set CHERE_INVOKING=1\n    set TERM=xterm-256color\n    set PATH=\"C:\\cygwin64\\bin\";%PATH%\n\n    C:\\cygwin64\\bin\\zsh.exe -l -i\n    ```\n2. Now all you need is to tell the editor to use this script as the terminal, and to change its font. Note that **there isn't a variable *Font*** to set through the script (as in the other one). Maybe there's an alternative to **zsh** or **env.exe** which I don't know yet about.\n\n### VS Code\n\nIn VS Code, the above can be accomplished by going to the **User Settings** (from the cogwheel at lower left corner) and add the following configurations:\n\n```json\n\"terminal.integrated.shell.windows\": \"C:\\\\FolderWhere\\\\EditorTerminalScriptIsLocated\\\\editorTerminalScript.bat\",\n\"terminal.integrated.fontFamily\": \"Meslo LG M for Powerline\",\n\"terminal.integrated.fontSize\": 14\n```\n\nSaving the file and reopening the editor should make it work.\n\n# Apt Cyg\n\nIn order to install Cygwin's packages through the terminal instead of running the setup every single time you need one, you can install **apt-cyg**.\nAs a requirement, you'll need to install `lynx` through the cygwin setup first. After that, just run the following commands:\n```sh\n$ lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg \u003e apt-cyg\n$ install apt-cyg /bin\n```\n# Plugins\n\n### Syntax highlightning\n\n1. Clone its repository to custom zsh plugins:\n    ```sh\n    $ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting\n    $ echo \"source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh\" \u003e\u003e ${ZDOTDIR:-$HOME}/.zshrc\n    ```\n2. You can check if it has worked properly by opening `.zshrc` file. It should have something equivalent to the following at the end:\n    ```sh\n    $ source (fullcygwinPathToHome)/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh\n    ```\n\n### Auto Suggestions\n\n1. Clone its repository to custom zsh plugins:\n    ```sh\n    $ git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions\n    ```\n\n2. Add the plugin to the list of plugins to load (within `.zshrc`):\n    ```sh\n    plugins=(zsh-autosuggestions) # or plugins+= if you're using other plugins\n    ```\n\n3. Reopen the terminal and run the following command:\n    ```sh\n    $ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=6'\n    ```\n4. **If it shows suggestions as you type**, place the same command below the plugin line inside `.zshrc`\n    **If it doesn't**, try other colour numbers (e.g., 5) until the suggestions are shown correctly and then copy to the file.\n\n### VS Code\n\n1. Clone its repository to custom zsh plugins:\n    ```sh\n    $ git clone git@github.com:wuotr/zsh-plugin-vscode.git $ZSH_CUSTOM/plugins/zsh-plugin-vscode\n    ```\n    \n2. Add the plugin to the list of plugins to load (within `.zshrc`):\n    ```sh\n    plugins=(vscode) # or plugins+= if you're using other plugins\n    ```\n\n3. Reopen the terminal. `code` and `vscode` should now be working.\n\n# Additional Customization\n\n### Aliases\n\nA few useful examples, which you can add to your `.zshrc` file:\n```sh\nalias pbcopy=\"cat \u003e/dev/clipboard\"\nalias pbpaste=\"cat /dev/clipboard\"\nalias work=\"cd D:/Workspace\"\n```\n### Powerline9k\n\nMy personal configuration. You can also add icons to home, etc.\n\n```sh\nZSH_THEME=\"powerlevel9k/powerlevel9k\"\n\nPOWERLEVEL9K_TIME_FORMAT=\"%D{%H:%M}\"\n\nPOWERLEVEL9K_PROMPT_ON_NEWLINE=true\nPOWERLEVEL9K_RPROMPT_ON_NEWLINE=false\n\nPOWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=1\n\nPOWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)\nPOWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time time)\n\nPOWERLEVEL9K_SHORTEN_STRATEGY=\"truncate_from_right\"\nPOWERLEVEL9K_SHORTEN_DELIMITER=\"\"\nPOWERLEVEL9K_SHORTEN_DIR_LENGTH=3\n```\n### ConEmu\n\nYou can also use [ConEmu](https://conemu.github.io/) terminal. It allows further customization, such as tabs, explorer integration (e.g., context menus)\n\nUse the following command in the ConEmu task:\n```sh\nset CHERE_INVOKING=1 \u0026 C:\\cygwin64\\bin\\mintty.exe -i /Cygwin-Terminal.ico -o Font=\"Meslo LG L for Powerline\" -\n```\n\nIn order to get it working inside VS Code and other editors, use the following batch script instead:\n```sh\nC:\\cygwin64\\bin\\zsh.exe -l -i\n```\n\nIf you're using the explorer integration, but it's not opening the shell in the working directory, place the following  inside .zshrc file in C:\\Users\\username:\n```sh\nif [ -n \"${ConEmuWorkDir}\" ]; then\n  cd \"$ConEmuWorkDir\"\nfi\n```\n\n# Final Results\n\n![Default](https://i.imgur.com/ToCOcAl.png)\n\n![CustomizedPluginSyntaxHighlightning](https://i.imgur.com/QRzDdNv.png)\n\n![CustomizedWithPlugins](https://i.imgur.com/d6lJuHm.png)\n\n![WithinVSCode](https://imgur.com/OjVwgOI.png)\n\n# Useful resources\n- https://gist.github.com/aviaryan/5a57aa25b140f6c48f0e\n- https://gist.github.com/kevin-smets/8568070\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapidcloud%2Fapiddevconfigs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapidcloud%2Fapiddevconfigs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapidcloud%2Fapiddevconfigs/lists"}