Home
Options

Statements auto dump and auto complete suggestion

After trying a few REPLs like CShell (which brought up the completion suggestion below) and scriptcs, I went back to Linqpad to get better error messages. While I eventually ended up using Program mode because my scripting required some new classes, while I was in statement mode I thought it would be nice if it could allow expressions as statements (more C than C#) and automatically dump them, or at least auto-convert the last expression to a statement calling Dump() so you don't have to constantly do a migrating Dump() as you build up statements.

Also, I noticed an annoyance from CShell auto-complete also afflicts Linqpad, which is that autocomplete defaults to picking something from the list, making it really hard to write some quick code using single character variable names as it types the wrong thing with every autocomplete, or you have to cancel autocomplete every time you type in a variable name.

Is there a way to restrict autocomplete to only complete on tab, or list mouse-click, or only autocomplete after periods, or could an option be added? This isn't as bad in Linqpad as CShell as Linqpad normally picks up the existence of the single character variables much better but it still doesn't always do the right thing.

Comments

  • Options
    Can you give me sample code that causes autocompletion to pop up when it shouldn't? I should be able to fix most of these.

    You can tell LINQPad not to activate completion listings on alpha characters in Edit | Preferences | Advanced > Autocompletion.

    On your first point, I will look at migrating towards Roslyn's scripting API, which will mean the expression /statement / program mode will be automatic.

Sign In or Register to comment.