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

file type bug with fugitive #41

Closed
co-dh opened this issue Oct 6, 2015 · 3 comments
Closed

file type bug with fugitive #41

co-dh opened this issue Oct 6, 2015 · 3 comments
Labels

Comments

@co-dh
Copy link

co-dh commented Oct 6, 2015

I have a bug that the file type of a Gstatus will be set to typescript erroneously.
Here is my .vimrc
"NeoBundle Scripts-----------------------------
if has('vim_starting')
if &compatible
set nocompatible " Be iMproved
endif

" Required:
set runtimepath+=/home/hao/.vim/bundle/neobundle.vim/
endif

" Required:
call neobundle#begin(expand('/home/hao/.vim/bundle'))

" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'

" Essential
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'Shougo/vimproc.vim', {'build' : {'linux' : 'make'}}
NeoBundle 'Quramy/tsuquyomi'
NeoBundle 'bling/vim-airline'
call neobundle#end()

" Required:
filetype off
filetype plugin indent on

" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
"End NeoBundle Scripts-------------------------

and here is the step to reproduce the bug:

  1. open a .tsx file
  2. :Gst
    You'll find the .git/index buffer is detected as typescript.

This bug then becomes more serious because it will detect all other files as typescript.

@co-dh
Copy link
Author

co-dh commented Oct 6, 2015

Ok, I figured it out myself as a programmer.
the autoload/tsuquyomi.vim:208

if &previewwindow
setlocal ft=typescript
endif

the setlocal here is too aggressive. Not every preview window is for typescript.
I commented it and the bug fixed.

@Quramy
Copy link
Owner

Quramy commented Oct 7, 2015

Hi @co-dh .

Thanks for your comments.

I wrote setlocal ft=typescript to high-lighting preview window in TypeScript's way.
And this code is not important.

So, I'll delete this code to fix this issue.

Quramy added a commit that referenced this issue Oct 7, 2015
@Quramy Quramy added the bug label Oct 7, 2015
@co-dh
Copy link
Author

co-dh commented Oct 8, 2015

I forget to say thank you for make this plugin and I like it.

@Quramy Quramy closed this as completed Mar 30, 2017
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