Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
S
 save_keystroke_macro
 save_position
 Scope
 Scope Rules
 Scrap Buffer
 Scrap Buffers
 Scrap Primitives
 Screen Primitives
 screen_dump
 Search and Replace
 Search and Translate Primitives
 search_back
 search_case
 search_fwd
 search_list
 search_string
 searchpath
 Selection Statements
 self_insert
 send_signal
 set_attribute
 set_backup
 set_backup_option
 set_binary_size
 set_btn2_action
 set_buffer
 set_buffer_cmap
 set_buffer_flags
 set_buffer_title
 set_buffer_type
 set_calling_name
 set_char_timeout
 set_color
 set_color_pair
 set_ctrl_state
 set_ea
 set_echo_format
 set_encoding
 set_feature
 set_file_magic
 set_font
 set_idle_default
 set_indent
 set_kbd_name
 set_line_flags
 set_macro_history
 set_margins
 set_mouse_action
 set_mouse_type
 set_msg_level
 set_process_position
 set_property
 set_ruler
 set_scrap_info
 set_syntax_flags
 set_tab
 set_term_characters
 set_term_feature
 set_term_features
 set_term_keyboard
 set_terminator
 set_top_left
 set_window
 set_window_cmap
 set_window_flags
 set_window_priority
 set_wm_name
 Setup
 shell
 shift
 Signals
 sin
 sinh
 sleep
 sort_buffer
 sort_list
 Source Code
 Source Information
 Special Purpose Macros
 Spell Checker Primitives
 spell_buffer
 spell_control
 spell_dictionary
 spell_distance
 spell_string
 spell_suggest
 splice
 split
 split_arguments
 splitpath
 sprintf
 sqrt
 srand
 sscanf
 Startup and main
 stat
 Statements
 static
 Storage Class
 strcasecmp
 strcasestr
 strcmp
 strerror
 strfilecmp
 strftime
 string
 String Literals
 String Primitives
 String Types
 string_count
 strlen
 strnlen
 strpbrk
 strpop
 strrstr
 strsignal
 strstr
 strtod
 strtof
 strtol
 strverscmp
 substr
 suspend
 swap_anchor
 switch
 switch statement
 symlink
 Syntax Highlighting
 Syntax Highlighting Primitives
 syntax_build
 syntax_column_ruler
 syntax_rule
 syntax_token
 System Buffer
int save_keystroke_macro(string filename)
Save the current keystroke macro.
void save_position()
Saves current cursor/buffer state.
Variables and functions can be used only in certain regions of a program.
The four kinds of scope.
The scrap is a special buffer used for moving or copying blocks of text.
Scrap buffers are buffers which have been assigned the job of cut and paste storage.
int screen_dump(string filename)
Dump an image of the screen.
Text are be manipulated by searching and/or translating selected text by the use of Regular expression search patterns.
int search_back(string pattern,
 [int re],
 [int case],
  [int block],
 [int length])
Backwards buffer search.
int search_case([int case])
Set the search pattern case mode.
int search_fwd(string pattern,
 [int re],
 [int case],
  [int block],
 [int length])
Buffer search.
int search_list( [int start],
string pattern,
 list expr,
 [int re],
 [int case])
Search list contents.
int search_string(string pattern,
string text,
  [int &length],
 [int re],
 [int case])
Searches for a pattern in a string.
int searchpath( [string path],
string filename,
  [string extension],
string &result,
 [int mode],
 [int expand = FALSE])
Searches for a given file in a specified path.
A selection statement evaluates an expression, called the controlling expression, then based on the result selects from a set of statements are then executed.
void self_insert([int character])
Insert a character as if it was typed.
int send_signal(int signal)
Send signal to a process buffer.
int set_attribute(  [int|string text],
[int|string normal],
 [int bufnum])
Set the color attributes.
int set_backup(int mode,
 [int bufnum])
Set backup creation mode.
int set_backup_option(int what,
 [int bufnum],
 parameter)
Set backup options.
int set_binary_size([int size])
Set binary chunk size.
int set_btn2_action([int action])
Set the second button action.
int set_buffer(int bufnum)
Set the current buffer.
int set_buffer_cmap([int mapid|string name],
[int bufnum])
Set a buffers character-map.
void set_buffer_flags([int bufnum],
 [string|int or_mask],
[string|int and_mask],
 [int set = 1])
Set buffer flags.
int set_buffer_title(  [int bufnum],
[string title])
Set a buffers title.
int set_buffer_type([int bufnum],
 [int type = NULL],
[string encoding = NULL])
Set the buffer storage type.
void set_calling_name(string name =  NULL)
Set the name of the calling macro.
void set_char_timeout([int timeout])
Set the escape delay.
int set_color([list|string spec],
[int create = TRUE])
Set screen colors.
void set_color_pair(string|int ident,
  [int|string fg],
 [int|string bg],
 [int|string sf])
Set a specific color.
void set_ctrl_state(int ctrl,
int state,
 [int winnum])
Set the state of a window control.
int set_ea(string filename,
 ...)
Set file extended information.
void set_echo_format([string format = NULL])
Set the echo line format.
int set_encoding([string encoding = NULL],
 [int bufnum = NULL])
Set a buffers character encoding.
int set_feature([int|string feature],
[string value])
Config an editor feature.
int set_file_magic([string encoding],
[int cost])
Define the file type detection rules.
int set_font([string normalfont],
[string italicfont])
Set the current window fonts.
int set_idle_default(int internal =  0)
Set idle interval.
int set_indent([int indent],
[int bufnum])
Set the buffers default indentation.
void set_kbd_name(string name,
 [int kbdid])
Set the keyboard name.
int set_line_flags([int bufnum],
[int start],
[int end],
 [int and_mask],
[int or_value])
Associate line flags.
string set_macro_history(  [int index = 0],
[string value])
Set the macro execution history.
int set_margins([int bufnum],
 [int left = NULL],
[int right = NULL],
 [int style = NULL],
[int colorcolumn = NULL])
Set buffer formatting margins.
int set_mouse_action(string name)
Set keyboard mouse handler.
int set_mouse_type()
Sets the mouse type.
int set_msg_level(int level)
Set level of informational messages.
int set_process_position([int line],
[int column])
Set process insertion position.
int set_property(  int obj_id,
string key,
 [declare value])
Set a dictionary item.
int set_ruler([int bufnum],
[list|string|int ...])
Configure the buffer ruler.
void set_scrap_info(  [int last],
[int type],
[int bufnum])
Set the scrap buffer details.
int set_syntax_flags(int flags,
 [int|string syntable])
Set syntax flags.
int set_tab([int increment],
[int bufnum])
Derive the buffer tab stops.
int set_term_characters(int value0,
 ....)
Set terminal special characters.
int set_term_feature(  int|string ident,
 [string|int value])
Set a terminal attribute.
int set_term_features(list features)
Define terminal attributes.
int set_term_keyboard(list kbd)
Define terminal keyboard definitions.
int set_terminator( [int bufnum],
int|string term)
Set a buffers line terminator.
int set_top_left([int line],
[int column],
 [int winnum],
[int csrline],
[int csrcolumn],
[int bufnum])
Manages window view port coordinates.
int set_window(int winnum)
Set the active window.
int set_window_cmap([int mapid|string name],
[int winnum])
Set a windows character-map.
void set_window_flags([int winnum],
 [string set|int or_mask],
[string clear|int and_mask])
Set window flags.
int set_window_priority(int priority,
 [int winnum])
Set the window display priority.
void set_wm_name([string wname],
[string iname])
Set the window and/or icon name.
GRIEF’s local configuration may be viewed using the --config option.
int shell([string cmd],
[int use_shell],
 [string completion],
 [string stdin],
[string stdout],
[string stderr],
 [int mode],
[string spec])
Spawn a sub-shell process.
declare shift(list lst)
Shift the first list element.
Signals are a limited form of inter-process communication used in Unix, Unix-like, and other POSIX compliant operating systems.
float sin(float val)
Sine function.
float sinh(float val)
Hyperbolic sine function.
void sleep([int seconds = 1],
[int milliseconds = 0])
Suspend execution for an interval of time.
int sort_buffer([int bufnum],
[string|int comparator = 0],
 [int start],
[int end],
[int type = 3])
Sort buffer content.
list sort_list(list lst,
  [string|int comparator = 0],
 [int type = 3])
Sort list.
Macro source code is ASCII text encoded; note UTF-8 is a planned feature.
Similar to registered macros, special purpose macros act a signal handlers.
list spell_buffer(int start_line,
 [int end_line],
  [int tokenize = 1],
 [int suggest])
Spell the specified buffer.
declare spell_control(int action,
 ...)
Spell control.
int spell_dictionary(int,
string|list)
Spell dictionary modifications.
int spell_distance(string a,
string b)
Edit distance.
int spell_string(string word,
 [int length],
  [int tokenize = 0],
 [int suggest = FALSE])
Spell the specified word or line.
list spell_suggest(string word,
 [int length])
Suggest spelling of the the specified word.
int splice(list lst,  
int offset =  0,
  [int length],  
 [declare value]  )
Splice a list, removing and/or adding elements.
list split(string expr,
string|integer delims,
  [int numeric = FALSE],
 [int noquoting = FALSE],
  [int empties = FALSE],
 [int limit = NULL])
Split a string into tokens.
list split_arguments(string arguments)
Argument split.
int splithpath(string path,
  [string &dir],
 [string &name],
 [string &ext],
 [string &drive])
Searches for a given file in a specified path.
int sprintf(string &buffer,
string format,
 ...)
Formatted printing to a string.
float sqrt(float val)
Square root function.
int srand([int seed = time()],
[int depth])
Seed the random number generator.
int sscanf(string str,
string format,
 ...)
Read formatted data from string.
Every macro source may have a main() function; where you place it is a matter of preference.
int stat([string path],
[int size],
 [int mtime],
[int ctime],
 [int atime],
[int mode],
[int uid],
[string uid2name],
 [int gid],
[string gid2name],
 [int nlink],
[int inode])
Obtain file information.
Grief statements are constructed in the same manner as the statements in the C language.
static var1, var2, ..;
Define a function or module scope.
A storage class defines the scope (visibility) and life time of variables and/or functions within a C Program.
int strcasecmp(string s1,
string s2,
 [int length])
String case insensitive compare.
sub-string. int strcasestr(
   string haystack,
   string needle
)
Locate first occurrence of a case insensitive.
int strcmp(string s1,
string s2,
 [ int length])
String compare.
string strerror([int errnum = errno],
 [string &manifest],
[int multi = FALSE])
String error.
int strfilecmp(string file1,
string file2,
 [int length])
Filename comparison.
string strftime([string format = NULL],
[int time = NULL])
Format time and date.
string sym1, sym2 ...;
Declare a string symbol.
A string literal is a sequence of characters from the source character set enclosed in double quotation marks (“”).
A string is a sequence of printable characters.
int string_count(string haystack,
int needle|string needles)
Count occurrences of characters in a string.
int strlen(string|list arg,
 [int step = 1])
String length.
int strnlen(string|list arg,
int maxlen,
 [int step = 1])
String length limited to an explicit maximum.
int strpbrk(string str,
string characters)
Search a string for any of a set of characters.
string strpop(string str,
 [int length = 1])
Pop the leading character(s).
int strrstr(string haystack,
string needle)
Locate last occurrence of a sub-string.
int strsignal(int signo,
  [string &manifest],
 [int multi = FALSE])
Return string describing signal.
int strstr(string haystack,
string needle)
Locate first occurrence of a sub-string.
int strtod(string str,
 [int &endofoffset])
String to double.
int strtof(string str,
 [int &endofoffset])
String to float.
int strtol(string str,
 [int &endoffset],
 [int base])
Convert a string into its numeric value.
int strverscmp(string s1,
string s2)
Version string compare.
string substr(string str,
 [int offset],
 [int length])
Extract a sub-string.
void suspend()
Suspend current process.
int swap_anchor()
Swaps the mark with the current position.
switch(expr) statement
Switch statement.
switch selection clause.
int symlink(string path1,
string path2)
Create a symbolic link.
Syntax highlighting allow different colors and text styles to be given to dozens of different lexical sub-elements of syntax.
void syntax_build([int timestamp],
 [string cache],
[int|string syntable])
Build a syntax hiliting engine.
int syntax_column_ruler(  list ruler,
 [string attribute],
 [int|string syntable])
Column syntax coloriser.
void syntax_rule(string pattern,
 string attribute,
 [int|string syntable])
Define a syntax hilite rule.
void syntax_token(int type,
  [<type1> param1],
 [<type2> param2],
 [int|string syntable])
Define a syntax token.
There are two primary categories of buffers, user and system buffers.