facebook

Disable auto completion /* */ when press backslash key \ in a javascript file

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #626493 Reply

    gabriv
    Participant

    Editing a javascript file, when I hit the backslash key \, I get auto complete comment /* */.
    I need something like this: alert('this includes a new line \n now');
    but it’s imposible to write it, I always get: alert('this includes a new line /* n */ now');

    How can I disable de comment auto completion?

    #626503 Reply

    Brian Fernandes
    Moderator

    gabriv,

    That sounds like a very frustrating experience. We do not have auto-completion set to insert /* */ on typing a backslash, so this is certainly not default behavior.

    1) Sanity check: Can you confirm you are using the CodeMix JavaScript editor? Right click the file > Open with and confirm that JavaScript :: CodeMix is selected.
    2) Does this happen for any other editors?
    3) Does it happen for JavaScript files in other projects?
    4) Rather than have you run down specific preferences, as a quick test, can you switch to a new dummy workspace, and try with a JavaScript file in that workspace? If it doesn’t occur there, we can look for workspace settings that could be causing this behavior.
    5) Can you go to Preferences > CodeMix > Extensions > HTML page and click the, “Edit in settings file” link and send us the contents of that file?

    Thanks!

    #626504 Reply

    gabriv
    Participant

    I’ve check all your points:
    1) Yes
    2) It happen with any CodeMix editor (JavaScript::CodeMix, Plain Text::CodeMix, TypeScript::CodeMix, etc).
    3) Yes
    4) I’ve tried with a new .js file, in a new javascript project in a new workspace
    5) In my current workspace:

    {
      "folders": [
        {
          "path": "D:\\desarrollo\\workspaces\\ianus\\PROJECT_A"
        },
        {
          "path": "D:\\desarrollo\\workspaces\\ianus\\PROJECT_B"
        }
      ]
    }

    In the new workspace:

    {
      "folders": [
        {
          "path": "C:\\Users\\username\\Documents\\workspace-spring-tool-suite-4-4.1.0.RELEASE\\JavascriptTestProject"
        }
      ]
    }

    The workaround I use is hit the backslash in any other editor in wich works, copy it and paste it in my js file

    • This reply was modified 4 years, 7 months ago by gabriv.
    #626506 Reply

    Brian Fernandes
    Moderator

    Gabri,

    Thank you for the detailed responses. Really quick question that I forgot to ask, I’m assuming backslash in a non-CodeMix Eclipse editor works? I believe you implied this, but just want to be sure. Thanks!

    #626508 Reply

    gabriv
    Participant

    Yes, backslash in a non-CodeMix Eclipse editor works, in fact, I use that for copy backslash symbol and paste in my js with Javascript CodeMix editor

    #626510 Reply

    Brian Fernandes
    Moderator

    Gabri,

    Could you come in to LiveChat (Help > CodeMix > Live Chat) where we can diagnose your problem live? This would probably be the fastest way to address your problem. If not, please answer these questions:

    1) Do you have a non-standard keyboard layout? Is \ something you get with a single keypress or do you have to use a modifier (like Shift or AltGr) to get it?
    2) Can you tell us what extensions you have installed? Help > CodeMix Extensions will show you a list of installed extensions on the right hand side. If you could send us the entire list (a couple of screenshots would do), that would help.

    Thanks!

    #626581 Reply

    gabriv
    Participant

    At this time I cannot go to LiveChat, but:
    1) Yes, I have to press the modifier AltGr to get the backslash. This simbol \ is over the key that also contains º and ª. (at left of the key with number 1, and over the Tab key) (Sent a photo of my keyboard)
    2) Sent a screenshots

    Attachments:
    You must be logged in to view attached files.
    #626585 Reply

    Brian Fernandes
    Moderator

    Gabri,

    1) Thanks, I have feeling Alt Gr is the cause, we’ll investigate.

    2) I had asked for a screenshot from Help > CodeMix Extensions (as not all extensions could contribute preference pages) – but I think we’re good for now.

    We’ll let you know as soon as we have more on this, hopefully won’t be too difficult to fix.

    #626801 Reply

    Brian Fernandes
    Moderator

    Gabri,

    I believe we have found a problem with the keybindings which we will address in our next release – you can make these changes right now.

    1) Go to Preferences > General > Keys
    2) In the filter box, type “Toggle comment”
    3) You will find two “Toggle Block Comment” commands, bound to Ctrl + Alt + / and Ctrl + Alt + \. Please delete those bindings and change them to Ctrl + Shift + / and Ctrl + Shift + \ respectively.
    4) On applying this change, you should no longer see this issue.

    Hope this helps, and thank you for bringing this to our notice.

    #626810 Reply

    gabriv
    Participant

    Hi Brian,
    I’ve just done it and it works.

    Thank you!

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Disable auto completion /* */ when press backslash key \ in a javascript file

You must be logged in to post in the forum log in