Skip to content

Instantly share code, notes, and snippets.

@kakashysen
Created October 10, 2017 21:13
Show Gist options
  • Select an option

  • Save kakashysen/ccc3eca4b2f4c3bf1263675e6030979a to your computer and use it in GitHub Desktop.

Select an option

Save kakashysen/ccc3eca4b2f4c3bf1263675e6030979a to your computer and use it in GitHub Desktop.
How to add Swift Syntax Highlighting in Vim

Enable Swift Highlighting Syntax for Vim

  1. Execute the given below commands

$mkdir -p ~/.vim/autoload ~/.vim/bundle

$curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

  1. Add the given below lines to ~/.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
  1. Setup Apple’s vim plugin for Swift’s code highligting and indentation

Download the plugin from Github repository

wget https://github.com/apple/swift/tree/master/utils/vim

Copy the downloaded directory vim to ~/.vim/bundle

$cp -r vim ~/.vim/bundle

  1. Test the code highlighting
@davidbjames
Copy link

Does wget work in the new default shell zsh (on Catalina)? I get a "command not found" error.

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