Insert current date using an alternate format


Ray Shapp
 

To all,

I'm looking for a way to insert an alternately formatted copy of the
current date into a document using a keyboard shortcut.

In *View* > *Options* > *Tools*, I have defined a date format that is
appropriate for most needs and I routinely use it to insert the current
date and time by tapping the *F5* key. Sometimes, I would prefer to insert
just the current date as *YYYY-MM-DD* and I would like to do it with a
keyboard shortcut (possibly by adding to the contents of the *"D:\NoteTab
7\Shortcuts.dat"* file).

Since that may not be possible, I'm posting here in the Clips group. If a
clip is required, is there a way to launch the clip using a keyboard
shortcut even if that clip's clipbook is not currently selected?

Thank you for the help.

Ray Shapp
---


Axel Berger
 

Ray Shapp wrote:
and I would like to do it with a
keyboard shortcut (possibly by adding to the contents of the *"D:\NoteTab
7\Shortcuts.dat"* file).
It is an unfortunate drawback of NT that you can not define shortcuts for
clips, only for menu items. So only one date format I'm afraid.

even if that clip's clipbook is not currently selected?
Yes. I have several such clips I need often regardless of context and open
clip library. The solution is to define them in all frequently used
libraries using the same header and defining them as a Far Clip in all but
one of them. Example:

ß
^!FarClip LaTeX:ß

mol
^!FarClip LaTeX:<mol

If you choose your headers well then <Esc><Single-Key> is just as easy as a
traditional <Ctrl> combination a shortcut -- better because you get a
reminder before starting the wrong action.


N.B: The "Functions" clipbook this is from is non autoreplace while "LaTeX"
is autoreplace. For that reason many clips there have the extra opening "<"
as in "<mol" to avoid false triggering.


--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --


Ray Shapp
 

Hi Axel,

<<The solution is to define them in all frequently used libraries using the
same header and defining them as a Far Clip in all but one of them.>>

Very clever!

I'm just now beginning to play with this. My preferred key combo will be
Esc + D. I tried that key combo now before writing any clips and it opens a
selection box with a line of text having initial letter "d" selected.
Clicking the chevron at the right of the selection box opens about a
hundred other lines of text. What am I looking at? I checked Help for
"Escape", but didn't see anything relevant.

After I left focus from the test document and returned to composing this
email and returned again to the test document, the key combo now just
produces the letter "d" in the document. Why did the key combo behavior
change? Very curious!

Thank you,

Ray Shapp
---

On Fri, Jan 17, 2020 at 8:28 AM Axel Berger <Axel@berger-odenthal.de> wrote:

Ray Shapp wrote:
and I would like to do it with a
keyboard shortcut (possibly by adding to the contents of the
*"D:\NoteTab
7\Shortcuts.dat"* file).
It is an unfortunate drawback of NT that you can not define shortcuts for
clips, only for menu items. So only one date format I'm afraid.

even if that clip's clipbook is not currently selected?
Yes. I have several such clips I need often regardless of context and open
clip library. The solution is to define them in all frequently used
libraries using the same header and defining them as a Far Clip in all but
one of them. Example:

ß
^!FarClip LaTeX:ß

mol
^!FarClip LaTeX:<mol

If you choose your headers well then <Esc><Single-Key> is just as easy as a
traditional <Ctrl> combination a shortcut -- better because you get a
reminder before starting the wrong action.


N.B: The "Functions" clipbook this is from is non autoreplace while "LaTeX"
is autoreplace. For that reason many clips there have the extra opening "<"
as in "<mol" to avoid false triggering.


--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --




Axel Berger
 

Ray Shapp wrote:
My preferred key combo will be
Esc + D. I tried that key combo now before writing any clips and it opens a
selection box with a line of text having initial letter "d" selected.
Clicking the chevron at the right of the selection box opens about a
hundred other lines of text.
In that case you have very big clip libraries. In mine there are rarely
more than two or three beginning with the same first letter and the most
often used one is sorted nearest to the top. Instead of going for the mouse
I find it easier just to type <arrow-down> or, especially for the ones not
sorted alphabetically, a second and possibly third letter.

the key combo now just
produces the letter "d" in the document.
It's not a combo as such. Just typing <Esc> opens the dialog and typing one
or more letters selects the first fitting clip. <Esc on its own remembers
the last used one. Very fast and efficient for me.


--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --


Ray Shapp
 

.
Hi Axel,

Launching the clip for inserting alternate format date by pressing the
Escape key is working exactly as desired when my main library *Dad's Clips*
is selected. I placed the following into the *HTML-CSS* library and when
that library is selected, *Esc* followed by the letter "*d*" launches "
*direction*" instead of "*Date Insertion*".

^!FarClip "Dad's Clips:Date Insertion"
; by RAS 2020-01-18
; Based on suggestion from Axel Berger

^$GetDate(yyyy-mm-dd)$

If I press *Esc* followed by the letters "*da* while the *HTML-CSS* library
selected, "*Date Insertion*"does appear in the selection box, but when I
press *Enter*, I get no reaction. The selection box remains open with "*Date
Insertion*" in the box. The date is not inserted into the document.

Maybe I'm not using *^!FarClip* correctly?

Thank you,

Ray Shapp
---

On Fri, Jan 17, 2020 at 4:09 PM Axel Berger <Axel@berger-odenthal.de> wrote:

Ray Shapp wrote:
My preferred key combo will be
Esc + D. I tried that key combo now before writing any clips and it
opens a
selection box with a line of text having initial letter "d" selected.
Clicking the chevron at the right of the selection box opens about a
hundred other lines of text.
In that case you have very big clip libraries. In mine there are rarely
more than two or three beginning with the same first letter and the most
often used one is sorted nearest to the top. Instead of going for the mouse
I find it easier just to type <arrow-down> or, especially for the ones not
sorted alphabetically, a second and possibly third letter.

the key combo now just
produces the letter "d" in the document.
It's not a combo as such. Just typing <Esc> opens the dialog and typing one
or more letters selects the first fitting clip. <Esc on its own remembers
the last used one. Very fast and efficient for me.


--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --




Axel Berger
 

Ray Shapp wrote:
Maybe I'm not using *^!FarClip* correctly?
Hm, not sure.

What is the first line below? Is that what is shown in the clip book list
to the left, i.e. the name of the clip? And what is that ^$Get Date ...
supposed to achieve?


^!FarClip "Dad's Clips:Date Insertion"
; by RAS 2020-01-18
; Based on suggestion from Axel Berger

^$GetDate(yyyy-mm-dd)$

The name of your clip can be anything, probably best exactly the same as in
the main clipbook, i.e. "Date Insertion"

The ^!FarClip directive is to be in the content of your clip, i.e. what it
does. So if you list your clips showing headers like I do, what I would
expect to see would be:

-----------------------------------------------
Date Insertion
; by RAS 2020-01-18
; Based on suggestion from Axel Berger
^!FarClip "Dad's Clips:Date Insertion"
-----------------------------------------------


--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --