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

set default to off #5

Closed horse-latitudes closed 9 years ago

horse-latitudes commented 12 years ago

Is there any way to set numbertoggle to off as default when opening a buffer? At the moment every time I open a buffer numbertoggle is active & I end up using <F4> which I have set as the shortcut to toggle it off, until it is needed...

jeffkreeftmeijer commented 12 years ago

That'd certainly be possible and I'd pull in a patch for that. It should be quite easy to do, but it'll probably take me a while to find the time. If anybody wants to pick this up, please do. :)

markus1189 commented 12 years ago

horse-latitudes: I am not using the plugin ATM but I think this would do what you want. Please try the version and if it works correctly we can merge it.

Alternatively, you can simply enter something similiar to the following in your personal .vimrc:

autocmd BufEnter * :call NumberToggle()

(not tested)

phildobbin commented 12 years ago

This doesn't work on OS X (10.6.8). It disables the plug-in completely. Haven't had time to try it on Linux yet. I'll attempt to do so tomorrow...

phildobbin commented 12 years ago

oh, by the way, I'm posting from my other repository on GitHub, horse-latitudes being by main one (hence no access to Linux at the moment)...

markus1189 commented 12 years ago

Okay tested the autocmd from my vimrc and this does simply nothing for me.

Did you try my version behind the this 'link' or only the autocmd? I tried my version on Linux and it worked for me https://github.com/markus1189/vim-numbertoggle

phildobbin commented 12 years ago

I tried the version behind the link (replaced the existing plug-in with yours). It also clashed with vim-scripts/YankRing.vim for some reason whereas the original one didn't. Could be an OS X thing.

I'll try the plug-in on Fedora & Ubuntu later today & let you know how it goes...

greduan commented 11 years ago

How is that going @phildobbin @horse-latitudes ?

greduan commented 11 years ago

@horse-latitudes @markus1189 @phildobbin I fixed this in my fork. #10