Ctrl-D for date while inline renaming is nice, but

Hi! o)

I set the default date format in DO to something like "YYYY_mm_dd", because I prefer underscores for every date, it works beautifully in the columns e.g.. The CTRL-D hotkey in the inline rename, it inserts "2024-08-19" though, it does not seem to take the settings into account?!

Maybe I can tweak something else?
Thank you! o)

.
.
.

PS (offtopic):
I think this list of shortcuts was added recently, right? It's very useful! o)
image
I think it misses one of my favorite inline-rename shortcuts though, which is CTRL+SHIFT and then Cursor-Up/Down to reuse existing filenames from anywhere in the file display, it's a god-mode feature! o) I don't need it in that list, it's just too good of a feature to not put people's noses on! o)

No, it uses its own:

image

1 Like

Is this a regular hotkey? I'm confused.. I will investigate.. o)

No it's not?! I have CTRL+D set to clear any selections (like in Photoshop) and there is no other related hotkey in the "Keys" tab of the customize dialog at least.

Where is that definition to be edited you are showing?

EDIT: Ah, I found it! o)
Here is my missing knowledge about Evaluators again I think.. o) Anyway, thank you! o)
That's quite very nice to be able to edit these hotkeys in there, I'm impressed once again, did not make use of that yet. Too many features added recently I guess.. o)

I see quite some code in there to handle all the insertion of date string, including handling the selection of text in the inline rename.

You as Evaluator evangelist, do you know how I can prevent the selection of the date string, whenever I pressed CTRL-D in the inline rename? I don't need to be selected, what I inserted with a hotkey as it needs another keypress like CURSOR-Right or something to not lose it on the next character I am going to type.

I had some quick tests by removing the lines like, but it still keeps selecting the date.

  selstart = 0;
  selend = len(datestr);

It's not a major issue of course.
I can finally use CTRL-D now in the inline rename, which is a great win already! o)

EDIT: Puh.. complicated code, there is another section which handles the selected text, I'm tinkering, thank you, I think I can make it work! o))

EDIT: Ok, just in case anybody cares, this is my adapted Evaluator code for "Insert Date".

datestr = now() as "d#yyyy_MM_dd";
// If the whole name stem is selected, add the date to the start and select it.
//if (selstart == 0 && selend >= len(valstem)) {
//  datestr = datestr + " ";
//  selstart = 0;
//  selend = len(datestr);
//  return datestr + value;
//}

// Otherwise, replace the selection with the date, adding spaces if needed.
leftchar = right(valleft,1);
rightchar = left(valright,1);
if (leftchar != "" && leftchar != " " && leftchar != "." && leftchar != "_") {
  //datestr = " " + datestr;
}
if (rightchar != "" && rightchar != " " && rightchar != "." && rightchar != "_") {
  //datestr = datestr + " ";
}
selstart = len(valleft + datestr); //len(valleft);
selend = selstart; //selstart + len(datestr);
return valleft + datestr + valright;

It disables the date being selected after insertion and also disables the top part, which adds different handling for the selection being replaced or not, depending on what part of the file was selected before. I don't think handling an existing selection differently makes much sense (for me), maybe there is and I did not get the point! o) I also did not like that a blank was added if some specific characters exist left or right, so I disabled that as well.

All in all, very customizable, actually, that's ridiculously high customizable, which I like! o))
And I learned something new, have a nice day everyone! o)

1 Like