Git Product home page Git Product logo

dotfiles-mac's Introduction

Setup local environment

Steps to configure zsh, Vim and iTerm2 on a macOS machine.

ZSH

Set your login shell to zsh

chsh -s /bin/zsh

Install oh-my-zsh

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

Download the powerline patched font "Meslo"

NOTE:·I'm not sure if the "fc-cache" command below is needed. If so, you may have to install the fonconfig package from homebrew:

brew install fontconfig

Download only the font files needed and copy them to the users fonts folder:

cd ~ && \
svn export https://github.com/powerline/fonts/trunk/Meslo%20Slashed Meslo-$(date +"%Y%m%d") && \
cp -f Meslo-$(date +"%Y%m%d")/*.ttf ~/Library/Fonts/ && \
fc-cache -f "~/Library/Fonts"

Note: Updating the font cache (fc-cache command) can take some time.

Install powerlevel10k theme

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

Install zsh-autosuggestions plugin

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

dotfiles

If not done already, you should set the name and eMail address git uses first:

git config --global user.name "your name"
git config --global user.email "[email protected]"

It's very likely that some of the files in the repository already exist on the local machine. These will cause conflicts when a normal git clone command is used.

To prevent this, we initialize a new git repository, fetch all the content from the repository and then reset to the most recent commit.

cd ~
git init
git remote add origin https://github.com/ursweiss/dotfiles-mac
git fetch --all
git reset --hard origin/master

Now we need to initialize and update the submodules used:

git submodule init
git submodule update

Optional: Set an oh-my-zsh option to not show any version control state for the dotfile repository. This will speed up the prompt within the home directory significantly.

git config --add oh-my-zsh.hide-status 1

iTerm2

Download an install iTerm2

iTerm2 Download page

Open iTerms preferences and enable "Load preferences from a custom folder or URL". As path enter /Users/<username>/.iterm2.

Important: Don't check "Save changes to folder when iTerm2 quits" and don't click the "Save Current Settings to Folder".

Restart iTerm2 and you should see a nice looking window with the default prompt of the "agnoster" theme.

Vim

No additional actions needed for Vim. Everything needed was already done by cloning the dotfiles repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.