Given you've done all the hard work, I am attempted to add the other
changes to it that I wanted. Thanks SO much!
Is there a way to have this constantly run on the current line I am on
instead of only when I exit out of edit mode?
Rick
On Sat, Aug 27, 2011 at 3:39 AM, Christian Brabandt <cblists@256bit.org> wrote:
> Hi Burnett,!
>
> On Fr, 26 Aug 2011, Burnett, Rick wrote:
>
>> Hello All!
>>
>> I've been looking around to see if it is possible to create a script or add a feature that I would use quite a bit.
>>
>> When editing python code, how much a line is indented sets the scope of the code, as many of you know, however, sometimes with long scopes that are heavily nested, it can be confusing to easily see how many indents you need.
>>
>> What I would LOVE is to set vim similar to where it shows numbers, but instead, have the number show the number of indents relative to the current setting of ts.
>>
>> What would happen is this
>>
>> 1) The number is computed by the number of spaces at the lead (^\s*) / tab space setting (ts)
>>
>> 2) If the number had any remainder (so not zero remainder) this means something isn't spaced right, set the text color to orange.
>>
>> 3) If ANY tabs (\t) are in the line, set the color to red to indicate the line needs to be fixed.
>>
>> I realize computing every line is expensive, but I'd be willing to take that hit on turning this one for some of the difficult functions I write. It would also be nice if it ran on what was displayed only maybe.
>>
>> Is this possible? Or will I need to actually edit the gvim sourcecode for this sort of functionality?
>
> I think I posted sometimes a similar script here:
> http://groups.google.com/group/vim_use/msg/cd69f15256f89531
>
> So taking that script, adjusting it a little, you get the one I
> attached. (I have only barely tested it).
>
> regards,
> Christian
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment