sakura/en/ExpandParameter

Last-modified: 2008-03-30 (日) 09:14:16

ExpandParameter

ExpandParameter Format

This special sign can be used by the following each character string.

Special Sign

The full path used by the example is assumed to be "D:\source\Main.cpp".

$$$ oneself.
$FFull path of open file. If there is no name (untitled).
$fName of open file. (Only file name + extension)
(^_- Example: Main.cpp
$NName of open file. (Convenient Display)
(^_- Example: source\Main.cpp (It depends on the setting)
$gName of open file. (extension division)
(^_- Example: Main
$/Full path of open file. (path delimitation is "/")
(^_- Example: D:/source/Main.cpp
$CText of the first line to exclude line feed code by average selecting it now.
The word at a present cursor position is acquired when there is no range of the selection.
$xPresent logical digit position (one byte number beginning from head).
$yPresent logical line position (one beginning).
$dPresent date (format of date of common setting).
$tPresent time (format of time of common setting).
$pPresent page (It is possible to use it only with header/footer of the print).
$PTotal page (It is possible to use it only with header/footer of the print).
$DTime-stamp on a file (format of date of common setting).
$TTime-stamp on a file (format of time of common setting).
$VVersion character string of editor.
$h32 head bytes of Grep retrieval key.
$SFull path name of Sakura-Editor. (sakura:1.5.7.0 or later)
(^_- Example: C:\Program files\sakura\sakura.exe
$MFull path name of macro executing it now. (sakura:1.5.7.0 or later)
$Iini file path to which it is referring now.

[tip] Note: When New file,Grep retrieval result window,Output window, $F,$f,$g,$/ are "(Untitled)", $D,$T are "(Modified)".

[hatena] Hint: $C becomes the same character string , saying that the character string taken into "Condition" column of the retrieval when "search dialog is put out the peel".
the following specifications.

  • The character string is acquired and when the range has been selected, the character string that has been selected is acquired.
  • The character string is acquired and when the range has not been selected, the word at the cursor position is acquired.
  • Even if two or more lines were selected, being acquired is one line on alone, and doesn't include line-feed most.
  • The character string that can be acquired 259 bytes.
    It might be different from return value of GetSelectedString(0);.

Syntax of Condition Branching

${Condition?String1$:String2$}

Either of character string 1 or character string 2 is evaluated by the result of the condition (display).
A condition branching (possible the nest) and a special sign can be put in the character string.
There is the one with three patterns or more according to the condition, too.
The following conditions can be used.

  • R ReadOnly $: Superscription prohibition $: It is not however sooner or later.
  • U Updated file $: File that has not been updated.
  • M Keyboard macro is being recorded $: It is not recording.
  • w Grep window $: Output window $: Normal window.
  • I The editor window is not active $: The editor window is active.

[tip] Note: The meaning of the condition of R is as follows.

  • ReadOnly: It does only for reading by operating "ReadOnly" on the editor.
  • Overwrite Prohibition: Turning on and other applications are with exclusive control and the attribute only for reading the file is open, etc.
  • It is not however sooner or later: Excluding the above-mentioned.

(^_- Example:

  • Before it develops: "$F is {U?modified$:un-modified}."
  • After it develops: "D:\source\Main.cpp is un-modified."