3 ms·
How does an IDE know if a given line belongs in an if block or not?
by jonny_eh 9y ago
How does an IDE know if a given line belongs in an if block or not?
- true_religion 9y agoIt'll indent up to the most relevant valid block as possible, given your cursor at the moment. If you click within an if block, it'll indent into that if-block. The indentation strategy also looks to produce syntactically valid code, so long as what you are pasting lacked indentation errors.