jeffkreeftmeijer / vim-numbertoggle

Toggles between hybrid and absolute line numbers automatically
https://jeffkreeftmeijer.com/vim-number/#automatic-toggling-between-line-number-modes
MIT License
682 stars 49 forks source link

A VERY worth while pull request #9

Closed greduan closed 11 years ago

greduan commented 11 years ago

You already know the previous pull request, so I will just explain what each commit did, and a summary of things that will be added/changed in this pull request.

greduan commented 11 years ago

683963e - In this commit I modified the .gitignore file in order for it to ignore all system generated files, for good measure. I also added a very useful functionality, which is that whenever a 'Command Line' buffer is opened (q:, q/ and q?) it will automatically disable relative line numbers, and will only use permanent line numbers, as relative line numbers are not useful, while knowing what entry the command is in the history is very useful.

dc8c7ed - I improved the way the previously added feature is handled. Just removed the file from the 'after' folder, and moved it to just be 'ftplugin/vim.vim', instead of 'after/ftplugin/vim.vim'.

53939d0 - A simple commit that fixes issue #6, which is pretty urgent I think. It now recognizes not only when you change between windows, but also when you change between buffers, or split windows.

bb42915 - Just improved the comments for fix to issue #6 and the previously used solution, which did not works as expected.

b2a1ea7 - I re-wrote the plugin pretty poorly, in order to fix the issue expressed by issue #5. It does work, but it's not very elegant, and it has a lot of badly coded parts. Modified the structure. I added the g:default_off variable, which if defined will make the plugin be turned off by default, but still work if called again.

3615988 - In this commit I fixed the badly coded structure a bit that was introduced by the previous commit. In this commit I made the plugin's functionality only be called, and loaded when needed, thus making the plugin lightweight if the user decides not to use it by default.

ae71cc6 - In this commit I made sure that the current Vim that is being used is compiled with 'autocmd' support.

f58fb63 - In this commit I fixed a bug that I introduced in the previous commit, now it checks if the current Vim that is being used is NOT compiled with 'autocmd' support. Before it would not work if the user had 'autocmd' support, now it will.

0c87cf0 to 7b885d5 - I added a "turn off" functionality. Which would allow you to turn the plugin off if you no longer need it, and if you need it again, then turn it back on again.

The commits by @ZyX-I are commits that he made himself in order to do stuff that I just wasn't able to do, because I was not understanding what he meant (which was probably very obvious).

This whole functionality adding happened while on chat. It started with this StackOverflow question. And it evolved and was implemented fully in this StackOverflow conversation.


That is all, I will post a comment with a summary of changes.

greduan commented 11 years ago

The following is a summary of changes in this pull request:

This is what I did in a nutshell. I really did save you a lot of work, and fail and error, so I hope you like it, and start using it yourself. :wink:

greduan commented 11 years ago

Here's another summary of recent commits:

40dceba - Fixed a bug where you didn't have the key mapping to turn the plugin on, if you had it enabled by default.

8315dde - Did a lot of work in the plugin's docs file, in order for it to follow Vim's standards on documentation.

bc19d8b to 1adb8a6 - Did work on the README file, making it almost the same as the plugin's docs and making it more informative, and generally more pleasant to the eye.

greduan commented 11 years ago

Please hold onto accepting this pull request. For now just understand it. :wink:

Right now I'm implementing an inverting feature, so that it does the complete opposite, but it's not complete yet. And I'm also looking into a compatibility issue with MiniBufExplorer and NERDtree.

- Eduan

greduan commented 11 years ago

Here's another summary of recent commits:

b2db8c9 to aaa12d2 - Did some minor changes to the README file, which essentially makes it better. Didn't alter any content though, or add any either.

ea2710c to f4306b7 - Added an "invert mode", which allows you to have the opposite effect than normal mode (insert mode with relative line numbers, normal mode with permanent line numbers etc.).

b45a5e4 - Added a disable function, which allows you to disable numbertoggle more effectively in certain cases.

Future: Still need to recognize NERDtree and MiniBufExplorer buffers and don't use any line numbers on them.

Right now you can accept this pull request if you want. I will continue to work on it so that I can do another pull request when I'm fully satisfied with my work. :smile:

- Eduan

jeffkreeftmeijer commented 11 years ago

Hey Eduan,

I'm sorry if I wasn't completely clear before, but could you please open one pull request with one commit per fix you did? It doesn't matter if that means you have to create a lot of separate ones. That way I can check out your changes and merge them in quickly using the merge button. Like the pull request you did before, I'm completely losing track here. Also, could you think of a good subject for your pull request? "A worthwhile pull request" doesn't tell me what problem it's solving, only that you think it makes sense for me to pull in.

Thanks,

-- Jeff

greduan commented 11 years ago

Ah I see.

I'll do that, might take a while though.

I'll try to give them descriptive names. ;)

frace commented 11 years ago

Hey Jeff and Greduan,

do both of you eventually consider to merge your efforts and repos? I really like Jeffs inital plugin but I really do see a lot of good ideas in Greduans fork.

Cheers frace

greduan commented 11 years ago

@frace Thanks for your comment. :)

Well, it is in the plans to merge it, definitely. But I don't currently have the time, environment or drive to do several pull requests.

In the mean while you can use my fork if you like, which I'm gonna try to keep it updated with new stuff this repo has. :)

frace commented 11 years ago

Ah that's fine and good to know. :) Btw, since you seem to be pretty experienced in vimscript would you consider to review a pullrequest of mine? That would be great! Please see https://github.com/jeffkreeftmeijer/vim-numbertoggle/pull/18