Vim: VS Code becomes VERY slow or crashes when writing Javascript code with JSX syntax

Created on 3 Nov 2017  路  10Comments  路  Source: VSCodeVim/Vim

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Environment:

  • VSCode Version: 1.17.2
  • VsCodeVim Version: 0.10.2
  • OS: Windows 10

What happened:


When I have a long line of text, expecially a JSX element with a parameter with long text in quotes, VS Code starts to work very slowly or completely crashes. This doesn't happen when Vim for VS Code is disabled.

What did you expect to happen:
Should work normally - not slowing down / crashing editor.

How to reproduce it:
Open a JSX file with VS Code with Vim extension enabled, try to edit a long line.

Most helpful comment

@jhixson thanks for the tip, I removed the extensions below and it seems to work fine now. The issue only happened when working with JSX/TSX files.

  • highlight-matching-tag
  • Auto Close Tag
  • Auto Complete Tag
  • Auto Rename Tag

All 10 comments

+1

Please, if anyone has a workaround at least, please let us know! I have to disable the plugin if I write something with longer lines or switch to Vim temporary, which is not cool at all...

Could you guys provide an example file? I tried it on a file I had lying around and I couldn't replicate.

It just happened to me using this code:

import React from 'react';
import Snackbar from 'material-ui/Snackbar';

const CookiesConsent = (props) => {
    return (
        <Snackbar {...props} a message={'En poursuivant votre navigation, vous acceptez l\'utilisation de cookies destin茅s 脿 la r茅alisation de statistiques de visites.'} />
    );
}

export default CookiesConsent;

@hristod Have you tried disabling any other extensions? For me the culprit actually seems to be the "auto-rename tag" extension. It seems to blow up with extremely long lines with lots of attributes. See this issue. With that disabled Vim performs fine for me.

@jhixson I haven't tried this one! And it does make great sense! I will disable it right now and will observe :) Thanks again for the great tip!

@jhixson thanks for the tip, I removed the extensions below and it seems to work fine now. The issue only happened when working with JSX/TSX files.

  • highlight-matching-tag
  • Auto Close Tag
  • Auto Complete Tag
  • Auto Rename Tag

I confirm too, removing Auto Rename Tag worked for me! Thanks, @jhixson!

Removing Auto Close Tag extension works for me!

For me, the plugin Beautify created the issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

st-schneider picture st-schneider  路  3Comments

Jimmy-Z picture Jimmy-Z  路  3Comments

lucastheisen picture lucastheisen  路  3Comments

WangRongda picture WangRongda  路  3Comments

gerardmrk picture gerardmrk  路  3Comments