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

On demand goes away on :Explore #474

Closed
4 of 11 tasks
alanhdu opened this issue Apr 15, 2016 · 2 comments
Closed
4 of 11 tasks

On demand goes away on :Explore #474

alanhdu opened this issue Apr 15, 2016 · 2 comments
Labels

Comments

@alanhdu
Copy link

alanhdu commented Apr 15, 2016

With the following vimrc:

call plug#begin("~/.vim/plugged")
Plug 'rust-lang/rust.vim', {'for': 'rust'}
call plug#end()

When I open a rust file, then run :vsplit and :Explore, the syntax highlighting from rust.vim disappears. (Video at https://asciinema.org/a/0uc8jtm81uztlisgmf13xhu00). This doesn't happen when I remove the {'for': 'rust'} in the .vimrc

This happens with both Ubuntu 14.04's vim and neovim.

:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:32)
Included patches: 1-52
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+acl             +comments        +ex_extra        +jumplist        -mouseshape      +path_extra      +signs           +textobjects     +writebackup
+arabic          +conceal         +extra_search    +keymap          +mouse_dec       -perl            +smartindent     +title           -X11
+autocmd         +cryptv          +farsi           +langmap         +mouse_gpm       +persistent_undo -sniff           -toolbar         -xfontset
-balloon_eval    +cscope          +file_in_path    +libcall         -mouse_jsbterm   +postscript      +startuptime     +user_commands   -xim
-browse          +cursorbind      +find_in_path    +linebreak       +mouse_netterm   +printer         +statusline      +vertsplit       -xsmp
++builtin_terms  +cursorshape     +float           +lispindent      +mouse_sgr       +profile         -sun_workshop    +virtualedit     -xterm_clipboard
+byte_offset     +dialog_con      +folding         +listcmds        -mouse_sysmouse  +python          +syntax          +visual          -xterm_save
+cindent         +diff            -footer          +localmap        +mouse_urxvt     -python3         +tag_binary      +visualextra     -xpm
-clientserver    +digraphs        +fork()          -lua             +mouse_xterm     +quickfix        +tag_old_static  +viminfo
-clipboard       -dnd             +gettext         +menu            +multi_byte      +reltime         -tag_any_white   +vreplace
+cmdline_compl   -ebcdic          -hangul_input    +mksession       +multi_lang      +rightleft       -tcl             +wildignore
+cmdline_hist    +emacs_tags      +iconv           +modify_fname    -mzscheme        -ruby            +terminfo        +wildmenu
+cmdline_info    +eval            +insert_expand   +mouse           +netbeans_intg   +scrollbind      +termresponse    +windows
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FO
RTIFY_SOURCE=1
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl    -L/usr/lib/python2.
7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
  • Type:
    • Bug
    • Enhancement
    • Feature Request
    • Question
  • OS:
    • All/Other
    • Linux (Ubuntu 14.04)
    • OS X
    • Windows
  • Vim:
    • Terminal Vim
    • GVim
    • Neovim
@junegunn
Copy link
Owner

Thanks, I can reproduce the problem, I'll look into it.

Having said that, I don't think you have to apply for option here. Most filetype-specific plugins are inherently lazy-loaded and for option of vim-plug doesn't help much.
See: https://github.com/junegunn/vim-plug#on-demand-loading-of-plugins

@junegunn
Copy link
Owner

Should be fixed now, thanks for the report!

BlakeWilliams added a commit to BlakeWilliams/vim-polyglot that referenced this issue Sep 7, 2016
When `Hexplore` or `Vexplore` is called the current buffer loses its
syntax highlighting if it's provided by polyglot.

This wraps each ftdetect block in an `augroup` which resolves the issue.

The solution was taken from junegunn/vim-plug#474
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants