Apparently the line format update was not applied when saving in ST.
This might help: https://sublime.wbond.net/packages/Line ... gs%20Unify
2nd line in multi-line script (1st indented) "not valid"
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: 2nd line in multi-line script (1st indented) "not valid"
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
aliteralmind
- Posts: 261
- Joined: 02 Dec 2014 16:49
Re: 2nd line in multi-line script (1st indented) "not valid"
That's a manual tool. It's not automatic.
There's also "LineEndings", but it doesn't seem to do anything. Hasn't been updated in eleven months, and no documentation.
Code: Select all
Line Endings Unify:
------------------
## Line Endings Unify
change files endings (`Mac`,`Unix`,`Windows`) to `Unix` (aka `\n`). (windows with sublime3 will be `Windows` (aka `\r\n`))
## How to use:
- drag folder to sublime
- use `cmd+shift+P` then `Line Endings Unify`
- or bind some key in your user key binding:
```js
{
"keys": ["ctrl+alt+shift+l"],
"command": "line_endings_unify"
}
```
- check file extentions to be handled
- done
**always backup your data**Windows 8.1, 64-bit
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: 2nd line in multi-line script (1st indented) "not valid"
Okay, no need to hunt down packages.
You can set in ST's (user) settings to enable on-the-fly line-ending switching.
So now you could just click the statusbar line-ending notifier, choose the Windows option, save the file and it should work in XY.
You can set
Code: Select all
"show_line_endings": trueSo now you could just click the statusbar line-ending notifier, choose the Windows option, save the file and it should work in XY.
To see the attached files, you need to log into the forum.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
aliteralmind
- Posts: 261
- Joined: 02 Dec 2014 16:49
Re: 2nd line in multi-line script (1st indented) "not valid"
That seems to have done the trick! At least at first impression.
Thank you to all for helping me work through this.
Thank you to all for helping me work through this.
Windows 8.1, 64-bit
-
admin
- Site Admin
- Posts: 66318
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: 2nd line in multi-line script (1st indented) "not valid"
It can, in the next beta version.aliteralmind wrote:Can't XY just ignore line-ending differences?
FAQ | XY News RSS | XY X
-
PeterH
- Posts: 2827
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: 2nd line in multi-line script (1st indented) "not valid"
Just a question - not that it matters for me, but to know: does that mean XY can work with files with CRLF, and with files with LF only - or it doesn't matter at all? I.e. both endings can be mixed in one file?admin wrote:It can, in the next beta version.aliteralmind wrote:Can't XY just ignore line-ending differences?
(Seems when changing a unix-created file with some simple windows editor, it just might add CRLFs - so the file contains mixed endings.)
-
admin
- Site Admin
- Posts: 66318
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: 2nd line in multi-line script (1st indented) "not valid"
Hmm, mixed endings are not supported ATM. I would say such files are corrupt.
FAQ | XY News RSS | XY X
-
PeterH
- Posts: 2827
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: 2nd line in multi-line script (1st indented) "not valid"
OK: no problem. Just wanted to know.admin wrote:Hmm, mixed endings are not supported ATM. I would say such files are corrupt.
(And depends on how it's programmed. You could have interpreted LFs and ignore associated CRs: then it would be transparent. But again: not neccessary.)
-
aliteralmind
- Posts: 261
- Joined: 02 Dec 2014 16:49
Re: 2nd line in multi-line script (1st indented) "not valid"
Nice.admin wrote:It can, in the next beta version.aliteralmind wrote:Can't XY just ignore line-ending differences?
Windows 8.1, 64-bit
XYplorer Beta Club