-
Notifications
You must be signed in to change notification settings - Fork 47
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
Use norelativenumber instead of number #32
Conversation
@RyanMcG thanks for the pull request. theses are definite improvements. I haven't been using vim for sometime now so that might be the reason the plugin has fallen a bit behind that being said. None of the open pull requests aside form the loading guard I just merged are solutions that I like/ had a chance to test. That being said please fix your PR and we will have it merged! Thanks for your pull request and for fixing up inconsistencies 💯 . |
It works, so 👍 for merge. |
@RyanMcG ping. |
Thanks for putting in the effort to check it out! I hope I didn't come off too strong before, it wasn't my intention. @myusuf3 what changes did you want me to make? Does it not merge cleanly? |
@RyanMcG not at all. I like thoughtful criticism and improvements. :) It doesn't merge cleanly yes so if you could resolve that and test to make sure things work, we can get this merged in and look at other issues. |
Really the use of the number option should be part of the plugin but the current integration is poor. The nu and rnu means something different than nonu and rnu for instance.
I pulled and rebased my fork from yours and resolved conflicts. The "conflict" was just git being sensitive and because the cpo thing was moved close to where I changed the center and mode variables scope. Does that work? It merges cleanly locally. |
Use norelativenumber instead of number
Helpful features were merged into it. See myusuf3/numbers.vim#28 and myusuf3/numbers.vim#32.
My VIM version:
Here is a snippet from the vim help I acquired by doing locally *number_relativenumber*
The 'relativenumber' option changes the displayed number to be
relative to the cursor. Together with 'number' there are these
four combinations (cursor in line 3):
'nonu' 'nu' 'nonu' 'nu'
'nornu' 'nornu' 'rnu' 'rnu'
|apple | 1 apple | 2 apple | 2 apple
|pear | 2 pear | 1 pear | 1 pear
|nobody | 3 nobody | 0 nobody |3 nobody
|there | 4 there | 1 there | 1 there After a bit of digging I've found that the change occurs at patch 1115 (help text updated here). So versions 7.3.1115 and greater have these 4 various states instead of the previous 3 ( We need to have the plugin behave differently depending on the version. In effect this PR fixes this plugin for versions 7.3.1115 and greater and breaks it for older versions. I intend to submit another PR fixing this for both parties 😄. It's important to note that with 4 different states we can't model all possibilities with |
Or make second branch for users of old Vim patches. |
@hauleth pull down newest master. let me know if this fixes things for you. |
relativenumber
option since it only supports two states. The last commit removes modifications of thenumber
option by settingnorelativenumber
.s:
prefixed vars for proper scope.g:
means global which means other plugins can modify it. Furthermore,g:mode
andg:center
are not very unique names that might get used elsewhere.If you have any questions or want help with the merging or anything let me know. I'm not very handy with vim script but I'll do my best. Anyways, this plugin is a very good idea but it can be made much better if you merge the PR's currently against it.