0

I'm looking for a way to open the same .pas file twice in Delphi XE7 IDE. That would be really handy for editing var section in first and code in the second view of the file, especially for large functions. Is there such an option?

P.S. I'm aware about Ctrl+Shift+V shortcut to add the variable to the var section, but I cannot use as I'm porting C++ code to Delphi and IDE tools don't work well with files that are half C++ half Pascal.

Kromster
  • 7,181
  • 7
  • 63
  • 111
  • 3
    If you have multiple monitors, the `New Edit Window` option on the `View` menu might work for you. – Ken White Oct 30 '14 at 13:26
  • There's a flaw however, if projects gets compiled and halts on an error, both frames get focused on the error line, making it hard to navigate the 2nd view back to `var` section. Still better than nothing :) – Kromster Oct 30 '14 at 13:45
  • 2
    If your functions are so large that this is such a problem, you have a more important problem that needs fixing. You really do need to break your functions down into smaller, more manageable ones. You wouldn't take an aspirin to "fix" the problem of a knife stuck in your hand would you? – Disillusioned Oct 30 '14 at 14:45
  • @CraigYoung: I'm porting C++ code to Delphi. I don't have control over the original ;-) – Kromster Oct 30 '14 at 15:36
  • 1
    @Krom: That's why I said "might". :-) I usually use Notepad++ as my second view on a file, on a second monitor. The compiler knows nothing about that, so it doesn't cause a problem. – Ken White Oct 30 '14 at 16:08
  • FWIW, Castalia (which was - or still is? - free for registered users of XE7) has a proper split window for this. I like it a lot. – Rudy Velthuis Oct 30 '14 at 16:21
  • 1
    @Craig: sometimes one has to do things that require an overview over two parts of the edit buffer, and that is not necessarily because of large functions. Translating can be one of those things, but also having the interface of a class and the code of a method in view at the same time, etc. It can also be helpful when refactoring. – Rudy Velthuis Oct 30 '14 at 16:25

0 Answers0