User-defined tabulations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

User-defined tabulations

Mikhail V
Is there in gVIM (I am gVIM user) a possibility to define
different tabulations widths in single file?

Like in a DTP software e.g. Indesign or Word,
I can set custom tabulations for any paragraph and they
are stored within a file.

Seems that the answer is no :(  But maybe some work
on this was done or proposed? I am almost sure this
have been proposed or discussed at some time.
I have noticed that there is similar functionality in VIM
like markers, that are stored separately in side files.
In theory it could save the tabulation setups in similar manner?

I think also that it is not simple because tab char is used for
logical indentation in some languages and not only for column separation,
and these setups must not interfer with each other.
So it is sort of contents-dependent.

To be clear, I am not interestd in solutions which insert
spaces to align things. I ask about tabulations, i.e. setup of
column coordinates for individual lines, which
are _one_ tab char per column in a file.


Mikhail

--
--
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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: User-defined tabulations

Grant Taylor-2
On 09/19/2017 01:37 PM, Mikhail V wrote:
> I have noticed that there is similar functionality in VIM
> like markers, that are stored separately in side files.

Are you referring to per file a-z marks / per instance A-Z marks?  Which
can be stored in viminfo files?



--
Grant. . . .
unix || die

--
--
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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: User-defined tabulations

Christian Brabandt
In reply to this post by Mikhail V

On Di, 19 Sep 2017, Mikhail V wrote:

> Is there in gVIM (I am gVIM user) a possibility to define
> different tabulations widths in single file?
>
> Like in a DTP software e.g. Indesign or Word,
> I can set custom tabulations for any paragraph and they
> are stored within a file.
>
> Seems that the answer is no :(  But maybe some work
> on this was done or proposed? I am almost sure this
> have been proposed or discussed at some time.
> I have noticed that there is similar functionality in VIM
> like markers, that are stored separately in side files.
> In theory it could save the tabulation setups in similar manner?
>
> I think also that it is not simple because tab char is used for
> logical indentation in some languages and not only for column separation,
> and these setups must not interfer with each other.
> So it is sort of contents-dependent.
>
> To be clear, I am not interestd in solutions which insert
> spaces to align things. I ask about tabulations, i.e. setup of
> column coordinates for individual lines, which
> are _one_ tab char per column in a file.

There is the vartabs patch, that has been floating around for ten years
or so. Unfortunately, it hasn't been merged yet. I'll keep it around and
update it to the latest code every now and then:
https://github.com/chrisbra/vim-mq-patches/blob/master/var_tabstops

Christian
--
Letzte Worte eines Sprengmeisters:
  "Was'n das für'n Draht?"

--
--
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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: User-defined tabulations

Mikhail V
On Wednesday, September 20, 2017 at 7:26:33 AM UTC+2, Christian Brabandt wrote:

> On Di, 19 Sep 2017, Mikhail V wrote:
>
> > Is there in gVIM (I am gVIM user) a possibility to define
> > different tabulations widths in single file?
> >
> > Like in a DTP software e.g. Indesign or Word,
> > I can set custom tabulations for any paragraph and they
> > are stored within a file.
> >
> > Seems that the answer is no :(  But maybe some work
> > on this was done or proposed? I am almost sure this
> > have been proposed or discussed at some time.
> > I have noticed that there is similar functionality in VIM
> > like markers, that are stored separately in side files.
> > In theory it could save the tabulation setups in similar manner?
> >
> > I think also that it is not simple because tab char is used for
> > logical indentation in some languages and not only for column separation,
> > and these setups must not interfer with each other.
> > So it is sort of contents-dependent.
> >
> > To be clear, I am not interestd in solutions which insert
> > spaces to align things. I ask about tabulations, i.e. setup of
> > column coordinates for individual lines, which
> > are _one_ tab char per column in a file.
>
> There is the vartabs patch, that has been floating around for ten years
> or so. Unfortunately, it hasn't been merged yet. I'll keep it around and
> update it to the latest code every now and then:
> https://github.com/chrisbra/vim-mq-patches/blob/master/var_tabstops
>
> Christian
> --
> Letzte Worte eines Sprengmeisters:
>   "Was'n das für'n Draht?"
Interesting, so my intuition was not false.
So in ten years were there user tests or some feedbacks?

It is very intriguing how it could work with
Python contents, like for example such lines,
(I put -->  as a tab char here to make it visible)

-->-->var1 = -->1
-->-->var2 = -->2
-->-->var3 = -->3

Does it display widths regardless of contents/file type, ie, just starting with the first tab char on a line?

If it could apply the tabulation setup bypassing the logical indentation (loops, defs, ifs) then I could input tab-separated contents everywhere without additional tabulation resetting.
I doubt though it is so easy to programm such feature,
unless Python (and Vim) will adopt another character for logical indent.

--
--
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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.