开发者

D2010: Format only selected text?

开发者 https://www.devze.com 2022-12-17 15:46 出处:网络
Is there any way the Format Source (CTRL+D) command applies only to the selected text (or the current method the caret is in)?

Is there any way the Format Source (CTRL+D) command applies only to the selected text (or the current method the caret is in)?

I'm asking this because the formatter is quite buggy (ok, actually useless) when anonymous functions are used anywhere in the module 开发者_如何学Goto be formatted.


I have stopped using the code formatter because of all the bugs

A better option is the Jedi code Formater.

Here are some other alternatives


I'm using Delphi 2010 with Update 4 and 5 installed, and source code formatter works as expected; if a piece of code is selected, then running Source Format (Ctrl+D) just formats the selected part, and if no code is selected, then running formatter formats the current unit.

Also, it works fine for me in formatting anonymous methods, but I checked it only with simple ones, and I am not sure if it works properly on more complicated anonymous methods or not.

0

精彩评论

暂无评论...
验证码 换一张
取 消