vim-utils / vim-man

View and grep man pages in vim
247 stars 32 forks source link

Buftype is somehow always set nofile #23

Closed halostatue closed 9 years ago

halostatue commented 9 years ago

I’m not exactly sure how this is happening in my vim configuration (https://github.com/halostatue/vim-config), but ftplugin/man.vim:26 is always being set for all file types somehow when I’m editing a single file. I’ll debug a bit further when I have time, but I’m not sure why this is happening and it’s causing problems for editing and committing. This is as of master at 60aac27.

bruno- commented 9 years ago

Hmm.. this is interesting. What are the steps to reproduce?

I suppose you tried the standard procedure of removing this plugin and then the problem does not appear anymore?

halostatue commented 9 years ago

I haven’t had time to try to reproduce or trace this down any further quite yet, but removing the plugin causes the problem to disappear. That’s what I’ve done for now.

qazo commented 9 years ago

am also facing the same issue. Could it be, that you used vim's version of ftplugin/man.vim, and removed the if &filetype == "man" line in the beginning? Cause it seems that your version sets the buftype to nofile no matter what type of file I try to save.

Hope I'm making sense here.

bruno- commented 9 years ago

Hey guys, I was able to reproduce this issue. Here's how you do it:

The problem is: both man.vim and this plugin are loaded.

Solution: remove runtime! ftplugin/man.vim from your vimrc.

bruno- commented 9 years ago

Hey, this issue is now documented in the readme https://github.com/vim-utils/vim-man/commit/308becea259848a24fd669a5eb2744ae6dc05cd4

qazo commented 9 years ago

Ah, thank you.

Nudin commented 7 years ago

What to do it I don't have the line runtime! ftplugin/man.vim in my vimrc but get this bug?