jez / vim-superman

Read Unix man pages faster than a speeding bullet!
http://blog.jez.io/2014/12/20/vim-as-a-man-page-viewer/
MIT License
190 stars 20 forks source link

get rid of setlocal number #18

Closed timfeirg closed 6 years ago

timfeirg commented 6 years ago

I always love the idea of displaying pure text and nothing else inside vim, so beautiful and elegant. And I'm always questioning the necessities and practical uses of displaying line numbers: it's only useful when you're trying to navigate to a specific line, but cannot help you with navigations any further.

People will probably always end up using something like easymotion to help navigate to the exact position of interest. And once they get used to the system, line numbers are pretty much a waste of screen spaces. And they'll inevitably want to get rid of them.

I tried putting autocmd FileType man setlocal nonumber in my vimrc, but it didn't seem to work, that's why I'm making this proposal to remove this configuration from the plugin itself, and just let user control how they want to display their man pages.

timfeirg commented 6 years ago

And I'll close this PR immediately if I can actually achieve nonumber without modifying superman.vim, I'm just, not too familiar with overriding filetype configurations in vim.

jez commented 6 years ago

I always love the idea of displaying pure text and nothing else inside vim, so beautiful and elegant.

Have you seen goyo.vim? I actually use a different version of the vman shell function locally (i.e., not the one distributed with this plugin):

https://github.com/jez/dotfiles/blob/2268223a9de878c6929294e4fca142f2d6eb6f46/util/functions/vman.sh#L18-L19

This makes it so that after opening a man page, it immediately goes into Goyo mode.

screen shot 2018-06-30 at 10 37 36 pm
jez commented 6 years ago

if I can actually achieve nonumber without modifying superman.vim

yeah I'm not sure if you can.

It's probably best to remove this setting actually. I first made this plugin because I didn't really understand how Vim config worked. A better solution from the get-go would have been to move setlocal number from this plugin to ~/.vim/after/ftplugin/man.vim. So I'll probably merge your change and then do that.

Thanks for your interest in Vim Superman!