Skip to content

Instantly share code, notes, and snippets.

@jonathan-beebe
Last active November 30, 2021 16:24
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathan-beebe/d559ea40e3716a80f9ac to your computer and use it in GitHub Desktop.
Save jonathan-beebe/d559ea40e3716a80f9ac to your computer and use it in GitHub Desktop.
Using Apple’s Swift vim plugin with Vundle

Source of original vim config: https://github.com/apple/swift/tree/master/utils/vim

# use `svn checkout…` to grab just the subfolder from github
svn checkout https://github.com/apple/swift/trunk/utils/vim
# rename to something a bit more specific
mv vim vim-swift
cd vim-swift
rm -rf .svn
# init git
git init
git add -A
git commit -m "initial commit"
folder=$(pwd)
# Vundle only works with git repos so force git
# to think this is the repote repo source
# https://github.com/VundleVim/Vundle.vim/issues/397
git remote add origin file://$folder
git branch --set-upstream-to=origin/master master
# You can safely ignore the warnings git might emit
# about 'origin/master' not existing.

Then in .vimrc where Vundle is configured:

Plugin 'file:///Users/username/path/to/vim-swift'

And then update Vundle

# In vim:
:PluginUpdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment