You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to jump to a line you can see the context window (like when you press H).
I personnaly will be happy for it to be mapped to <count>H but any mapping will do.
Alternatively, displaying the line number in the context window (in accordance with set number and set relativenumber would help.
I didn't know about vim-indentwise which seems quite cool indeed.
To get why I want I'll need 0[_ instead of [- but that's a details.
However, an alternative to this (and displaying line number) would be to set number in the context window (which I understand will display 1, 2, 3 etc which can then be used in combination with H so that 1H goes to the first context, line, 2H the second etc ...
To do so, It seems that you only need to store the line number as well as the line in w:context and use it.
@maxigit: I just added support for line numbers in #81. So if you :set relativenumber you can use the displayed relative line numbers to jump to the context lines. Would you say that's enough to close this issue? Thank you!
That's brilliant and should fulfill all my needs ( I see it works for both
relative and normal numbers which is great).
However, I got an error
E28: No such highlight group name: Whitespace
Other than that , I really like the separator in the margin ;-)
There is also a new issue (maybe only for me), but now, lines in the
context view are indented regardless of their physical original
indentation which is really disturbing
when the indentation level is not based on the indentation but on something
else (like markdown). For example I use `-- *` `-- **` in haskel to indent
level 1,2 etc and then start "normal" indentation to 5.
Example
the code
To be fully honest I am aware of this and had already started working on fixing it, but then wondered if people are actually using custom indent functions. So I decided to just release #81 and see if someone complains about it. So I have taken notice and will fix this 👍
@maxigit: I fixed it in #85. Please have a look at the PR description as this changes the return value of the custom indent functions. Please let me know if anything is unclear or still not working as expected. Thanks again!
Activity
wellle commentedon May 1, 2020
Interesting idea!
FWIW what I'm currently using for this: With https://github.com/jeetsukumaran/vim-indentwise you can type
[-to jump through the context lines by decreasing indentation.As for showing line numbers we have #40.
maxigit commentedon May 5, 2020
I didn't know about vim-indentwise which seems quite cool indeed.
To get why I want I'll need
0[_instead of[-but that's a details.However, an alternative to this (and displaying line number) would be to set number in the context window (which I understand will display
1,2,3etc which can then be used in combination withHso that1Hgoes to the first context, line,2Hthe second etc ...To do so, It seems that you only need to store the line number as well as the line in
w:contextand use it.wellle commentedon Aug 24, 2020
@maxigit: I just added support for line numbers in #81. So if you
:set relativenumberyou can use the displayed relative line numbers to jump to the context lines. Would you say that's enough to close this issue? Thank you!wellle commentedon Aug 24, 2020
For example in this screenshot if you want to jump to the
VAR_FUNCline (third context line) you could type52k.maxigit commentedon Aug 25, 2020
wellle commentedon Aug 25, 2020
@maxigit: Thanks for reporting, this has been fixed in #82. Please try again 🙏
maxigit commentedon Aug 26, 2020
wellle commentedon Aug 26, 2020
Cool, I'll close this issue then. Thanks again!
maxigit commentedon Aug 27, 2020
wellle commentedon Aug 27, 2020
Thank you for reporting this.
To be fully honest I am aware of this and had already started working on fixing it, but then wondered if people are actually using custom indent functions. So I decided to just release #81 and see if someone complains about it. So I have taken notice and will fix this 👍
wellle commentedon Aug 27, 2020
@maxigit: I fixed it in #85. Please have a look at the PR description as this changes the return value of the custom indent functions. Please let me know if anything is unclear or still not working as expected. Thanks again!
maxigit commentedon Aug 28, 2020