Global grammars
  Implementation details
 Number grammar
 Show numbers plus
Specific grammars
Unimacro test

Implementation details


In the inifile actions.ini the implementation for different programs is realized. When you call edit actions this file will open for inspection and editing.

gotoline n

The basic action for jumping to a line is the meta-action gotoline n, called from the lines grammar with the wanted line number for n.

In the default section you will find:

gotoline n = {Ctrl+ExtHome}{ExtDown n}{ExtUp}

So when there is no other way to jump to a line, you simply go to the top and then down the needed number of lines.

Here are some applications which do it another way:

(code is the program name of Visual Studio)

gotoline n = {ctrl+g}; n{enter}
realhome = {end}{home}{home}

gotoline n = EMACS goto-line; n{enter}

gotoline n = {ctrl+g}; n:n{enter}

gotoline n = {Ctrl+g}; W; n;{enter}
realhome = {alt+home}

gotoline n = {ctrl+g}; n{enter}; {home}

gotoline n = {ctrl+g}; n{enter}

gotoline n = {ctrl+g}; n{enter}

gotoline n = {ctrl+g}; n{enter}

Note: the excel action is overridden by the function metaaction_gotoline in the excel actions class module.

line numbers modulo hundred

When you set this option to true in the _lines.ini file (say edit lines):

line numbers modulo hundred = T

You will be able to use this feature for Excel, win32pad and Visual Studio Code (New, February 2021).

The clue is in the actions classes, which can provide, per application, the calling grammar with the current line number from the function getCurrentLineNumber. If this function does not return a valid number, this option is not available for the foreground application, as for example Komodo.

Visual Studio (2021)

For Visual Studio, you need to add the extension copy current line number to clipboard, and attach the shortcut key {ctrl+alt+c} to this extension.

The file in the folder actionclasses of Unimacro does the work. See there for more detailed instructions.

Komodo IDE

For this commercial program, the trick now also works (February 2021):

You need to make a "Userscript" in Komodo:

  • Go to View, Tabs & Sidebars, Toolbox
  • Click on the Tools pictogram (right top) and choose New Userscript
  • Give it a name, eg "copy current line number", keep Javascript.
  • Give it the Key Binding Alt+Shift+C. (When you need another Key Binding, you also need to edit in the folder actionclasses.)

Now paste the following code in the Userscript:

var editor = require(“ko/editor”);
var linenum = editor.getLineNumber(editor.getCursorPosition());
var clipboard = require(“sdk/clipboard”);

  • Probably you need to restart Dragon, and you can try the feature.
  • Note: when you want set/clear debug information (about the timing issues), change line 48 of the file in the folder actionclasses (debug=1 or debug=0).

Emacs (special!)

Note: for Emacs the line module hundred trick can be implemented by inserting the correct function, mdl-goto-line-mod100 instead of goto-line.


These are the actions like <<copy>>, <<cut>>, <<delete>>, <<duplicate>>, which can be investigated in the actions.ini file.

move copy actions

These actions require some more tuning in some applications. Details will follow.

Paragraph actions

These are tested in Word, and basically meant for this program.

In the actions.ini file there are now analogous to "selectdown": "selectparadown" and to "selectline" there is "selectpara":

selectpreviouspara = {ctrl+up}{shift+ctrl+up}
selectpara = {ctrl+down}{ctrl+up}{shift+ctrl+down}
selectparadown n = {shift+ctrl+down n}
selectparaup n = {shift+ctrl+up n}

These new meta-actions are found in the file sample_ini/actions.ini (March 2016, QH)