Toad World® Forums

Is there a way to let TOAD detect the newline style?

I am working with both windows and linux files, so I have different line-endings.

TOAD offers the option to choose the line-endings, but is there an option to let TOAD detect the line-endings when opening a file?
The current option is useful for new files, but when opening an existing file I think it would be better to preserve the existing style.

There is no way to do this, but it should have been the default behavior for a very long time now. Most every other text editor has a default newline setting while detecting and maintaining the mode used by the opened file. There should also be conversion feature to switch between the EOL modes. It has been logged and I’ll try to get to this one before the end of this beta cycle.

Sorry for the delay here, but the change wasn’t quite as trivial as it seems. At any rate, this is done for the first beta. There are a few remaining kinks to work out regarding formatting. We’ll see how it plays out and hopefully the pitchforks don’t come swinging because I believe this new behavior to be the correct way it should have been handled all along.

Notable changes… I’ll post this in beta release notes too.

  1. The “Save source files in Unix format” option has been replaced with a radio group to select the default EOL mode: Windows or Unix. It functions the same as before, but it’s now the initial EOL mode of editor memo instances. Elsewhere in the product there is no change to how it has always behaved.

  2. New Editor tabs will use the above option. This is different than before where editor tabs always used CRLF mode, but would convert newlines at save time.

  3. When a file is loaded from disk the EOL mode of the file is used for the editor tab containing it. This does not affect other editor tabs or the default EOL mode option, only that one tab uses the file’s EOL mode.

  4. The EOL mode is retained whenever text is inserted or modified. This includes insertion of code templates, pasting text, formatting, etc.

  5. The EOL mode of the editor can be changed via rt-click|EOL Conversion menu. The same options are available on Toad’s main Edit menu (toolbar restore default required or manually add them)

  6. Newlines sent to Oracle are always converted to LF as they have always been, no change here.

  7. to-do: add status bar indicator showing the newline mode