Skip to content

Instantly share code, notes, and snippets.

@brianjbayer
Created November 19, 2023 23:01
Show Gist options
  • Save brianjbayer/66a5a1d04d9bfd56536b7c9b7f7c0659 to your computer and use it in GitHub Desktop.
Save brianjbayer/66a5a1d04d9bfd56536b7c9b7f7c0659 to your computer and use it in GitHub Desktop.
How to install git and vim (with the Janus: Vim Distribution) using Homebrew on Mac

Install Git and Vim (with Janus: Vim Distribution) Using Homebrew

Here you will install...

  • git the source code control versioning system using Homebrew
  • vim the command line editor using Homebrew
  • The Janus: Vim Distribution plug-ins and mappings for vim

⚙️ You can use an automated script to install git and vim and extensions such as the Janus: Vim Distribution.

I use a GitHub repository mac-setup for my basic Mac setup scripts including one to install git and vimand the Janus: Vim Distribution.

If you'd like, you are welcome to use it too.

:octocat: Just follow the PREREQUISITES and then Homebrew Install git and vim of my GitHub repository


Install Git and Vim (with Janus: Vim Distribution) Using Homebrew Manually

If you would like to install git, vim (with or without theJanus: Vim Distribution) manually using Homebrew...

Install Git Using Homebrew

🍺 Reference https://formulae.brew.sh/formula/git for the source of truth

  1. Run the following command to update Homebrew

    brew up
    
  2. Run the following command to install git

    brew install git
    

Install Vim Using Homebrew

🍺 Reference https://formulae.brew.sh/formula/vim for the source of truth

  1. Run the following command to update Homebrew

    brew up
    
  2. Run the following command to install vim

    brew install vim
    

Install Janus

You can use the Janus: Vim Distribution of plug-ins for things like syntax highlighting of programming languages in vim.

🙇 Reference https://github.com/carlhuda/janus for the source of truth

  1. Run the following command to install janus
    curl -L https://bit.ly/janus-bootstrap | bash
    

Error Messages When Opening Vim

If you get an error while starting vim that looks like this...

Error detected while processing /Users/brian.bayer/.vim/janus/vim/tools/tlib/plugin/02tlib.vim:
line   77: E1208: -complete used without allowing argumentsPress ENTER or type command to continue

You can add a line to your ~/.vimrc.before file (which you may not yet have) to disable the tlib plug in.

  1. Run the following command to ensure that you have a ~/.vimrc.before file

    touch ~/.vimrc.before
  2. Edit your ~/.vimrc.before file and ADD the following line

    call janus#disable_plugin('tlib')
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment