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

Not working when typing too fast #36

Open
agm1984 opened this issue Oct 6, 2017 · 2 comments
Open

Not working when typing too fast #36

agm1984 opened this issue Oct 6, 2017 · 2 comments

Comments

@agm1984
Copy link

agm1984 commented Oct 6, 2017

VSCode made some changes to JSX (at least), and now this extension isn't working.

autorenametag

My settings.json:

{
    "atomKeymap.promptV3Features": true,
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.formatOnPaste": true,
    "editor.snippetSuggestions": "top",
    "editor.tabSize": 4,
    "emmet.includeLanguages": {
        "javascript": "javascriptreact"
    },
    "files.associations": {
        "*.js": "javascriptreact"
    },
    "git.enableSmartCommit": true,
    "workbench.iconTheme": "material-icon-theme",
    "workbench.startupEditor": "newUntitledFile",
    "window.zoomLevel": 0
}

I was just messing around in my user settings.json in VS Code, and I found the auto-rename-tag settings. I thought it was part of VS Code so I got excited and deleted this extension, but that actually removed the settings :)

I added it back, and then I re-investigated and noticed it had "*" for languages, so I pasted the setting into my user settings to overwrite the defaults, and it works now. I noticed if I type really fast, it gets screwed up though. You should probably check that out.

Put in:

<Test>
</Test>

and then inside the closing tag, type 'lksjdfhlaksjdhf' pretty fast. It seems almost like there is a refresh rate that causes a problem if you type too fast.

Anyway, it works now so I'm happy!

@formulahendry
Copy link
Owner

Good to know it is working now.
For the rename function not working when typing fast, it is known issue. Currently, I did not find a good way to handle this.

@formulahendry formulahendry changed the title Extension stopped working when VS Code updated yesterday to 1.17.0 Not working when typing too fast Oct 9, 2017
@rtlayzell
Copy link

I haven't looked at the code but it seems a bug like this might arise if you are constantly re-checking the for a matching pair of tags every time the user enters a character.
perhaps you could just check the on the first change and then lock the renaming until the cursor moves outside of the "element name area" (e.g. a non-ident character such a space, '/', '>', etc.)

@SimonSiefke SimonSiefke mentioned this issue Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants