Skip to content
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

Relativenumber not working correctly when set from vsvimrc #3075

Open
2 tasks
chtenb opened this issue Oct 31, 2023 · 8 comments
Open
2 tasks

Relativenumber not working correctly when set from vsvimrc #3075

chtenb opened this issue Oct 31, 2023 · 8 comments

Comments

@chtenb
Copy link

chtenb commented Oct 31, 2023

Describe the bug
When setting the set relativenumber in _vsvimrc, the middle number does not reflect the actual line number

image

However, when leaving it out of _vsvimrc, and then setting it manually in command mode with :set relativenumber it just works!

image

Environment (please complete the following information):

  • Visual Studio version: 17.7.5
  • VsVim version: newest
  • Programming Language: any
  • Check(Type 'x') any that are installed:
    • ReSharper
    • Visual Assist
@Azmaeus
Copy link

Azmaeus commented Nov 9, 2023

I noticed this as well. Until this is fixed, you can include in your _vsvimrc set number and that will show both relative numbers above and below, but the current line would have the actual line number as desired.

@chtenb
Copy link
Author

chtenb commented Nov 10, 2023

Ah, thanks for mentioning this. That is a very reasonable workaround

@nosami
Copy link
Collaborator

nosami commented Nov 16, 2023

I think this is the same behavior as real Vim when set number has not been set.

nonumber

@chtenb
Copy link
Author

chtenb commented Nov 17, 2023

Interesting, that would suggest that :set relativenumber somehow also does :set number under the hood when run from commandmode, but not when run from _vsvimrc.

@MishaDvali
Copy link

MishaDvali commented Jan 6, 2024

I can't turn it on once and for all. Every time I open file

I have to type: ":set relativenumber". How have you done this?

@chtenb
Copy link
Author

chtenb commented Jan 7, 2024

I've put set number and set relativenumber in vimrc

@Azmaeus
Copy link

Azmaeus commented Jan 9, 2024

image
Hopefully this helps. In my %USERPROFILE% I added a blank text file with the contents

set relativenumber
set number

saved the file as .vimrc (note the removal of the .txt extension), and then restart Visual Studio with the VsVim extension enabled.

@hrai
Copy link

hrai commented Feb 5, 2024

I have a .vsvimrc

That's where I added this

set relativenumber
set number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants