📄 macro_subrs.html
字号:
<HTML><HEAD><TITLE> Macro/Shell Extensions </TITLE></HEAD><BODY><A NAME="Macro_Subroutines"></A><H2> Macro Subroutines </H2><P><H3>Built in Variables</H3></P><P>These variables are read-only and can not be changed.</P><P><PRE><B>$active_pane</B></PRE>Index of the current pane.</P><P><PRE><B>$auto_indent</B></PRE>Contains the current preference for auto indent. Can be "off", "on" or "auto".</P><P><PRE><B>$calltip_ID</B></PRE>Equals the ID of the currently displayed calltip, or 0 if no calltip isbeing displayed.</P><P><PRE><B>$cursor</B></PRE>Position of the cursor in the current window.</P><P><PRE><B>$column</B></PRE>Column number of the cursor position in the current window.</P><P><PRE><B>$display_width</B></PRE>Width of the current pane in pixels.</P><P><PRE><B>$em_tab_dist</B></PRE>If tab emulation is turned on in the Tabs...dialog of the Preferences menu, value is thedistance between emulated tab stops. If tabemulation is turned off, value is -1.</P><P><PRE><B>$empty_array</B></PRE>An array with no elements. This can be used to initialize an array to an empty state.</P><P><PRE><B>$file_format</B></PRE>Current newline format that the file will be saved with. Can be "unix", "dos" or "macintosh".</P><P><PRE><B>$file_name</B></PRE>Name of the file being edited in the currentwindow, stripped of directory component.</P><P><PRE><B>$file_path</B></PRE>Directory component of file being edited in the current window.</P><P><PRE><B>$font_name</B></PRE>Contains the current plain text font name.</P><P><PRE><B>$font_name_bold</B></PRE>Contains the current bold text font name.</P><P><PRE><B>$font_name_bold_italic</B></PRE>Contains the current bold-italic text font name.</P><P><PRE><B>$font_name_italic</B></PRE>Contains the current italic text font name.</P><P><PRE><B>$highlight_syntax</B></PRE>Whether syntax highlighting is turned on.</P><P><PRE><B>$incremental_backup</B></PRE>Contains 1 if incremental auto saving is on, otherwise 0.</P><P><PRE><B>$incremental_search_line</B></PRE>Has a value of 1 if the preference is selected to always show the incremental search line, otherwise 0.</P><P><PRE><B>$language_mode</B></PRE>Name of language mode set in the current window.</P><P><PRE><B>$line</B></PRE>Line number of the cursor position in the current window.</P><P><PRE><B>$locked</B></PRE>True if the file has been locked by the user.</P><P><PRE><B>$make_backup_copy</B></PRE>Has a value of 1 if original file is kept in a backup file on save, otherwise 0.</P><P><PRE><B>$max_font_width</B></PRE>The maximum font width of all the active styles. Syntax highlighting styles are only considered if syntax highlighting is turned on.</P><P><PRE><B>$min_font_width</B></PRE>The minimum font width of all the active styles. Syntax highlighting styles are only considered if syntax highlighting is turned on.</P><P><PRE><B>$modified</B></PRE>True if the file in the current window hasbeen modified and the modifications have notyet been saved.</P><P><PRE><B>$n_display_lines</B></PRE>The number of lines visible in the currently active pane.</P><P><PRE><B>$n_panes</B></PRE>The number of panes in the current window.</P><P><PRE><B>$overtype_mode</B></PRE>True if in Overtype mode.</P><P><PRE><B>$read_only</B></PRE>True if the file is read only.</P><P><PRE><B>$selection_start, $selection_end</B> </PRE>Beginning and ending positions of theprimary selection in the current window, or-1 if there is no text selected in the current window.</P><P><PRE><B>$selection_left, $selection_right</B> </PRE>Left and right character offsets of the rectangular (primary) selection inthe current window, or -1 if there is no selection or it is not rectangular.</P><P><PRE><B>$server_name</B></PRE>Name of the current NEdit server.</P><P><PRE><B>$show_line_numbers</B></PRE>Whether line numbers are shown next to the text.</P><P><PRE><B>$show_matching</B></PRE>Contains the current preference for showing matching pairs, such as "[]" and "{}" pairs. Can be "off", "delimiter", or "range".</P><P><PRE><B>$match_syntax_based</B></PRE>Whether pair matching should use syntax information, if available.</P><P><PRE><B>$statistics_line</B></PRE>Has a value of 1 if the statistics line is shown, otherwise 0.</P><P><PRE><B>$sub_sep</B></PRE>Contains the value of the array sub-script separation string.</P><P><PRE><B>$tab_dist</B></PRE>The distance between tab stops for ahardware tab character, as set in theTabs... dialog of the Preferences menu.</P><P><PRE><B>$text_length</B></PRE>The length of the text in the current window.</P><P><PRE><B>$top_line</B></PRE>The line number of the top line of the currently active pane.</P><P><PRE><B>$use_tabs</B></PRE>Whether the user is allowing the NEdit to insert tab characters to maintainspacing in tab emulation and rectangular dragging operations. (The setting ofthe "Use tab characters in padding and emulated tabs" button in the Tabs...dialog of the Preferences menu.)</P><P><PRE><B>$wrap_margin</B></PRE>The right margin in the current window for text wrapping and filling.</P><P><PRE><B>$wrap_text</B></PRE>The current wrap text mode. Values are "none", "auto" or "continuous".</P><P><H3>Built-in Subroutines</H3></P><P><PRE><B>append_file( string, filename )</B></PRE>Appends a string to a named file. Returns 1 on successful write, or 0 ifunsuccessful.</P><P><PRE><B>beep()</B></PRE>Ring the bell.</P><P><PRE><B>calltip( "text_or_key" [, pos [, mode or position_modifier, ...]] )</B></PRE>Pops up a calltip. <pos> is an optional position in the buffer where the tipwill be displayed. Passing -1 for <pos> is equivalent to not specifying a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -