[swift-dev] Swift vim support

Keith Smiley keithbsmiley at gmail.com
Sun Jan 3 12:37:20 CST 2016


Right there are 2 facets to the file hierarchy. The one covered in [2] is
the
standard structure vim expects when loading plugins. The need to be in a
separate repo is for vim plugin managers.

The most popular plugin managers[0][1][2] work by either you cloning, or
specifying a repo containing a plugin to load. This means you would use
something like `apple/swift.vim` in the case of the plugin I'm hoping for.
The
plugin managers then add that cloned directory to vim's runtime path where
it
looks for the structure covered in [2] to be able to load the correct plugin
files. If that structure doesn't exist at the root of the repo, it has no
effect. Some of the plugin managers[2] do have the ability to specify the
subdirectory of a repo, but even if that was something we were relying on,
having to clone the entire `apple/swift` repo for less than ~10 small files
is
a lot of overhead.

Let me know if I need to elaborate more.

Thanks!

[0]: https://github.com/tpope/vim-pathogen
[1]: https://github.com/VundleVim/Vundle.vim
[2]: https://github.com/junegunn/vim-plug

--
Keith Smiley

>
>
> On 01/02, Ted kremenek wrote:
> > Hi Keith,
> >
> > I'm not a vim user, so I'm not certain how the nesting of the vim
> support in the main repository is a problem.  I looked at [2] and noticed a
> requirement for a folder layout, but I didn't see anything obvious to
> indicate that this would benefit from being in a separate repository.  Can
> you elucidate a bit more for my benefit?  Note that I'm not saying there is
> a benefit; I'm just lacking some context here to understand why a separate
> repository is needed.  If there is a clear benefit, this is something I'd
> happily support and discuss with the rest of the Swift Core members.
> >
> > Ted
> >
> > > On Dec 31, 2015, at 12: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.
> > >
> > > Many vim plugin managers expect a specific folder structure[2] in
> order to
> > > work correctly. So the current nesting of the vim support in the main
> repo
> > > isn't ideal. I think it would be hugely beneficial to the members of
> the
> > > community who would prefer to use vim over any other editor, for there
> to be a
> > > first party repo similar to rust's[3].
> > >
> > > I'm not particularly suggesting that this plugin would be supported by
> the
> > > swift core team. As there are at least a few community swift vim
> plugins
> > > now[4][5] I would hope that as a community we would be willing and
> able to
> > > support this plguin. Personally I would love to be part of a unified
> effort
> > > towards better vim support for Swift!
> > >
> > >
> > > Thoughts? Thanks!
> > >
> > >
> > > [0]: https://github.com/apple/swift/tree/master/utils/vim
> > > [1]: https://twitter.com/jckarter/status/672493376856391681
> > > [2]: https://robots.thoughtbot.com/writing-vim-syntax-plugins
> > > [3]: https://github.com/rust-lang/rust.vim
> > > [4]: https://github.com/keith/swift.vim
> > > [5]: https://github.com/kballard/vim-swift
> > >
> > > --
> > > Keith Smiley
> > >
> > > _______________________________________________
> > > swift-dev mailing list
> > > swift-dev at swift.org
> > > https://lists.swift.org/mailman/listinfo/swift-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160103/50cefb09/attachment.html>


More information about the swift-dev mailing list