Pedro Peixoto
1 posts
indentation question anonymous functions
Edited by Pedro Peixoto on
Hi!,

Today i had to edit a bit of javascript and i decided to give 4coder a try, but there is a problem with anonymous functions and the way auto indentation works.

 1 2 3 \$(document).ready(function() { console.log( "ready!" ); }); 

this happens, it's not that big of a deal since there are ways around it, you can just declare the function, I was just curious if someone already tried to solve this problem or tried to implement javascript in 4coder.
Ryan Fleury
201 posts / 3 projects
Working at Epic Games Tools (RAD). Handmade Network lead, member of the Dion Systems team, maker of The Melodist and Telescope
indentation question anonymous functions
I believe Allen has said previously that 4coder doesn't work too well with brackets inside parentheses at the moment (I've had similar issues with some macros in C). At the end of the day, I bite the bullet and just let it be a little weird, or find some workaround (in your case, you'd just declare the function somewhere else). You can also turn off virtual whitespace and indent stuff manually, if you'd like (use alt+x and search for "virtual", which will give you the option to turn off the auto-indentation feature).
Blake Martin
33 posts
indentation question anonymous functions
That is, you _will_ be able to disable virtual whitespace in the future. Unfortunately, that day is not today, as disabling virtual whitespace crashes 4coder.