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

es6 function in <button onClick={...} confuses indentation #21

Closed
JESii opened this issue May 13, 2017 · 6 comments
Closed

es6 function in <button onClick={...} confuses indentation #21

JESii opened this issue May 13, 2017 · 6 comments
Labels

Comments

@JESii
Copy link

JESii commented May 13, 2017

Inside a render function, I have the following code:
image

The code works just fine, but notice that vim thinks the mis-matched pair of braces are actually matching, so the indentation doesn't work.

Here's my Plugin list:

Plugin 'christoomey/vim-conflicted'
Plugin 'christoomey/vim-sort-motion'
Plugin 'christoomey/vim-system-copy'
Plugin 'christoomey/vim-titlecase'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'christoomey/vim-tmux-runner'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'ericpruitt/tmux.vim'
Plugin 'flazz/vim-colorschemes'
Plugin 'garbas/vim-snipmate'
Plugin 'honza/vim-snippets'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'kana/vim-fakeclip'
Plugin 'kana/vim-textobj-entire'
Plugin 'kana/vim-textobj-indent'
Plugin 'kana/vim-textobj-line'
Plugin 'kana/vim-textobj-user'
Plugin 'kchmck/vim-coffee-script'
Plugin 'majutsushi/tagbar'
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'mileszs/ack.vim'
Plugin 'nelstrom/vim-textobj-rubyblock'
Plugin 'pangloss/vim-javascript'
Plugin 'MaxMEllon/vim-jsx-pretty'
Plugin 'rking/ag.vim'
Plugin 'Rykka/lastbuf.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'tomtom/tlib_vim'
Plugin 'tpope/vim-commentary'
Plugin 'jesii/vim-cucumber'
Plugin 'SirVer/ultisnips'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-haml'
Plugin 'tpope/vim-markdown'
Plugin 'tpope/vim-projectionist'
Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-rvm'
Plugin 'tpope/vim-scriptease'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-unimpaired'
Plugin 'vim-ruby/vim-ruby'
Plugin 'vim-scripts/Align'
Plugin 'vim-scripts/Decho'
Plugin 'vim-scripts/ZoomWin'
Plugin 'vimoutliner/vimoutliner'
Plugin 'vim-scripts/taglist.vim'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-session'
" Doesn't clear flags for new branch!
Plugin 'Xuyuanp/nerdtree-git-plugin'
@MaxMEllon
Copy link
Owner

Please replace vim-javascript-syntax with vim-javascript and try.

- Plugin 'jelera/vim-javascript-syntax'
+ Plugin 'pangloss/vim-javascript'

@JESii
Copy link
Author

JESii commented May 13, 2017

Same problem; I simplified the code in the onClick to just
<button onClick={this.addNote}>+ Add Note</button>
and it's still confused.

@MaxMEllon
Copy link
Owner

Thank you for checking.

OK.
I will check this problem.

@JESii
Copy link
Author

JESii commented May 13, 2017

Thanks much! LMK what you'd like me to test

@MaxMEllon
Copy link
Owner

2017-05-14 2 17 57

I did not reproduce it.
Maybe vim-javascript and vim-javascript-syntax are in conflict, so please retry to remove vim-javascript-syntax.

@JESii
Copy link
Author

JESii commented May 14, 2017

That did it; thank you so much!!!

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

3 participants