lite-xl icon indicating copy to clipboard operation
lite-xl copied to clipboard

Make "Create Directory" and "New Doc" have more consistent naming

Open benstigsen opened this issue 5 years ago • 8 comments

I just found out that a Create Directory command exists. I think this would be better as New Directory to keep consistency between new documents and directories.

benstigsen avatar Feb 18 '21 23:02 benstigsen

This was discussed (among many other things) in #15 (Complex Projects). I think it's good you opened the issue Ben.

In the mentioned issue (#15), i suggested this:

Core: Add Directory   ->  Core: Add folder to project
Core: Change Project Folder  ->  Core: Change Project   OR  Core: Switch Project
Core: Open Project Folder  -> Core: Open Project In New Window

i think directory should not be used anywhere, since folder means the same thing, but is understood by windows users, And lite-xl being cross platform and so on.

I just wrote suggestions i could think of from the top of my head, there might be other things that could be renamed. And perhaps its a good idea to make one big overhaul on names, i personally find changes like these most of the time annoying, even if i agree with the new name, since I already gotten used to the old one. What I am trying to say, rename as much as possible in one release.

Many programs usually first depracte the old name for some time before removing them, which would mean for a transition time having both versions of the command available, but a warning being displayed when the deprecated is used. That would probably be clunky in this case, but worth mentioning and considering in some cases (commandline options).


@franko have you changed the names already? Lets keep this issue open for discussion on naming and renaming of things in general.

budRich avatar Feb 18 '21 23:02 budRich

I just realized that I referred to some things the wrong way in this issue. I'm talking about consistency between Create Directory and New Doc, consistency is needed between these two, so I propose something like New Directory instead. Personally I prefer the word "directory", but I'm fine with both "folder" and "directory".

benstigsen avatar Feb 19 '21 00:02 benstigsen

I personally prefer directory as well, but it feels like a unnecessary fight to fight. Doc is also a bit awkward, feels a bit wordprocessory, but I don't think it should be renamed. But i guess you mean:

New Doc  && New Directory
Create Doc && Create Directory
Create New Doc && Create New Directory

?

This is actually also discussed in #15 (Complex Projects). Where I would actually like to see them combined into: Open Doc , which would have different effects depending on what you enter:

path entered action
existing file open the file
non existing file create the file (and necessary directories)
existing directory add directory to project
non existing directory well, that could just as well be a non-existing file, and would be treated like one

But I think all these actions should have stand alone commands, like open file, create file (which should prompt for path before it is created) and add directory to project . This is by the way maybe a discussion for it's own issue (how that Open Doc command could work), but i still think talking about names in this issue is good. I will soon make a summary of discussed names and add it to my topmost post in this issue.

budRich avatar Feb 19 '21 17:02 budRich

This can be solved if "New Doc" can takes a path as argument and creates the necessary directories. "Create Directory" can be removed. An editor is about docs after all.

DriNeo avatar May 08 '21 17:05 DriNeo

This can be solved if "New Doc" can takes a path as argument and creates the necessary directories. "Create Directory" can be removed. An editor is about docs after all.

I agree with this. I was planning to modify the command open-file to accept a filename that doesn't exist. The file will be created on save together with the directories if needed. I think this was really the suggestion of @budRich.

franko avatar May 08 '21 19:05 franko

Actually? If this is still relevant, then I will suggest simply using the spelling as in VS Code, since it looks as clear as possible. New Doc -> New File Create Directory -> New Folder

Of course, there may be some trick in this, but I don't quite understand the reasons for using doc and directory

image

Timofffee avatar Aug 16 '21 06:08 Timofffee

Actually? If this is still relevant

This is critical. The future of the project depends on this.

benstigsen avatar Sep 04 '22 16:09 benstigsen

That convention is already been used on the treeview context menu as seen:

Screenshot_2022-09-07_19-08-27

https://github.com/lite-xl/lite-xl/blob/master/data/plugins/treeview.lua#L551-L559

This should be easy change so PR welcome at least from my side.

jgmdev avatar Sep 07 '22 23:09 jgmdev