facebook

Setting "editor.autoIndent" in CodeMix

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

    James
    Participant

    Hi, I just started trying out CodeMix, and love the idea of using my favorite Java IDE with my favorite front-end development tool. Great move!

    I just had a question about the setting “editor.autoIndent”. I’ve edited the file: ${user.home}/.codemix/settings.json, so it now looks like this:
    {
    “workbench.startupEditor”: “nothing”,
    “window.restoreWindows”: “none”,
    “editor.autoIndent”: true
    }

    …however, even after restarting Eclipse I can’t seem to get the code to auto indent whenever I copy and paste javascript, html, or xml code. Is there something I’m doing wrong, or is this setting just not supported yet?

    I realize this is a technical preview, so things are still being rolled out. I just wanted to post a question in case there’s something I’m doing wrong.

    Thanks!

    #592944 Reply

    Brian Fernandes
    Moderator

    James,

    Hi, I just started trying out CodeMix, and love the idea of using my favorite Java IDE with my favorite front-end development tool. Great move!

    Thank you!

    You could also try setting the editor.detectIndentation property to false and see if that makes a difference when you paste – with the few tests I’ve carried out though, there does seem to be something awry here. I’ll get this investigated further tomorrow to see if any workaround are possible before a fix.

    Thank you for asking.

    #592957 Reply

    James
    Participant

    Thanks for your quick reply.

    I did as you suggested, and set editor.detectIndentation to false, and that didn’t seem to make any difference:

    
    {
        "workbench.startupEditor": "nothing",
        "window.restoreWindows": "none",
        "editor.autoIndent": true,
        "editor.detectIndentation": false
    }
    

    I’ll keep playing around and see if there’s anything else I can figure out.

    Thanks!

    • This reply was modified 5 years, 9 months ago by James.
    #592960 Reply

    James
    Participant

    Just FYI, here’s my experiment…

    I start with the following javascript code:

    
    if (true) {
        if (true) {
            console.log("Hello World");
        }
    }
    

    Then I copy the line with “console.log”, and paste it above, and get these results:

    
    if (true) {
            console.log("Hello World");
        if (true) {
            console.log("Hello World");
        }
    }
    
    #593095 Reply

    Brian Fernandes
    Moderator

    James,

    Thanks for the examples, I ran a few additional tests here and no settings seem to help getting it to work, unfortunately. We’ve raised a bug for this, you should be seeing a link to it appear here in a bit.

    I’m afraid the only workaround (other than manually correcting the indenting) would be to format the inserted code.

    On other fronts, would love to hear more about your CodeMix experience -what sort of front end framework are you using, or is it just straight-up JavaScript?

    #593189 Reply

    James
    Participant

    I do all my front-end development in both AngularJS and Angular. In both cases I use TypeScript. I try to make model my AngularJS code to be as much as Angular as possible, to make migration easier.

    #593325 Reply

    Brian Fernandes
    Moderator

    James,

    Thanks for the note. We’re building additional tooling into CodeMix that should significantly improve the build experience. How do you currently manage your builds – do you just use a terminal directly inside the IDE? Any particular capabilities you’d like to see in CodeMix?

    #593774 Reply

    James
    Participant

    I’m probably old fashioned, but I prefer to run my builds from the command line. I mainly use the IDE for debugging and intelligent editing, such as:
    * Code completion / (IntelliSense?)
    * Adding imports automatically
    * Smart indenting on copy/paste
    * Showing compile errors in the Problems view
    * Refactoring
    * Jumping to class definitions on Ctrl+click

    CodeMix seems to give me all these features for things Eclipse doesn’t do well (TypeScript, HTML, Sass, XML, etc.). I think the integration of VS Code into Eclipse is a brilliant move, and well worth the price for a yearly subscription!

    #593829 Reply

    Brian Fernandes
    Moderator

    James,

    Thank you for detailing how you use CodeMix, and thank you for the kind words! I’ll send these notes on to the team – much appreciated.

    Have a great weekend.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Setting "editor.autoIndent" in CodeMix

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