Tagged: CodeMix autoIndent
- This topic has 8 replies, 2 voices, and was last updated 7 years ago by
Brian Fernandes.
-
AuthorPosts
-
JamesParticipantHi, 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!
This topic was linked to an Issue on July 4, 2018 at 1:20 pmJuly 2, 2018 at 4:47 pm #592944
Brian FernandesModeratorJames,
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.
July 2, 2018 at 6:35 pm #592957
JamesParticipantThanks 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 7 years ago by
James.
July 2, 2018 at 6:39 pm #592960
JamesParticipantJust 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"); } }
July 4, 2018 at 6:43 am #593095
Brian FernandesModeratorJames,
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?
July 5, 2018 at 4:55 pm #593189
JamesParticipantI 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.
July 9, 2018 at 5:48 am #593325
Brian FernandesModeratorJames,
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?
July 19, 2018 at 3:46 pm #593774
JamesParticipantI’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+clickCodeMix 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!
July 20, 2018 at 7:05 am #593829
Brian FernandesModeratorJames,
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.
-
This reply was modified 7 years ago by
-
AuthorPosts