[swift-dev] Swift vim support

Kevin Ballard kevin at sb.org
Sat Jan 2 21:05:58 CST 2016


Incidentally, for a long time I've maintained my own vim Swift plugin at https://github.com/kballard/vim-swift. It provides a bunch of features like compiling and running the current file when you press ⌘R. It's not entirely up-to-date yet (e.g. I haven't updated it to allow string literals inside of string interpolations) but it works pretty well. It also doesn't have custom indentation support (I'm using autoindent and smartindent), but it works pretty well for most things except switch cases.

That said, I did recently stop using it in favor of the one in the Swift repo for the simple reason that my plugin isn't compatible with .gyb files (my plugin defines a complex nested syntax hierarchy, which allows it to detect a lot of invalid syntax, but the gyb syntax can't work with that). I have been thinking about switching back to mine for normal files and only using the Swift repo one for .gyb files though.

In any case, I also support the notion of having an "official" plugin in its own repo, and I would suggest that using something like mine as the base might be nice.

-Kevin Ballard

On Thu, Dec 31, 2015, at 08:32 PM, Harlan Haskins via swift-dev wrote:
> I love vim and would love to see static analyzer and SPM-aware vim support. +1 from me.
> 
> > On Dec 31, 2015, at 6:11 PM, Dmitri Gribenko via swift-dev <swift-dev at swift.org> wrote:
> > 
> > On Thu, Dec 31, 2015 at 10:09 PM, Keith Smiley via swift-dev
> > <swift-dev at swift.org> wrote:
> >> Hey all,
> >> 
> >> When swift was open sourced a few of us noticed that there was some existing
> >> vim highlighting support[0]. While it sounds like what's there now hasn't been
> >> kept up to date for a while[1], that brought up the question if there could
> >> ever be a dedicated repository for vim support under the apple github
> >> organization.
> > 
> > I'm using vim, and I would be interested in having strong vim support for Swift.
> > 
> > Dmitri
> > 
> > -- 
> > main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> > (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> > _______________________________________________
> > swift-dev mailing list
> > swift-dev at swift.org
> > https://lists.swift.org/mailman/listinfo/swift-dev
> 
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
> Email had 1 attachment:
> + smime.p7s
>   2k (application/pkcs7-signature)


More information about the swift-dev mailing list