I'd like Zeus to adapt the line endings to whatever is already in the file. Is this possible?
So if I opened a file with 0x0a line endings, and I entered some more lines, they'd end with 0x0a. If I opened a file with 0x0d0x0a line endings, and entered more lines, they'd end with Windows-style line endings.
Thanks.
Adaptable EOL?
-
- Posts: 6
- Joined: Wed May 03, 2006 1:48 am
-
- Posts: 6
- Joined: Wed May 03, 2006 1:48 am
Is scripting this a possibility?
This issue is really starting to bother me. Is there a script I could use to set the line ending based on what is found in the file?
It is possible to control the state of the UNIX write option via a script. Below is some Lua code that shows how this is done:Is there a script I could use to set the line ending based on what is found in the file?
Code: Select all
function key_macro()
original = get_editor_option("UnixWrite")
message_box(1, "UnixWrite " .. original)
set_editor_option("UnixWrite", 1)
value = get_editor_option("UnixWrite")
message_box(1, "UnixWrite " .. value)
value = set_editor_option("UnixWrite ", original)
value = get_editor_option("UnixWrite")
message_box(1, "UnixWrite " .. value)
end
key_macro() -- run the macro