[Geany-Users] Geany “send current selection to” command line or batch file(as argument) or browser in Windows

Little Girl littlergirl at xxxxx
Sun Nov 8 23:07:18 UTC 2015


Hey there,

rch wrote:

>     Little Girl wrote
>     > It's not written very clearly (sorry, devs!). Here's
>     > a more clear set of instructions that should get it
>     > working for you:
 
>     Thats _very_ helpful.

I'm glad it was of use. (:

> Could you translate another bit of «Dynamic wildcards» for me?

I can try!
 
>     At
> http://www.geany.org/manual/current/index.html#template-wildcards
> how do I make a keyboard short cut that will paste Wildcard
> «filename» into my file ? Preferably the full path-and-file name.
 
>     And (better still) would it be possible to add the
>     current date or datetime on the following line ?

Well, there's good news and bad news. You can add a placeholder (that
gets replaced by the current file's name when you save the file) and
the date (or date and time) using the instructions at that link only
when creating a new file, because those instructions are for
creating and using a template. In the event that you want to try
that, here's my version of those instructions specifically for adding
the file name and date (or date and time):

====================
1) Open your ~/.config/geany/templates/files directory in a file
manager (you'll need to enable the display of hidden files to get to
it).
2) Create a new text file in the directory with whatever name you'd
like it to have (you could create myfirsttemplate.txt as an initial
experiment). Note that Geany will automatically suggest the same
extension for saving files created with that template.
3) Open the file you just created in Geany.
4) Type this into it:
{untitled}
{date}
5) Save the file.
6) Left-click File in the toolbar.
7) Left-click New (with Template) in the menu.
8) Left-click the name of your template. A new file will be created
with untitled on the first line and the date on the second line. The
cursor will be blinking at the beginning of the first line.
9) Use the arrow keys or the mouse to move the cursor below the two
automatically inserted lines of text.
10) Press the Enter key *or* type something inside the file and press
the Enter key. (Note: The Enter key is vital to Geany for some reason
- it will not replace the wildcard without a press of that key.)
11) Left-click File in the toolbar.
12) Left-click Save As in the menu.
13) Type in a name for the file.
14) Left-click the Save button or press the Enter key. The untitled
wildcard will be replaced with the file's name.

Alternative: If you'd rather have the date and time, replace {date}
above with {datetime}.
====================

As for keyboard shortcuts, you can press Alt + E and then press E
again and then use the arrow keys to select one of the date formats
to insert the date into a message.

An alternative to that would be to press Alt + T and then press M to
open the mini script interface. If you had already typed date into
the text area, you could click the Execute button. Or you can type
date into the text area and then click the Execute button, and then
from then on you won't need to type it again. Note that the mini
script interface offers the option to save scripts and load them, and
that's really powerful since the sky's the limit on what you can do
to a file if you know how to script it. (:

-- 
Little Girl

There is no spoon.


More information about the Users mailing list