Hi All,
Would it be possible for Geany to automatically set the line endings to LF for Unix when working with bash scripts? I would suggest that if a file is detected as a bash script, the line ending setting should be automatically changed to LF. Also, if the extension is .sh, I would also like the line ending mode to be set to LF automatically.
I have been burned so many times since I sometimes write my scripts in Windows depending on which computer I am using. Since bash scripts do not run on Windows, they should probably always be converted to LF line endings.
Is there a way to do this currently, or could this be added as a new feature?
I love using Geany!
On 2016-12-06 05:15 PM, OwN-3m-All wrote:
Hi All,
Would it be possible for Geany to automatically set the line endings to LF for Unix when working with bash scripts? I would suggest that if a file is detected as a bash script, the line ending setting should be automatically changed to LF. Also, if the extension is .sh, I would also like the line ending mode to be set to LF automatically.
I have been burned so many times since I sometimes write my scripts in Windows depending on which computer I am using. Since bash scripts do not run on Windows, they should probably always be converted to LF line endings.
Are you sure Bash for Windows[0][1][2][3] doesn't support CRLF line endings?
It might be better to do this as a Geany (or GeanyPy) plugin.
Regards, Matthew Brush
[0]: https://sourceforge.net/p/msys2/wiki/MSYS2%20introduction/ [1]: https://www.cygwin.com/ [2]: https://git-for-windows.github.io/ [3]: http://www.windowscentral.com/how-install-bash-shell-command-line-windows-10
On 7 December 2016 at 11:21, Matthew Brush mbrush@codebrainz.ca wrote:
On 2016-12-06 05:15 PM, OwN-3m-All wrote:
Hi All,
Would it be possible for Geany to automatically set the line endings to LF for Unix when working with bash scripts? I would suggest that if a file is detected as a bash script, the line ending setting should be automatically changed to LF. Also, if the extension is .sh, I would also like the line ending mode to be set to LF automatically.
I have been burned so many times since I sometimes write my scripts in Windows depending on which computer I am using. Since bash scripts do not run on Windows, they should probably always be converted to LF line endings.
Are you sure Bash for Windows[0][1][2][3] doesn't support CRLF line endings?
It might be better to do this as a Geany (or GeanyPy) plugin.
Agree with Matthew its not a default setting, its something a user should set. Unfortunately line endings are not settings you can set in a filetype specific manner, but somebody could provide a pull request for that.
Cheers Lex
Regards, Matthew Brush
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users