First type the Ctrl-x Ctrl-e 'eval expression' command. In the mini-buffer you can enter expressions which are C expressions. Typically the following forms are valid:
In this context, the Tab key can be used to expand the functions, user functions and variables names. If the mini-buffer is empty, a complete list of these is displayed in the message box.
Don't forget the semicolon ';' at the end of the C expression you want to evaluate, otherwise you will get a parser error line 0: syntax error message.
Inserts the argument at the current position. The function insertchar is one of the built-in functions available in to drive the editor. This example shows how to insert a special character (via its ASCII code).
This example shows how to change font in Latex mode.
|
awk
'{
print $4}'
");
cmdshell is a built-in editor function. The argument is executed in a sub-shell and the result is inserted at the current position.
Opens a new text window, selects it, selects a file from a file-selector and loads it. Obviously it is easier to use the Window menu, but this example shows the facilities to interpret built-in editor functions through an eval expression command.
^
xe",
"gotoendoffile" );
In C-mode, binds gotoendoffile function to Ctrl-x e. The second argument syntax (keybinding), can be:
"c" --> key. "^[c" --> Esc key. "^[^c" --> Esc Ctrl key. "^c" --> Ctrl-key. "^xc" --> Ctrl-x key. "^x^c" --> Ctrl-x Ctrl-key.
where `c'
is any character except `^'
.
Furthermore `^^'
appoints the character
`^'
(so ^x^^
is Ctrl-x ^
),
`^ '
and `^@'
appoint the character
null (code 0).
It is also possible to bind keysym keys such as Home:
"k" --> key. "^[k" --> Esc key. "^xk" --> Ctrl-x key.
where `k'
is a keysym name (see §7.3.11 page ).