New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to show signcolumn on top of numbers column #4515
Comments
Adam Stankiewicz wrote:
**Is your feature request related something that is currently hard to do? Please describe.**
The current available options for `signcolumn` are `auto`, `yes`, and `no`, all of whom have their annoyances:
- `no` - doesn't allow to highlight lines at all
- `yes` - always takes space in vim even when no errors or warning as highlighted
- `auto` - makes text in vim "jump" when error or warning happens
**Describe the solution you'd like**
An extra option `number` that makes markers to be visible *on top* of numbers column. This solution has following advantages:
- no space is taken when there are no errors or warnings
- text is not jumping when errors or warnings start to be highlighted
I like the idea. Perhaps we can use "number" in 'signcolumn'. When
there is no number column it can behave like "yes".
…--
Don't drink and drive. You might hit a bump and spill your beer.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Recently Neovim added some thing similar. But instead of showing sign text in the number column, a sign option The patch is here https://github.com/neovim/neovim/pull/9113/files but is bit out of date due to the recent sign refactors. If this is interesting I could help porting it. |
Recently Neovim added some thing similar. But instead of showing sign
text in the number column, a sign option `numhl` was added to change
the highlight of the number column. Similar to a sign only using
`linehl`, such a sign doesn't need the sign column.
The patch is here https://github.com/neovim/neovim/pull/9113/files but
is bit out of date due to the recent sign refactors. If this is
interesting I could help porting it.
Hmm, it sounds a bit like another thing. The "numhl" attribute is on
the sign, thus you can easily end up with some signs using it and some
not. That sounds like another feature.
The idea here is to put ALL signs in the number column. Just one
setting, which works both when there is a number column and when not.
Just saves the space for the sign column (which often is mostly empty).
Thus it still works when toggling the line number off and on.
…--
Never eat yellow snow.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Hi,
On Sun, Jun 9, 2019 at 8:23 AM Bram Moolenaar ***@***.***> wrote:
> Recently Neovim added some thing similar. But instead of showing sign
> text in the number column, a sign option `numhl` was added to change
> the highlight of the number column. Similar to a sign only using
> `linehl`, such a sign doesn't need the sign column.
>
> The patch is here https://github.com/neovim/neovim/pull/9113/files but
> is bit out of date due to the recent sign refactors. If this is
> interesting I could help porting it.
Hmm, it sounds a bit like another thing. The "numhl" attribute is on
the sign, thus you can easily end up with some signs using it and some
not. That sounds like another feature.
The idea here is to put ALL signs in the number column. Just one
setting, which works both when there is a number column and when not.
Just saves the space for the sign column (which often is mostly empty).
Thus it still works when toggling the line number off and on.
I am attaching a preliminary patch that implements the above.
As the win_line() function uses too many variables, the new
get_sign_display_info() function needs too many arguments.
I don't like functions taking too many arguments. I can move the
input and output set of arguments into separate structures and
pass them to this function. Any suggestions?
Also, the current win_line() function is too long (around 2150 lines).
- Yegappan
|
Yegappan wrote:
On Sun, Jun 9, 2019 at 8:23 AM Bram Moolenaar ***@***.***> wrote:
>
>
> > Recently Neovim added some thing similar. But instead of showing sign
> > text in the number column, a sign option `numhl` was added to change
> > the highlight of the number column. Similar to a sign only using
> > `linehl`, such a sign doesn't need the sign column.
> >
> > The patch is here https://github.com/neovim/neovim/pull/9113/files but
> > is bit out of date due to the recent sign refactors. If this is
> > interesting I could help porting it.
>
> Hmm, it sounds a bit like another thing. The "numhl" attribute is on
> the sign, thus you can easily end up with some signs using it and some
> not. That sounds like another feature.
>
> The idea here is to put ALL signs in the number column. Just one
> setting, which works both when there is a number column and when not.
> Just saves the space for the sign column (which often is mostly empty).
> Thus it still works when toggling the line number off and on.
>
I am attaching a preliminary patch that implements the above.
As the win_line() function uses too many variables, the new
get_sign_display_info() function needs too many arguments.
I don't like functions taking too many arguments. I can move the
input and output set of arguments into separate structures and
pass them to this function. Any suggestions?
Also, the current win_line() function is too long (around 2150 lines).
Thanks for looking into this. Yes, win_line() has grown into a complex
beast. It's not going to be easy to split it up, since there is so much
state involved. It could work to move things like c_extra, n_extra,
etc. into a struct. But they should also be renamed to make their
purpose clearer. That's going to be some work.
…--
hundred-and-one symptoms of being an internet addict:
209. Your house stinks because you haven't cleaned it in a week.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Hi all,
On Sun, Jun 16, 2019 at 7:32 AM Yegappan Lakshmanan ***@***.***> wrote:
On Sun, Jun 9, 2019 at 8:23 AM Bram Moolenaar ***@***.***> wrote:
>
> > Recently Neovim added some thing similar. But instead of showing sign
> > text in the number column, a sign option `numhl` was added to change
> > the highlight of the number column. Similar to a sign only using
> > `linehl`, such a sign doesn't need the sign column.
> >
> > The patch is here https://github.com/neovim/neovim/pull/9113/files but
> > is bit out of date due to the recent sign refactors. If this is
> > interesting I could help porting it.
>
> Hmm, it sounds a bit like another thing. The "numhl" attribute is on
> the sign, thus you can easily end up with some signs using it and some
> not. That sounds like another feature.
>
> The idea here is to put ALL signs in the number column. Just one
> setting, which works both when there is a number column and when not.
> Just saves the space for the sign column (which often is mostly empty).
> Thus it still works when toggling the line number off and on.
>
I am attaching a preliminary patch that implements the above.
With this patch, when the 'signcolumn' option is set to 'number',
the signs are displayed only when the 'number' column is displayed.
Otherwise, the placed signs are not displayed.
Instead of this, if the 'number' column is not displayed, should we
show the sign column and display the signs there? If the 'number'
column is enabled later, then remove the sign column and display
the signs in the number column? Similarly, if the 'number' column
is disabled, enable the sign column and show the signs there?
Also, in the 'number' column, when displaying the sign for a line,
the corresponding line number will not be shown for that line.
Thanks,
Yegappan
|
Yegappan wrote:
On Sun, Jun 16, 2019 at 7:32 AM Yegappan Lakshmanan ***@***.***> wrote:
> On Sun, Jun 9, 2019 at 8:23 AM Bram Moolenaar ***@***.***> wrote:
> >
> > > Recently Neovim added some thing similar. But instead of showing sign
> > > text in the number column, a sign option `numhl` was added to change
> > > the highlight of the number column. Similar to a sign only using
> > > `linehl`, such a sign doesn't need the sign column.
> > >
> > > The patch is here https://github.com/neovim/neovim/pull/9113/files but
> > > is bit out of date due to the recent sign refactors. If this is
> > > interesting I could help porting it.
> >
> > Hmm, it sounds a bit like another thing. The "numhl" attribute is on
> > the sign, thus you can easily end up with some signs using it and some
> > not. That sounds like another feature.
> >
> > The idea here is to put ALL signs in the number column. Just one
> > setting, which works both when there is a number column and when not.
> > Just saves the space for the sign column (which often is mostly empty).
> > Thus it still works when toggling the line number off and on.
> >
>
> I am attaching a preliminary patch that implements the above.
>
With this patch, when the 'signcolumn' option is set to 'number',
the signs are displayed only when the 'number' column is displayed.
Otherwise, the placed signs are not displayed.
Instead of this, if the 'number' column is not displayed, should we
show the sign column and display the signs there? If the 'number'
column is enabled later, then remove the sign column and display
the signs in the number column? Similarly, if the 'number' column
is disabled, enable the sign column and show the signs there?
When 'signcolumn' is set to "number" and there is no number column, it
should behave either like "auto" or "yes". Since "auto" is the default,
it would be that.
An alternative is to be able to specify a fallback:
set signcolumn=number,yes
set signcolumn=number,auto
set signcolumn=number,no
Also, in the 'number' column, when displaying the sign for a line,
the corresponding line number will not be shown for that line.
I think that is OK, so long as there aren't many signs you can see the
line number just above or below.
…--
Your mouse has moved. Windows must be restarted for the change
to take effect. Reboot now?
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
It's like a dream, thank you @brammool :) |
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Problem: Sign column takes up space. (Adam Stankiewicz) Solution: Optionally put signs in the number column. (Yegappan Lakshmanan, closes vim/vim#4555, closes vim/vim#4515) vim/vim@394c5d8
Comparing the date on vim/vim#4515 to the release history on the readme for https://github.com/vim/vim-history leads to the conclusion that it was made available on 8.2, which is expressed as 802. Will make the .vimrc usable without error by more versions of vim.
The current available options for
signcolumn
areauto
,yes
, andno
, all of whom have their annoyances:no
- doesn't allow to highlight lines at allyes
- always takes space in vim even when no errors or warning as highlightedauto
- makes text in vim "jump" when error or warning happensDescribe the solution you'd like
An extra option
number
that makes markers to be visible on top of numbers column. This solution has following advantages:The text was updated successfully, but these errors were encountered: