Skip to content
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

b:undo_ftplugin is not defined in some files under ftplugins (patch attached) #55

Closed
GoogleCodeExporter opened this issue Aug 18, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

I found some problems related to custom filetype recognition, related to the 
fact that some ftplugins do not define the b:undo_ftplugin variable.

Steps to reproduce:
1) Create a custom filetype "julia" with extension *.jl (which is already taken 
by lisp):
1) a) Put an autoload line under ~/.vim/ftdetect/julia.vim calling "set 
filetype=julia"
1) b) Create a standard ftplugin under ~/.vim/ftplugin/julia.vim, with the 
usual check for b:did_ftplugin
1) c) Optionally, add a custom syntax file as well
2. Edit a file with extension .jl

Expected result:
Lisp filetype should be overridden by julia.

Actual result:
The filetype is set to "julia", but when ~/.vim/ftplugin/julia.vim is sourced 
the variable b:did_ftplugin is already set and the file is therefore skipped, 
while the options set by $VIMRUNTIME/ftplugins/lisp.vim are retained.
Also, the julia syntax file gets loaded, but (because of the wrong settings) 
there may be problems with that as well.

My system:
Ubuntu Linux 11.10, Vim 7.3. Tested with a bare minimum vimrc file which only 
uses "set rtp=~/.vim,$VIMRUNTIME", "plugin on" and "set nocompatible".

I verified that by defining b:undo_ftplugin in the lisp.vim ftplugin the issue 
goes away.

I'm submitting a patch (against the latest repository code) which adds the 
definition of this variable to all ftplugin files which miss it.

Original issue reported on code.google.com by carlobal...@gmail.com on 5 Mar 2012 at 4:32

Attachments:

@GoogleCodeExporter
Copy link
Author

Many runtime files are managed by maintainers. The maintainers send new 
versions to Bram when they want to update something.
Last time a large scale update was needed, the initiator contacted all 
maintainers personally.

Original comment by sergey.k...@gmail.com on 5 Mar 2012 at 4:05

@GoogleCodeExporter
Copy link
Author

An updated by version of falcon.vim has been submitted by me (the maintainer).

Original comment by oliver.steven on 20 Mar 2012 at 2:23

@GoogleCodeExporter
Copy link
Author

Runtime file updates should be taken to the maintainer of the files. Closing 
this issue.

Original comment by chrisbr...@googlemail.com on 30 Sep 2014 at 9:47

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant