Home General

Change Code of New Query Template

I believe the code for new queries (template) is embedded (IIRC) in LINQPad 8. I'm wondering, in case I am wrong, how I can modify the default template. First off, I hate having 3 blank lines at the end (I turned the comment at the end off in preferences). Additionally, there are other lines we would like to have (by default) for all new queries. I have had to workaround this by creating a snippet that, when a new tab/query is opened, I would have to delete it's contents and then execute the snippet.

Comments

  • This is not something that's been requested so far. It would be somewhat complicated in that this template would need to be different depending on whether the script was of type C# Program or C# Statements (or C# Expression). And when you switch between those three modes, LINQPad would need to know how to convert between them.

  • Well, I guess the reason for this request was just so I could remove unnecessary the blank lines at the end of the default code templates when you have Preferences > Advanced > Editor > Include user-code placeholder comment in 'C# Program' mode set to False.

    I know, not a huge deal, but to me, I manually remove them every new query and it's just extra stuff I would like to be removed. Personal preference only. :) You've been awesome at applying my requests before, so I thought, what the hell, it doesn't hurt to ask. Keep up the great work!

  • Thanks for the clarification. I don't understand you'd want to remove the blank lines - it makes it easier to add extra code. If it weren't for this, you'd have to hit enter three times before typing in the new code.

Sign In or Register to comment.