Editor Auto Indent
I keep hitting Ctr+K+D to auto indent my code when i'm in linqpad but it comments my code instead.
it would be great if linqpad could indent the code automatically.
This is now complete in LINQPad 5. www.linqpad.net/download.aspx/beta5
-
Pete Wilson commented
It would be nice if it indented object creation blocks properly (e.g. new {...}) or at least left them alone when manually indented.
Update: I see you can use tab/shift-tab to indent/undent a block of selected lines.
-
Michael Denny commented
amazing, thanks joe! :)
-
Fawad commented
Brilliant!
-
Kay Schüffler commented
If i remember correct the editor is an external component (either from #develop or another project/package). Anyway, if the external editor supports it, then LinqPad should automatically do also. So i think you're barking up the wrong tree. Btw: Yes, it would be quite handy to have an auto format.
-
Anonymous commented
I guess i set my VS different from most (C# as opposed to web?) ... its Ctrl+E,D that I press in linqpad to no effect :-)
-
Fawad Raza commented
Even the paid version doesn't have this facility. Such a shame. :(
-
NateC commented
I use Ctrl K, Ctrl D all day long in VS. Auto Code Formatting would be a great feature in LINQPad, mainly due to the copy/paste/test/scratchpad work - code quickly becomes a visual mess.
-
Maxwell Bloch commented
I moved my vote to the more powerful feature linked by B T
-
NoKo commented
Somewhat disagree - Linkpad gives 1-touch shortcuts for the very commonly used comment and uncomment commands - Ctrl+K, Ctrl+U - I've always found it stupid that VS requires a 2-key combo for these.
So linqpad could use some other shortcut, or only do this in VS mode. -
B T commented
Also see related auto-format suggestion:
http://linqpad.uservoice.com/forums/18302-linqpad-feature-suggestions/suggestions/1544891-provide-a-format-statement-option-context-menu-ite -
LarsM commented
Agree. LM