bulletmark / edir

Program to rename, remove, and copy files and directories using your editor
139 stars 8 forks source link

Suggestion: change the default `.sh` suffix for the temporary file #21

Closed denilsonsa closed 4 months ago

denilsonsa commented 7 months ago

A default .sh suffix was added in f4600c616d39c609da5a1cfecb36f1f301c18bcd:

edir creates the temporary editing file with a .sh suffix so your EDITOR may syntax highlight the entries. Optionally, you can change this default suffix.

Unfortunately, this default doesn't give a good experience:

Screenshot 1 of vim/edir, renaming some music files

Screenshot 2 of vim/edir, renaming some music files

Screenshot 3 of vim/edir, renaming some music files

Screenshot 4 of vim/edir, renaming some music files

For any filename with special characters (and by "special" it can be digits, or anything with a special meaning in shell script), the syntax highlighting is bad. So bad it makes the UX incredibly worse for the user.

May I suggest a default being .edir instead? And then you or someone could create a simple syntax file for this type. And I'd argue that an unrecognized filetype with no syntax highlighting is better than a broken highlighting like that one on the screenshots.

denilsonsa commented 7 months ago

Like this syntax highlighting I created based on another work.

bulletmark commented 7 months ago

Sorry for the slow response. I am travelling OS with my family atm.

I think it is far too ambitious to attempt to create a new syntax definition specific to this minor edir tool. Sure you/I could create one for vim but that is only one (now rather obscure) editor among very many others.

You say the present .sh choice doesn't give a good experience but I disagree. I like that vim basically highlights those file names which i should edit to make them more compatible with the linux shell.

bulletmark commented 4 months ago

No reply from OP and given my comment I am not going to change this sorry.