Is there any existing support via default or via a plugin for setting the tab settings for the file according to a vim:set line at the top of a file?
Can Sublime Text set the tab settings according to a vim:set line in a file?
I don’t know of any but that sound fairly straightforward to write. I wrote one that lets you customize the tab/indent spaces similar to how vim allows it (ST doesn’t allow you to change the indent spaces). I’m a noob when it comes to Python so if I can do it anyone can
I’ve modified default plugin to support such lines:
// -- Mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 --
Would be easy to support vim:set probably, but what is the syntax exactly? Is it documented somewhere?
Here is a VERY long list of the available options for vim which can be called in a comment in the first line of any document. The comment usually looks like:
/* vim:set option=1 option=2 option=true */
Anyway you get the idea. Here is that huge list of options:
At this point though I have only a few parameters that I’d like to check for.
shiftwidth
tabstop
softtabstop
fileformat
filetype
syntax
noexpandtab
expandtab
Those cover the basics of everything.
I feel like I could easily write a plugin to do this, I was just wondering if there was already a tool out there that was doing this or something similar. If you have a github for your plugin I could probably just make a pull request for the addition of the vim:set stuff.
If you can’t find it on https://packagecontrol.io then I am doubtful there is one out there.