! Preferences file for NEdit ! ! This file is overwritten by the "Save Defaults..." command in NEdit ! and serves only the interactively settable options presented in the NEdit ! "Preferences" menu. To modify other options, such as key bindings, use ! the .Xdefaults file in your home directory (or the X resource ! specification method appropriate to your system). The contents of this ! file can be moved into an X resource file, but since resources in this file ! override their corresponding X resources, either this file should be ! deleted or individual resource lines in the file should be deleted for the ! moved lines to take effect. nedit.fileVersion: 5.5 nedit.shellCommands: \ Utilities>Spell::s:ED:\n\ (cat;echo "") | spell -b\n\ Utilities>Word count::w:ED:\n\ csh -fc 'set wc=`wc`; echo $wc[1] "lines," $wc[2] "words," $wc[3] "characters"'\n\ Utilities>Sort::o:EX:\n\ sort\n\ Make>make (plain)::m:W:\n\ make\n\ Make>make (csh -i)::m:W:\n\ csh -i -c 'set cdDirNames = ":"; alias addcd "echo \\$cwd"; if ( -r .cshcd) source .cshcd; if ( ! $?CC ) source `choose_cc`; make; :'\n\ Make>optimise (csh -i)::m:W:\n\ csh -i -c 'set cdDirNames = ":"; alias addcd "echo \\$cwd"; if ( -r .cshcd) source .cshcd; if ( ! $?CC ) source `choose_cc`; setenv CDEBUGFLAGS "-DNDEBUG -O"; setenv LDEBUGFLAGS ""; make; :'\n\ Make>debug (csh -i)::m:W:\n\ csh -i -c 'set cdDirNames = ":"; alias addcd "echo \\$cwd"; if ( -r .cshcd) source .cshcd; if ( ! $?CC ) source `choose_cc`; setenv CDEBUGFLAGS "-gyz"; setenv LDEBUGFLAGS "-gyz"; make; :'\n\ Make>target (csh -i)::m:IW:\n\ csh -i -c 'set cdDirNames = ":"; alias addcd "echo \\$cwd"; if ( -r .cshcd) source .cshcd; if ( ! $?CC ) source `choose_cc`; make `cat` ; :' 2>&1\n\ Make>target optimise (csh -i)::m:IW:\n\ csh -i -c 'set cdDirNames = ":"; alias addcd "echo \\$cwd"; if ( -r .cshcd) source .cshcd; if ( ! $?CC ) source `choose_cc`; setenv CDEBUGFLAGS "-DNDEBUG -O"; setenv LDEBUGFLAGS ""; make `cat` ; :' 2>&1\n\ Make>target debug (csh -i)::m:IW:\n\ csh -i -c 'set cdDirNames = ":"; alias addcd "echo \\$cwd"; if ( -r .cshcd) source .cshcd; if ( ! $?CC ) source `choose_cc`; setenv CDEBUGFLAGS "-gyz"; setenv LDEBUGFLAGS "-gyz"; make `cat` ; :' 2>&1\n\ Tabs>detab:Shift+Ctrl+Alt+I::EX:\n\ detab\n\ Tabs>retab:Shift+Ctrl+I::EX:\n\ retab\n\ C/C++ Prog>Box comment@C:Shift+Ctrl+B::EX:\n\ boxcomment|retab\n\ C/C++ Prog>Strip comment@C:::IX:\n\ sed -e 's./\\\\*. .' -e 's.\\\\*/. .' -e 's.//. .'\n\ File>Find in files>Find all and open@C:Shift+Ctrl+Alt+F::ID:\n\ f="`cat`"; nedits -noask -do "find(\\"$f\\")" `grep -F -l "$f" ./*.[ch]`\n\ File>Find in files>Find all and open@C++:Shift+Ctrl+Alt+F::ID:\n\ f="`cat`"; nedits -noask -do "find(\\"$f\\")" `grep -F -l "$f" ./*.[CHch]*`\n\ File>Find in files>Find all@C:Shift+Alt+F::IW:\n\ grep -F -n -e "`cat`" [a-zA-Z]*.[ch]\n\ File>Find in files>Find all@C++:Shift+Alt+F::IW:\n\ grep -F -n -e "`cat`" [a-zA-Z]*.[chCH]*\n\ File>Find in files>Find all@*:Shift+Alt+F::IW:\n\ grep -F -n -e "`cat`" *\n\ File>Find in files>Open found:::ID:\n\ f="`(cat; echo "")|cut -f1,2 -d:`"; fl=`echo "$f"|cut -f1 -d:`; li=`echo "$f"|cut -f2 -d:`; nedits -noask -line $li $fl\n\ File>chmod u+w:::DL:\n\ chmod u+w %\n\ File>chmod u-w:::DL:\n\ chmod u-w %\n\ File>save & chmod u-w:::DSL:\n\ chmod u-w %\n nedit.macroCommands: \ List files:Shift+Ctrl+O::: {\n\ #define list_all_files\n\ # {\n\ byName = "name"\n\ byPath = "path"\n\ byOpen = "open order (last first)"\n\ \n\ file = ""\n\ sort = byName\n\ \n\ while (file == "")\n\ {\n\ list = ""\n\ current = $file_path $file_name\n\ \n\ files = $empty_array\n\ \n\ if (sort == byName)\n\ {\n\ for (file = focus_window("last"); file != ""; file = focus_window("next"))\n\ files[$file_name " - " $file_path] = file\n\ sort = byPath\n\ }\n\ else if (sort == byPath)\n\ {\n\ for (file = focus_window("last"); file != ""; file = focus_window("next"))\n\ files[$file_path $file_name] = file\n\ sort = byOpen\n\ }\n\ else if (sort == byOpen)\n\ {\n\ i = 0\n\ for (file = focus_window("last"); file != ""; file = focus_window("next"))\n\ files[i++ ": " file] = file\n\ sort = byName\n\ }\n\ \n\ for (file in files)\n\ list = list file "\\n"\n\ \n\ focus_window(current)\n\ \n\ file = list_dialog("Raise which file", list, "OK", "Sort by "sort, "Cancel")\n\ button = $list_dialog_button\n\ if (file != "" && button == 1)\n\ break\n\ else if (button != 2)\n\ break\n\ }\n\ if (file != "")\n\ {\n\ open(files[file])\n\ focus_window(files[file])\n\ raise_window(files[file])\n\ }\n\ # }\n\ }\n\ Complete Word:Alt+D::: {\n\ # Tuning parameters\n\ ScanDistance = 5000\n\ \n\ # Search back to a word boundary to find the word to complete\n\ startScan = max(0, $cursor - ScanDistance)\n\ endScan = min($text_length, $cursor + ScanDistance)\n\ scanString = get_range(startScan, endScan)\n\ keyEnd = $cursor-startScan\n\ keyStart = search_string(scanString, "<", keyEnd, "backward", "regex")\n\ if (keyStart == -1)\n\ return\n\ keyString = "<" substring(scanString, keyStart, keyEnd)\n\ \n\ # search both forward and backward from the cursor position. Note that\n\ # using a regex search can lead to incorrect results if any of the special\n\ # regex characters is encountered, which is not considered a delimiter\n\ backwardSearchResult = search_string(scanString, keyString, keyStart-1, \\\n\ "backward", "regex")\n\ forwardSearchResult = search_string(scanString, keyString, keyEnd, "regex")\n\ if (backwardSearchResult == -1 && forwardSearchResult == -1) {\n\ beep()\n\ return\n\ }\n\ \n\ # if only one direction matched, use that, otherwise use the nearest\n\ if (backwardSearchResult == -1)\n\ matchStart = forwardSearchResult\n\ else if (forwardSearchResult == -1)\n\ matchStart = backwardSearchResult\n\ else {\n\ if (keyStart - backwardSearchResult <= forwardSearchResult - keyEnd)\n\ matchStart = backwardSearchResult\n\ else\n\ matchStart = forwardSearchResult\n\ }\n\ \n\ # find the complete word\n\ matchEnd = search_string(scanString, ">", matchStart, "regex")\n\ completedWord = substring(scanString, matchStart, matchEnd)\n\ \n\ # replace it in the window\n\ replace_range(startScan + keyStart, $cursor, completedWord)\n\ }\n\ Fill Sel. w/Char:::R: {\n\ if ($selection_start == -1) {\n\ beep()\n\ return\n\ }\n\ \n\ # Ask the user what character to fill with\n\ fillChar = string_dialog("Fill selection with what character?", "OK", "Cancel")\n\ if ($string_dialog_button == 2 || $string_dialog_button == 0)\n\ return\n\ \n\ # Count the number of lines in the selection\n\ nLines = 0\n\ for (i=$selection_start; i<$selection_end; i++)\n\ if (get_character(i) == "\\n")\n\ nLines++\n\ \n\ # Create the fill text\n\ rectangular = $selection_left != -1\n\ line = ""\n\ fillText = ""\n\ if (rectangular) {\n\ for (i=0; i<$selection_right-$selection_left; i++)\n\ line = line fillChar\n\ for (i=0; i=0 && get_character(i)!="\\n"; i--)\n\ startIndent++\n\ for (i=0; i<$wrap_margin-startIndent; i++)\n\ fillText = fillText fillChar\n\ fillText = fillText "\\n"\n\ for (i=0; i<$wrap_margin; i++)\n\ line = line fillChar\n\ for (i=0; i=$selection_start && get_character(i)!="\\n"; \\\n\ i--)\n\ fillText = fillText fillChar\n\ }\n\ }\n\ \n\ # Replace the selection with the fill text\n\ replace_selection(fillText)\n\ }\n\ Remove DOS CRs:::: {\n\ # do replacements one at a time to preserve rangesets, marks etc.\n\ # this does have the unfortunate effect of generating more UNDOs though...\n\ RE = "regex"\n\ PAT = "(\\\\s+\\r?|\\r)$"\n\ for (pos = search(PAT, 0, RE); pos != -1; pos = search(PAT, pos, RE))\n\ replace_range(pos, $search_end, "")\n\ }\n\ Tabs 4:Ctrl+4:4:: {\n\ set_tab_dist(4)\n\ }\n\ Tabs 8:Ctrl+8:8:: {\n\ set_tab_dist(8)\n\ }\n\ Language>From editor string:::: {\n\ NEDIT_require_macro_file("ModeString.nm")\n\ \n\ ModeStringInterpret()\n\ }\n\ Language>C++:::: {\n\ NEDIT_require_macro_file("ModeString.nm")\n\ \n\ ModeStringInterpret("C++")\n\ \n\ if ($language_mode != "C++")\n\ set_language_mode("C++")\n\ }\n\ Language>Doxygen:::: {\n\ b = dialog("Which Doxygen style?", "Easy", "Strict")\n\ if (b == 1)\n\ set_language_mode("Doxygen")\n\ else if (b == 2)\n\ set_language_mode("Doxygen strict")\n\ else\n\ return\n\ \n\ set_em_tab_dist(4) # turn on emulated tabs\n\ set_tab_dist(4)\n\ set_use_tabs(0) # do not use tabs in auto padding\n\ }\n\ Language>grep -n out:::: {\n\ set_language_mode("grep -n out")\n\ }\n\ Comments>/* Comment */@C@C++@Java@CSS@JavaScript@Lex:::R: {\n\ selStart = $selection_start\n\ selEnd = $selection_end\n\ replace_range(selStart, selEnd, "/* " get_selection() " */")\n\ select(selStart, selEnd + 6)\n\ }\n\ Comments>/* Uncomment */@C@C++@Java@CSS@JavaScript@Lex:::R: {\n\ sel = get_selection()\n\ selStart = $selection_start\n\ selEnd = $selection_end\n\ commentStart = search_string(sel, "/*", 0)\n\ if (substring(sel, commentStart + 2, commentStart + 3) == " ")\n\ keepStart = commentStart + 3\n\ else\n\ keepStart = commentStart + 2\n\ keepEnd = search_string(sel, "*/", length(sel), "backward")\n\ commentEnd = keepEnd + 2\n\ if (substring(sel, keepEnd - 1, keepEnd) == " ")\n\ keepEnd = keepEnd - 1\n\ replace_range(selStart + commentStart, selStart + commentEnd, \\\n\ substring(sel, keepStart, keepEnd))\n\ select(selStart, selEnd - (keepStart-commentStart) - \\\n\ (commentEnd - keepEnd))\n\ }\n\ Comments>// Comment@C@C++@Java@JavaScript:::R: {\n\ replace_in_selection("^.*$", "// &", "regex")\n\ }\n\ Comments>// Uncomment@C@C++@Java@JavaScript:::R: {\n\ replace_in_selection("(^[ \\\\t]*// ?)(.*)$", "\\\\2", "regex")\n\ }\n\ Comments>// --- bar@C++@Java@JavaScript:::: {\n\ beginning_of_line()\n\ insert_string("// -----------------------------------------------------------------------------\\n")\n\ }\n\ Comments>// ==== bar@C++@Java@JavaScript:::: {\n\ beginning_of_line()\n\ insert_string("// =============================================================================\\n")\n\ }\n\ Comments>/* --- */ bar@C@C++@Java@JavaScript:::: {\n\ beginning_of_line()\n\ insert_string("/* -------------------------------------------------------------------------- */\\n")\n\ }\n\ Comments># Comment@Perl@Sh Ksh Bash@NEdit Macro@Makefile@Awk@Csh@Python@Tcl:::R: {\n\ replace_in_selection("^.*$", "#&", "regex")\n\ }\n\ Comments># Uncomment@Perl@Sh Ksh Bash@NEdit Macro@Makefile@Awk@Csh@Python@Tcl:::R: {\n\ replace_in_selection("(^[ \\\\t]*#)(.*)$", "\\\\2", "regex")\n\ }\n\ Comments>-- Comment@SQL:::R: {\n\ replace_in_selection("^.*$", "--&", "regex")\n\ }\n\ Comments>-- Uncomment@SQL:::R: {\n\ replace_in_selection("(^[ \\\\t]*--)(.*)$", "\\\\2", "regex")\n\ }\n\ Comments>! Comment@X Resources:::R: {\n\ replace_in_selection("^.*$", "!&", "regex")\n\ }\n\ Comments>! Uncomment@X Resources:::R: {\n\ replace_in_selection("(^[ \\\\t]*!)(.*)$", "\\\\2", "regex")\n\ }\n\ Comments>/* Bar Comment@C@C++:::R: {\n\ if ($selection_left != -1) {\n\ dialog("Selection must not be rectangular")\n\ return\n\ }\n\ start = $selection_start\n\ end = $selection_end-1\n\ origText = get_range($selection_start, $selection_end-1)\n\ newText = "/*\\n" replace_in_string(get_range(start, end), \\\n\ "^", " * ", "regex") "\\n */\\n"\n\ replace_selection(newText)\n\ select(start, start + length(newText))\n\ }\n\ Comments>/* Bar Uncomment@C@C++:::R: {\n\ selStart = $selection_start\n\ selEnd = $selection_end\n\ newText = get_range(selStart+3, selEnd-4)\n\ newText = replace_in_string(newText, "^ \\\\* ", "", "regex")\n\ replace_range(selStart, selEnd, newText)\n\ select(selStart, selStart + length(newText))\n\ }\n\ Comments>/* ==== */ bar@C@C++@Java@JavaScript:::: {\n\ beginning_of_line()\n\ insert_string("/* ========================================================================== */\\n")\n\ }\n\ Make C Prototypes@C@C++:::: {\n\ if ($selection_start == -1) {\n\ start = 0\n\ end = $text_length\n\ } else {\n\ start = $selection_start\n\ end = $selection_end\n\ }\n\ string = get_range(start, end)\n\ nDefs = 0\n\ searchPos = 0\n\ prototypes = ""\n\ staticPrototypes = ""\n\ for (;;) {\n\ headerStart = search_string(string, \\\n\ "^[a-zA-Z]([^;#\\"'{}=>MultiTag>Find def@C@C++")\n\ }\n\ Go there@grep -n out:Shift+Ctrl+C::: {\n\ NEDIT_require_macro_file("GoThereGrep.nm")\n\ \n\ goThereGrep()\n\ }\n\ Go there@Man page output:Shift+Ctrl+C::: {\n\ NEDIT_require_macro_file("ManHelp.nm")\n\ \n\ ManHelp()\n\ }\n\ C/C++ Prog>Open include@C@C++:Shift+Ctrl+Y::: {\n\ NEDIT_require_macro_file("open_incl.nm")\n\ \n\ open_include()\n\ }\n\ C/C++ Prog>C Comments>Cartouche@C@C++:::: {\n\ beginning_of_line()\n\ insert_string("/* -------------------------------------------------------------------------- */")\n\ newline()\n\ beginning_of_line()\n\ insert_string("/* -------------------------------------------------------------------------- */")\n\ newline()\n\ newline()\n\ process_up()\n\ process_up()\n\ beginning_of_line()\n\ insert_string("/* ")\n\ newline()\n\ process_up()\n\ end_of_line()\n\ }\n\ C/C++ Prog>C Comments>Comment Out Sel.@C@C++:::R: {\n\ selStart = $selection_start\n\ selEnd = $selection_end\n\ replace_range(selStart, selEnd, "/* " get_selection() " */")\n\ select(selStart, selEnd + 6)\n\ }\n\ C/C++ Prog>C Comments>C Uncomment Sel.@C@C++:::R: {\n\ sel = get_selection()\n\ selStart = $selection_start\n\ selEnd = $selection_end\n\ commentStart = search_string(sel, "/*", 0)\n\ if (substring(sel, commentStart+2, commentStart+3) == " ")\n\ keepStart = commentStart + 3\n\ else\n\ keepStart = commentStart + 2\n\ keepEnd = search_string(sel, "*/", length(sel), "backward")\n\ commentEnd = keepEnd + 2\n\ if (substring(sel, keepEnd - 1, keepEnd) == " ")\n\ keepEnd = keepEnd - 1\n\ replace_range(selStart + commentStart, selStart + commentEnd, \\\n\ substring(sel, keepStart, keepEnd))\n\ select(selStart, selEnd - (keepStart-commentStart) - \\\n\ (commentEnd - keepEnd))\n\ }\n\ C/C++ Prog>C Comments>+ C++ Comment@C++:::R: {\n\ replace_in_selection("^.*$", "// &", "regex")\n\ }\n\ C/C++ Prog>C Comments>- C++ Comment@C++:::R: {\n\ replace_in_selection("(^[ \\\\t]*// ?)(.*)$", "\\\\2", "regex")\n\ }\n\ C/C++ Prog>C Comments>+ C Bar Comment 1@C:::R: {\n\ if ($selection_left != -1) {\n\ dialog("Selection must not be rectangular")\n\ return\n\ }\n\ start = $selection_start\n\ end = $selection_end-1\n\ origText = get_range($selection_start, $selection_end-1)\n\ newText = "/*\\n" replace_in_string(get_range(start, end), \\\n\ "^", " * ", "regex") "\\n */\\n"\n\ replace_selection(newText)\n\ select(start, start + length(newText))\n\ }\n\ C/C++ Prog>C Comments>- C Bar Comment 1@C:::R: {\n\ selStart = $selection_start\n\ selEnd = $selection_end\n\ newText = get_range(selStart+3, selEnd-4)\n\ newText = replace_in_string(newText, "^ \\\\* ", "", "regex")\n\ replace_range(selStart, selEnd, newText)\n\ select(selStart, selStart + length(newText))\n\ }\n\ C/C++ Prog>C Comments>Comment C++ comments for C@C:::: {\n\ replace("(^|[^*])(//.*)", "\\\\1/\\\\*\\\\2 \\\\*/", "regex")\n\ }\n\ C/C++ Prog>C Comments>Uncomment C++ comments for C@C:::: {\n\ replace("/\\\\*(//.*) \\\\*/$", "\\\\1", "regex")\n\ }\n\ C/C++ Prog>Redo C styles@C@C++:::: {\n\ # remove spaces in the context "word (" or "word ["\n\ while (search("([a-zA-Z0-9_])\\\\s+([[(])", 0, "regex") >= 0)\n\ replace_all("([a-zA-Z0-9_])\\\\s+([[(])", "\\\\1\\\\2", "regex")\n\ # remove spaces in "( ... )" and "[ ... ]"\n\ while (search("(\\\\S)\\\\s+([])])", 0, "regex") >= 0)\n\ replace_all("(\\\\S)\\\\s+([])])", "\\\\1\\\\2", "regex")\n\ while (search("([[(])\\\\s+", 0, "regex") >= 0)\n\ replace_all("([[(])\\\\s+", "\\\\1", "regex")\n\ \n\ # tighten semicolons, commas to preceding text\n\ while (search("(?<=\\\\S)[ \\\\t]+([,;])", 0, "regex") >= 0)\n\ replace_all("(?<=\\\\S)[ \\\\t]+([,;])", "\\\\1", "regex")\n\ \n\ # add a single space after these keywords and following "(" or "["\n\ keyword = "()([\\\\[\\\\(])"\n\ while (search(keyword, 0, "regex") >= 0)\n\ replace_all(keyword, "\\\\1 \\\\2", "regex")\n\ \n\ # move "*" and "&" in casts\n\ while (search("([a-zA-Z0-9_])([*&]+)([ \\\\t]+)", 0, "regex") >= 0)\n\ replace_all("([a-zA-Z0-9_])([*&]+)([ \\\\t]+)", "\\\\1\\\\3\\\\2", "regex")\n\ while (search("([a-zA-Z0-9_])([*&]+)([>)])", 0, "regex") >= 0)\n\ replace_all("([a-zA-Z0-9_])([*&]+)([>)])", "\\\\1 \\\\2\\\\3", "regex")\n\ while (search("\\\\*\\\\)[ \\\\t]+", 0, "regex") >= 0)\n\ replace_all("\\\\*\\\\)[ \\\\t]+", "\\\\*\\\\)", "regex")\n\ }\n\ C/C++ Prog>Make C Prototypes@C@C++:::: {\n\ if ($selection_start == -1) {\n\ start = 0\n\ end = $text_length\n\ } else {\n\ start = $selection_start\n\ end = $selection_end\n\ }\n\ string = get_range(start, end)\n\ nDefs = 0\n\ searchPos = 0\n\ prototypes = ""\n\ staticPrototypes = ""\n\ keywords = "[ \\t]*[ \\t]*\\\\("\n\ C_cmnt = "(/\\\\*([^*]|\\n|\\\\*[^/])*\\\\*/)"\n\ CPP_cmnt = "(//.*\\n)"\n\ get_proto = "^[ \\t]*[a-zA-Z]" \\\n\ "([^;#\\"'{}=>= 0)\n\ continue\n\ if (substring(string, headerStart, headerStart+6) == "static")\n\ staticPrototypes = staticPrototypes prototype\n\ else\n\ prototypes = prototypes prototype\n\ nDefs++\n\ }\n\ if (nDefs == 0) {\n\ dialog("No function declarations found")\n\ return\n\ }\n\ new()\n\ focus_window("last")\n\ replace_range(0, 0, "/* external */\\n" prototypes "\\n/* static */\\n" staticPrototypes)\n\ set_language_mode("C")\n\ }\n\ C/C++ Prog>keyword expand@C@C++:Ctrl+Backslash::: {\n\ NEDIT_require_macro_file("c_expand.nm")\n\ \n\ if ($selection_start != -1)\n\ deselect_all()\n\ \n\ if (!c_expand())\n\ {\n\ beep()\n\ }\n\ \n\ pos = search("@[^@]*@", $cursor, "regex")\n\ if (pos != -1)\n\ {\n\ end = $search_end\n\ s = get_range(pos, $search_end)\n\ r = substring(s, 1, length(s) - 1)\n\ replace_range(pos, end, r)\n\ select(pos, end - 2)\n\ set_cursor_pos(end - 2)\n\ }\n\ }\n\ C/C++ Prog>next expand@C@C++:Shift+Ctrl+Backslash::: {\n\ pos = search("@[^@]*@", $cursor, "regex")\n\ if (pos != -1)\n\ {\n\ end = $search_end\n\ s = get_range(pos, $search_end)\n\ r = substring(s, 1, length(s) - 1)\n\ replace_range(pos, end, r)\n\ select(pos, end - 2)\n\ set_cursor_pos(end - 2)\n\ }\n\ }\n\ C/C++ Prog>extern "C"-ise@C@C++:::: {\n\ if (search("#ifdef __cplusplus", 0, "case") == -1)\n\ {\n\ deselect_all()\n\ end_of_file()\n\ \n\ insert_string("\\n#ifdef __cplusplus\\n}\\n#endif")\n\ find("#include ", "backward", "case")\n\ end_of_line()\n\ insert_string("\\n\\n#ifdef __cplusplus\\nextern \\"C\\" {\\n#endif\\n\\n")\n\ }\n\ else\n\ {\n\ beep()\n\ set_cursor_pos($search_end)\n\ }\n\ }\n\ Move>Start of Select:Ctrl+Home::: {\n\ if ($selection_start != -1)\n\ beginning_of_selection()\n\ else\n\ beginning_of_file()\n\ }\n\ Move>End of Line:End::: {\n\ end_of_line()\n\ }\n\ Move>End of Line Select:Shift+End::: {\n\ end_of_line("extend")\n\ }\n\ Move>End of Select:Ctrl+End::: {\n\ if ($selection_start != -1)\n\ end_of_selection()\n\ else\n\ end_of_file()\n\ }\n\ Move>Smart Home:Alt+Home::: {\n\ # toggle between front of line and first non-space on line\n\ c = $cursor\n\ beginning_of_line()\n\ front = $cursor\n\ if (c == front)\n\ {\n\ first_char = search("[ \\t]*", front, "regex", "forward")\n\ if (first_char != -1)\n\ set_cursor_pos($search_end)\n\ }\n\ }\n\ Move>MultiTag>Find def@*:Ctrl+Bracketright::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ if ($multitags == "")\n\ {\n\ multitags_load_multitags_file()\n\ }\n\ \n\ s = ""\n\ if ($selection_start == -1)\n\ {\n\ b = search("<", $cursor, "regex", "backward")\n\ e = search(">", $cursor, "regex", "forward")\n\ s = get_range(b, e)\n\ }\n\ else\n\ s = get_selection()\n\ \n\ if (s != "")\n\ {\n\ multitags_push_curpos()\n\ if (!multitags_choose_quick(s))\n\ {\n\ multitags_pop_curpos()\n\ deselect_all()\n\ }\n\ else\n\ {\n\ centerline()\n\ }\n\ }\n\ }\n\ Move>MultiTag>Find def@C@C++:Ctrl+Bracketright::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ if ($multitags == "")\n\ {\n\ multitags_load_all_multitags_file()\n\ }\n\ \n\ s = ""\n\ if ($selection_start == -1)\n\ {\n\ b = search("<", $cursor, "regex", "backward")\n\ e = search(">", $cursor, "regex", "forward")\n\ s = get_range(b, e)\n\ }\n\ else\n\ s = get_selection()\n\ \n\ if (s != "")\n\ {\n\ multitags_push_curpos()\n\ if (!multitags_choose_quick(s))\n\ {\n\ multitags_pop_curpos()\n\ deselect_all()\n\ }\n\ else\n\ {\n\ centerline()\n\ }\n\ }\n\ }\n\ Move>MultiTag>Find ?@*:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ if ($multitags == "")\n\ {\n\ multitags_load_multitags_file()\n\ }\n\ \n\ s = string_dialog("Symbol", "OK", "Cancel")\n\ \n\ if ($string_dialog_button == 1 && s != "")\n\ {\n\ multitags_push_curpos()\n\ if (!multitags_choose_quick(s))\n\ {\n\ multitags_pop_curpos()\n\ deselect_all()\n\ }\n\ else\n\ {\n\ centerline()\n\ }\n\ }\n\ }\n\ Move>MultiTag>Find ?@C@C++:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ if ($multitags == "")\n\ {\n\ multitags_load_all_multitags_file()\n\ }\n\ \n\ s = string_dialog("Symbol", "OK", "Cancel")\n\ \n\ if ($string_dialog_button == 1 && s != "")\n\ {\n\ multitags_push_curpos()\n\ if (!multitags_choose_quick(s))\n\ {\n\ multitags_pop_curpos()\n\ deselect_all()\n\ }\n\ else\n\ {\n\ centerline()\n\ }\n\ }\n\ }\n\ Move>MultiTag>Push:Ctrl+Bracketleft::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ multitags_push_curpos()\n\ }\n\ Move>MultiTag>Back:Shift+Ctrl+Bracketright::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ if (multitags_pop_curpos())\n\ centerline()\n\ }\n\ Move>MultiTag>Reload tags@*:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ multitags_load_multitags_file("tags")\n\ }\n\ Move>MultiTag>Reload tags@C@C++:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ multitags_forget_multitags_file()\n\ multitags_load_all_multitags_file("tags")\n\ }\n\ Move>MultiTag>Forget tags:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ multitags_forget_multitags_file()\n\ }\n\ Move>MultiTag>Show tags files:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ s = $multitags_files\n\ if (s == "" || s == "\\n")\n\ s = " (none)\\n"\n\ list_dialog("Multitags: Loaded tags file", $multitags_files)\n\ }\n\ Move>MultiTag>Load specific tags file:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ s = string_dialog("Enter file path", "OK", "Cancel")\n\ if ($string_dialog_button == 1 && s != "")\n\ multitags_load_multitags_file(s)\n\ \n\ }\n\ Move>MultiTag>File symbols:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ if ($multitags == "")\n\ {\n\ if ($language_mode == "C" || \\\n\ $language_mode == "C++")\n\ multitags_load_all_multitags_file()\n\ else\n\ multitags_load_multitags_file()\n\ }\n\ \n\ if (multitags_choose_in_file($file_name))\n\ centerline()\n\ }\n\ Move>MultiTag>Set stack:Shift+Ctrl+Alt+J::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ multitags_set_stack_length()\n\ }\n\ Move>MultiTag>Show stack:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ if (multitags_choose_from($multitags_stack))\n\ centerline()\n\ }\n\ Move>MultiTag>Empty stack:::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ multitags_empty_stack()\n\ }\n\ Move>Go to Match:Shift+Ctrl+5::: {\n\ select($cursor, $cursor)\n\ cc = $cursor-1\n\ if (cc == -1)\n\ forward_character()\n\ c = get_character(cc)\n\ if (search_string("{}()[]<>\\"", c, 0) == -1)\n\ forward_character()\n\ \n\ match()\n\ \n\ if ($selection_start != -1)\n\ {\n\ if ($cursor == $selection_start+1)\n\ set_cursor_pos($selection_end)\n\ else\n\ set_cursor_pos($selection_start)\n\ }\n\ select($cursor, $cursor)\n\ }\n\ Move>Collapse Match:Ctrl+KP_Subtract::: {\n\ NEDIT_require_macro_file("fold.nm")\n\ \n\ if ($selection_start != -1)\n\ res = fold_selection()\n\ else\n\ res = fold_bracket_or_custom_match()\n\ if (!res)\n\ beep()\n\ }\n\ Move>Expand Match:Ctrl+KP_Add::: {\n\ NEDIT_require_macro_file("fold.nm")\n\ \n\ if (!fold_expand())\n\ beep()\n\ }\n\ Edit>Delete back by Tab Stop:F12::: {\n\ NEDIT_require_macro_file("tabDelete.nm")\n\ \n\ tab_delete()\n\ }\n\ Edit>Delete forward by Tab Stop:Shift+F12::: {\n\ NEDIT_require_macro_file("tabDelete.nm")\n\ \n\ tab_delete_forward()\n\ }\n\ Edit>Insert Special>Non-breaking Space:::: {\n\ insert_string(" ")\n\ }\n\ Edit>Insert Special>Insert tab:Ctrl+Grave::: {\n\ insert_string("\\t")\n\ }\n\ Edit>Insert Special>ISO8859-1 Punctuation:::: {\n\ s = " ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿×÷"\n\ l = ""\n\ for (i = 0; i < length(s); i++)\n\ {\n\ if (i > 0 && i % 6 == 0)\n\ l = l "\\n"\n\ l = l " "(i % 6) ": " substring(s, i, i + 1) " "\n\ }\n\ \n\ s = ""\n\ while (s == "")\n\ {\n\ s = list_dialog("Choose a line and an index within it",\\\n\ l"\\n", "0", "1", "2", "3", "4", "5")\n\ b = $list_dialog_button\n\ if (b <= 0 || b > 6)\n\ return\n\ }\n\ \n\ b-- # from 0 to 5\n\ c = 7 * b + 4\n\ insert_string(substring(s, c, c + 1))\n\ }\n\ Edit>Insert Special>ISO8859-1 Accents:::: {\n\ s = "[A]: 0: À 1: Á 2:  3: à 4: Ä 5: Å 6: Æ\\n"\\\n\ "[a]: 0: à 1: á 2: â 3: ã 4: ä 5: å 6: æ\\n"\\\n\ "[E]: 0: È 1: É 2: Ê 3: Ë\\n"\\\n\ "[e]: 0: è 1: é 2: ê 3: ë\\n"\\\n\ "[I]: 0: Ì 1: Í 2: Î 3: Ï\\n"\\\n\ "[i]: 0: ì 1: í 2: î 3: ï\\n"\\\n\ "[O]: 0: Ò 1: Ó 2: Ô 3: Õ 4: Ö 5: Ø\\n"\\\n\ "[o]: 0: ò 1: ó 2: ô 3: õ 4: ö 5: ø\\n"\\\n\ "[U]: 0: Ù 1: Ú 2: Û 3: Ü\\n"\\\n\ "[u]: 0: ù 1: ú 2: û 3: ü\\n"\\\n\ "[Y]: 0: Ý 1: ý 2: ÿ\\n"\\\n\ "[CN]: 0: Ç 1: ç 2: Ñ 3: ñ\\n"\\\n\ "[ÐÞß]: 0: Ð 1: Þ 2: ð 3: þ 4: ß\\n"\n\ c = ""\n\ while (c == "")\n\ {\n\ x = list_dialog("Choose a line and an index within it",\\\n\ s, "No", "0", "1", "2", "3", "4", "5", "6")\n\ b = $list_dialog_button\n\ if (b < 2 || b > 8)\n\ return\n\ \n\ b -= 2\n\ i = 7 * b + 10\n\ c = substring(x, i, i + 1)\n\ if (c == "")\n\ beep()\n\ }\n\ insert_string(c)\n\ }\n\ Edit>Delete line:Shift+Ctrl+OsfDelete::: {\n\ here = $cursor\n\ beginning_of_line()\n\ start = $cursor\n\ end_of_line()\n\ end = $cursor + 1\n\ set_cursor_pos(here)\n\ process_down()\n\ replace_range(start, end, "")\n\ }\n\ Edit>Delete to end:Shift+Ctrl+Alt+OsfDelete::: {\n\ if ($selection_start == -1) {\n\ if (get_character($cursor) == "\\n")\n\ delete_next_character()\n\ else\n\ delete_to_end_of_line()\n\ }\n\ else {\n\ delete_selection()\n\ }\n\ }\n\ Edit>Deselect:Ctrl+Space::: {\n\ if ($selection_start != -1)\n\ deselect_all()\n\ }\n\ Edit>Next window:Ctrl+Tab::: {\n\ NEDIT_require_macro_file("win_nextprev.nm")\n\ \n\ win_next()\n\ }\n\ Edit>Prev window:Shift+Ctrl+Tab::: {\n\ NEDIT_require_macro_file("win_nextprev.nm")\n\ \n\ win_prev()\n\ }\n\ Edit>Find in files>Find line@C:Ctrl+Alt+F::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ if ($selection_start == -1)\n\ greplines_from_prompt("./*.[ch] /dev/null")\n\ else\n\ {\n\ greplines("./*.[ch] /dev/null", get_selection())\n\ }\n\ }\n\ Edit>Find in files>Find line@C++:Ctrl+Alt+F::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ if ($selection_start == -1)\n\ greplines_from_prompt("./*.[CHch]* /dev/null")\n\ else\n\ {\n\ greplines("./*.[CHch]* /dev/null", get_selection())\n\ }\n\ }\n\ Edit>Find in files>Find line C/C++ (-R)@C@C++:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ greplines_from_prompt_r("*.[cChH][+pP][+pP] *.[cChH] *.inl *.INL")\n\ }\n\ Edit>Find in files>Find line in *:Ctrl+Alt+F::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ if ($selection_start == -1)\n\ greplines_from_prompt("* /dev/null")\n\ else\n\ {\n\ greplines("* /dev/null", get_selection())\n\ }\n\ }\n\ Edit>Strip trailing space:::: {\n\ if ($selection_start == -1)\n\ {\n\ str = get_range(0, $text_length)\n\ mod = replace_in_string(str, "\\\\s+$", "", "regex", "copy")\n\ if (str != mod)\n\ replace_range(0, $text_length, mod)\n\ }\n\ else\n\ {\n\ str = get_selection()\n\ mod = replace_in_string(str, "\\\\s+$", "", "regex", "copy")\n\ if (str != mod)\n\ replace_selection(mod)\n\ }\n\ }\n\ Edit>Detab:::: {\n\ NEDIT_require_macro_file("redetab.nm")\n\ \n\ if ($selection_start != -1)\n\ redetab_selection("detab")\n\ else\n\ {\n\ s = detab(get_range(0, $text_length), 0, 0, 0, $tab_dist)\n\ replace_range(0, $text_length, s)\n\ }\n\ }\n\ Edit>Retab (for string)@C@C++@Java@JavaScript@Yacc@Awk@NEdit Macro:::R: {\n\ NEDIT_require_macro_file("redetab.nm")\n\ \n\ redetab_selection("retab", "\\"([^\\\\n\\\\\\\\\\"]|\\\\\\\\\\\\n|\\\\\\\\.)*\\"")\n\ }\n\ Edit>Retab:::R: {\n\ NEDIT_require_macro_file("redetab.nm")\n\ \n\ redetab_selection("retab")\n\ }\n\ Edit>Insert tab:Ctrl+Grave::: {\n\ insert_string("\\t")\n\ }\n\ Edit>Show tabs:::R: {\n\ NEDIT_require_macro_file("redetab.nm")\n\ \n\ showtabspace("display")\n\ }\n\ HTML>directive@SGML HTML@XML:Shift+Ctrl+Period::R: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ html_convert_to_markup()\n\ }\n\ HTML>dialog directive@SGML HTML@XML:Shift+Ctrl+Slash::: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ html_ask_for_markup()\n\ }\n\ HTML>-a name-@SGML HTML:Ctrl+Alt+A::: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ html_make_A_NAME()\n\ }\n\ HTML>-a href-@SGML HTML:Alt+A::: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ html_make_A_HREF()\n\ }\n\ HTML>-tt-@SGML HTML:Alt+T::: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ html_add_markup_brackets("TT")\n\ }\n\ HTML>-i-@SGML HTML:Alt+I::: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ html_add_markup_brackets("I")\n\ }\n\ HTML>-b-@SGML HTML:Alt+B::: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ html_add_markup_brackets("B")\n\ }\n\ HTML>-p-@SGML HTML:Shift+Ctrl+P::: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ if ($selection_start != -1) {\n\ s = "

" get_selection() "

"\n\ replace_selection(s)\n\ fill_paragraph()\n\ end_of_selection()\n\ deselect_all()\n\ }\n\ else {\n\ html_add_markup_brackets("p")\n\ }\n\ }\n\ HTML>-strong-@SGML HTML:Shift+Ctrl+S::: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ html_add_markup_brackets("strong")\n\ }\n\ HTML>-pre-@SGML HTML:::: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ if ($selection_start == -1)\n\ html_add_markup_brackets("PRE")\n\ else\n\ {\n\ sel = get_selection()\n\ e = $selection_start\n\ \n\ if (search_string(sel, "&", 0) != -1)\n\ sel = replace_in_string(sel, "&", "&")\n\ \n\ if (search_string(sel, "<", 0) != -1)\n\ sel = replace_in_string(sel, "<", "<")\n\ \n\ if (search_string(sel, ">", 0) != -1)\n\ sel = replace_in_string(sel, ">", ">")\n\ \n\ sel = "
\\n" sel "
\\n"\n\ \n\ replace_selection(sel)\n\ deselect_all()\n\ set_cursor_pos(e)\n\ }\n\ }\n\ HTML>&entities;@SGML HTML@XML:::R: {\n\ NEDIT_require_macro_file("html.nm")\n\ \n\ s = html_entities()\n\ replace_selection(s)\n\ }\n\ Various>Macro>NEDIT_LOADED settings:::: {\n\ NEDIT_show_settings()\n\ }\n\ Various>Macro>Loaded files full:::: {\n\ NEDIT_show_macro_files()\n\ }\n\ Various>Macro>Loaded files:::: {\n\ NEDIT_show_macro_file_names()\n\ }\n\ Various>Macro>Reload file:::: {\n\ NEDIT_request_reload_macro_file()\n\ }\n\ Various>Macro>Reload this file@NEdit Macro:::: {\n\ NEDIT_request_reload_macro_file($file_path $file_name)\n\ }\n\ Various>Macro>Reload all:::: {\n\ NEDIT_reload_all_macro_files()\n\ }\n\ Various>Macro>Open file:::: {\n\ NEDIT_request_edit_macro_file()\n\ }\n\ Various>Fill Sel. w/Char:::R: {\n\ if ($selection_start == -1) {\n\ beep()\n\ return\n\ }\n\ \n\ # Ask the user what character to fill with\n\ fillChar = string_dialog("Fill selection with what character?", "OK", "Cancel")\n\ if ($string_dialog_button == 2)\n\ return\n\ \n\ # Count the number of lines in the selection\n\ nLines = 0\n\ for (i=$selection_start; i<$selection_end; i++)\n\ if (get_character(i) == "\\n")\n\ nLines++\n\ \n\ # Create the fill text\n\ rectangular = $selection_left != -1\n\ line = ""\n\ fillText = ""\n\ if (rectangular) {\n\ for (i=0; i<$selection_right-$selection_left; i++)\n\ line = line fillChar\n\ for (i=0; i=0 && get_character(i)!="\\n"; i--)\n\ startIndent++\n\ for (i=0; i<$wrap_margin-startIndent; i++)\n\ fillText = fillText fillChar\n\ fillText = fillText "\\n"\n\ for (i=0; i<$wrap_margin; i++)\n\ line = line fillChar\n\ for (i=0; i=$selection_start && get_character(i)!="\\n"; \\\n\ i--)\n\ fillText = fillText fillChar\n\ }\n\ }\n\ \n\ # Replace the selection with the fill text\n\ replace_selection(fillText)\n\ }\n\ Various>Build Cols:::R: {\n\ NEDIT_require_macro_file("columns.nm")\n\ \n\ make_columns_dialog()\n\ }\n\ Various>Quote Mail Reply:::: {\n\ if ($selection_start == -1)\n\ replace_all("^.*$", "\\\\> &", "regex")\n\ else\n\ replace_in_selection("^.*$", "\\\\> &", "regex")\n\ }\n\ Various>Unquote Mail Reply:::: {\n\ if ($selection_start == -1)\n\ replace_all("(^\\\\> )(.*)$", "\\\\2", "regex")\n\ else\n\ replace_in_selection("(^\\\\> )(.*)$", "\\\\2", "regex")\n\ }\n\ Various>NEdit macro help@NEdit Macro:Ctrl+F1::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("builtins_help.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ s = ""\n\ c = $cursor\n\ if ($selection_start == -1)\n\ {\n\ b = search("<", $cursor, "regex", "backward")\n\ e = search(">", $cursor, "regex", "forward")\n\ s = get_range(b, e)\n\ }\n\ else\n\ s = get_selection()\n\ \n\ if (s != "")\n\ {\n\ multitags_push_curpos()\n\ builtins_help(s)\n\ centerline()\n\ # multitags_pop_curpos()\n\ # deselect_all()\n\ # set_cursor_pos(c)\n\ }\n\ }\n\ Various>NEdit DEBUG macros>Enable:::: {\n\ NEDIT_require_macro_file("DEBUG.nm")\n\ \n\ $DEBUG_ENABLE = 1\n\ }\n\ Various>NEdit DEBUG macros>Disable:::: {\n\ NEDIT_require_macro_file("DEBUG.nm")\n\ \n\ $DEBUG_ENABLE = 0\n\ }\n\ Various>NEdit DEBUG macros>Clear All:::: {\n\ NEDIT_require_macro_file("DEBUG.nm")\n\ \n\ DEBUG_clear_all()\n\ }\n\ Various>Show Language Mode:::: {\n\ dialog("Language mode for window " $file_name " is " $language_mode)\n\ }\n\ Various>Change Locking:::: {\n\ s = ""\n\ n = 0\n\ while (1)\n\ {\n\ n = dialog("Set file lock", "on", "off", "toggle", "", 0, 1, 2, "dismiss")\n\ \n\ if (n == 1)\n\ s = "on"\n\ else if (n == 2)\n\ s = "off"\n\ else if (n == 3)\n\ s = "toggle"\n\ else if (n == 4)\n\ s = ""\n\ else if (n == 5)\n\ s = ""\n\ else if (n == 6)\n\ s = ""\n\ else if (n == 7)\n\ s = ""\n\ else\n\ break\n\ \n\ if (s == "")\n\ {\n\ if (n == 4)\n\ set_read_only()\n\ else if (n == 5)\n\ set_read_only(0)\n\ else if (n == 6)\n\ set_read_only(1)\n\ else if (n == 7)\n\ set_read_only(2)\n\ }\n\ else\n\ set_read_only(s)\n\ }\n\ }\n\ Various>Code for ROR13:::R: {\n\ NEDIT_require_macro_file("ROR13.nm")\n\ \n\ replace_selection(code_ror13(get_selection()))\n\ }\n\ Various>Hex to char:::R: {\n\ NEDIT_require_macro_file("extensions.nm")\n\ \n\ replace_selection(hex2_to_str(get_selection()))\n\ }\n\ Various>Char to hex:::R: {\n\ NEDIT_require_macro_file("extensions.nm")\n\ \n\ replace_selection(char_to_hex(get_selection()))\n\ }\n\ Edit>Complete Word>Recent@*:Shift+Ctrl+Alt+Space::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("wordfinish.nm")\n\ \n\ if ($multitags_symbols == "")\n\ multitags_load_multitags_file()\n\ \n\ wordfinish($multitags_symbols)\n\ }\n\ Edit>Complete Word>Recent@C@C++:Shift+Ctrl+Alt+Space::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("wordfinish.nm")\n\ \n\ if ($multitags_symbols == "")\n\ multitags_load_all_multitags_file()\n\ \n\ wordfinish($multitags_symbols)\n\ }\n\ Edit>Complete Word>Default:Shift+Ctrl+Space::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("wordfinish.nm")\n\ \n\ if ($wordfinish_sym_list == "")\n\ {\n\ wordfinish_add_symfiles()\n\ }\n\ \n\ if ($multitags_symbols == "")\n\ {\n\ multitags_load_symbols()\n\ if ($multitags_symbols != "")\n\ wordfinish_add_symbols($multitags_symbols)\n\ }\n\ \n\ wordfinish($wordfinish_sym_list)\n\ }\n\ Edit>Complete Word>Forward@*:Alt+Right::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("wordfinish.nm")\n\ \n\ if ($wordfinish_sym_list == "")\n\ {\n\ wordfinish_add_symfiles()\n\ }\n\ \n\ if ($multitags_symbols == "")\n\ {\n\ multitags_load_symbols()\n\ if ($multitags_symbols != "")\n\ wordfinish_add_symbols($multitags_symbols)\n\ }\n\ \n\ wordfinish($wordfinish_sym_list, "forward")\n\ }\n\ Edit>Complete Word>Forward@C@C++:Alt+Right::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("wordfinish.nm")\n\ \n\ if ($wordfinish_sym_list == "")\n\ {\n\ wordfinish_add_symfiles()\n\ }\n\ \n\ if ($multitags_symbols == "")\n\ {\n\ if ($multitags == "")\n\ multitags_load_all_multitags_file()\n\ multitags_load_symbols()\n\ if ($multitags_symbols != "")\n\ wordfinish_add_symbols($multitags_symbols)\n\ }\n\ \n\ wordfinish($wordfinish_sym_list, "forward")\n\ }\n\ Edit>Complete Word>Backward@*:Alt+Left::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("wordfinish.nm")\n\ \n\ if ($wordfinish_sym_list == "")\n\ {\n\ wordfinish_add_symfiles()\n\ }\n\ \n\ if ($multitags_symbols == "")\n\ {\n\ multitags_load_symbols()\n\ if ($multitags_symbols != "")\n\ wordfinish_add_symbols($multitags_symbols)\n\ }\n\ \n\ wordfinish($wordfinish_sym_list, "backward")\n\ }\n\ Edit>Complete Word>Backward@C@C++:Alt+Left::: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ NEDIT_require_macro_file("wordfinish.nm")\n\ \n\ if ($wordfinish_sym_list == "")\n\ {\n\ wordfinish_add_symfiles()\n\ }\n\ \n\ if ($multitags_symbols == "")\n\ {\n\ multitags_load_all_multitags_file()\n\ multitags_load_symbols()\n\ if ($multitags_symbols != "")\n\ wordfinish_add_symbols($multitags_symbols)\n\ }\n\ \n\ wordfinish($wordfinish_sym_list, "backward")\n\ }\n\ Edit>Complete Word>Deselect:Alt+Down::: {\n\ if ($selection_start != -1)\n\ deselect_all()\n\ }\n\ Edit>Complete Word>Del Select:Alt+Up::R: {\n\ if ($selection_start != -1)\n\ replace_selection("")\n\ }\n\ Edit>Complete Word>Standard:Alt+D::: {\n\ # Tuning parameters\n\ ScanDistance = 200\n\ \n\ # Search back to a word boundary to find the word to complete\n\ startScan = max(0, $cursor - ScanDistance)\n\ endScan = min($text_length, $cursor + ScanDistance)\n\ scanString = get_range(startScan, endScan)\n\ keyEnd = $cursor-startScan\n\ keyStart = search_string(scanString, "<", keyEnd, "backward", "regex")\n\ if (keyStart == -1)\n\ return\n\ keyString = "<" substring(scanString, keyStart, keyEnd)\n\ \n\ # search both forward and backward from the cursor position. Note that\n\ # using a regex search can lead to incorrect results if any of the special\n\ # regex characters is encountered, which is not considered a delimiter\n\ backwardSearchResult = search_string(scanString, keyString, keyStart-1, \\\n\ "backward", "regex")\n\ forwardSearchResult = search_string(scanString, keyString, keyEnd, "regex")\n\ if (backwardSearchResult == -1 && forwardSearchResult == -1) {\n\ beep()\n\ return\n\ }\n\ \n\ # if only one direction matched, use that, otherwise use the nearest\n\ if (backwardSearchResult == -1)\n\ matchStart = forwardSearchResult\n\ else if (forwardSearchResult == -1)\n\ matchStart = backwardSearchResult\n\ else {\n\ if (keyStart - backwardSearchResult <= forwardSearchResult - keyEnd)\n\ matchStart = backwardSearchResult\n\ else\n\ matchStart = forwardSearchResult\n\ }\n\ \n\ # find the complete word\n\ matchEnd = search_string(scanString, ">", matchStart, "regex")\n\ completedWord = substring(scanString, matchStart, matchEnd)\n\ \n\ # replace it in the window\n\ replace_range(startScan + keyStart, $cursor, completedWord)\n\ }\n\ Edit>Toggle case next:Ctrl+Alt+6::: {\n\ NEDIT_require_macro_file("extensions.nm")\n\ \n\ replace_range($cursor, $cursor+1, togglecase(get_character($cursor)))\n\ forward_character()\n\ }\n\ Edit>Toggle case sel:::R: {\n\ NEDIT_require_macro_file("extensions.nm")\n\ \n\ replace_selection(togglecase(get_selection()))\n\ }\n\ Rangesets>Add:::R: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ L = RangeSet_ask("Range set to add to")\n\ if (L == "")\n\ return\n\ \n\ r = RangeSet_add(L)\n\ }\n\ Rangesets>Find>All in "Find All" (green):::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ \n\ type = "case"\n\ n_type = 1\n\ \n\ # if we haven't got a selection, ask for the find string\n\ if ($selection_start == -1) {\n\ find_s = string_dialog("Find string", "Case", "Literal", "Regex", "Cancel")\n\ n_type = $string_dialog_button\n\ }\n\ else {\n\ find_s = get_selection()\n\ n_type = dialog("Find string: " find_s, "Case", "Literal", "Regex", "Cancel")\n\ }\n\ \n\ if (find_s == "")\n\ return\n\ \n\ if (n_type == 1)\n\ type = "case"\n\ else if (n_type == 2)\n\ type = "literal"\n\ else if (n_type == 3)\n\ type = "regex"\n\ else\n\ return\n\ \n\ L = "Find All"\n\ if (RangeSet_defined(L))\n\ {\n\ if (dialog("Add to current range set "L"?", "Add", "Replace") != 1)\n\ {\n\ # dialog("forgetting...")\n\ RangeSet_forget(L)\n\ }\n\ }\n\ \n\ $FindAll_Color[""] = ""\n\ if (!("?" in $FindAll_Color))\n\ {\n\ col = string_dialog("Enter or choose a color for Find All", \\\n\ "Bright", "Dark")\n\ if (col != "")\n\ $FindAll_Color["?"] = col\n\ else if ($string_dialog_button != 2)\n\ $FindAll_Color["?"] = "#a0ff00"\n\ else\n\ $FindAll_Color["?"] = "#007f40"\n\ }\n\ RangeSet_set_color(L, $FindAll_Color["?"])\n\ \n\ pos = 0\n\ oldpos = 0\n\ for (pos = search(find_s, 0, type); pos != -1; pos = search(find_s, pos, type)) {\n\ r = RangeSet_add(L, pos, $search_end)\n\ pos = $search_end\n\ if (pos == oldpos) # last match found the empty string? if so, move on...\n\ pos++\n\ oldpos = pos\n\ }\n\ }\n\ Rangesets>Find>All:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ type = "case"\n\ n_type = 1\n\ \n\ # if we haven't got a selection, ask for the find string\n\ if ($selection_start == -1) {\n\ find_s = string_dialog("Find string", "Case", "Literal", "Regex", "Cancel")\n\ n_type = $string_dialog_button\n\ }\n\ else {\n\ find_s = get_selection()\n\ n_type = dialog("Find string: " find_s, "Case", "Literal", "Regex", "Cancel")\n\ }\n\ \n\ if (find_s == "")\n\ return\n\ \n\ if (n_type == 1)\n\ type = "case"\n\ else if (n_type == 2)\n\ type = "literal"\n\ else if (n_type == 3)\n\ type = "regex"\n\ else\n\ return\n\ \n\ L = RangeSet_ask("Range set to add finds to")\n\ if (L == "")\n\ return\n\ \n\ pos = 0\n\ for (pos = search(find_s, 0, type); pos != -1; pos = search(find_s, pos, type)) {\n\ r = RangeSet_add(L, pos, $search_end)\n\ pos = $search_end\n\ }\n\ }\n\ Rangesets>Find>Reset "Find All" color:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ \n\ $FindAll_Color[""] = ""\n\ $FindAll_Color["?"] = ""\n\ delete $FindAll_Color["?"]\n\ }\n\ Rangesets>Color>Quick:::: {\n\ NEDIT_require_macro_file("RScolor.nm")\n\ \n\ RangeSet_QuickColor()\n\ }\n\ Rangesets>Color>Set:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ L = RangeSet_ask("Range set to color")\n\ if (L == "")\n\ return\n\ \n\ C = string_dialog("Color for Range set \\""L"\\"")\n\ \n\ if (C == "")\n\ r = RangeSet_set_color(L)\n\ else\n\ r = RangeSet_set_color(L, C)\n\ }\n\ Rangesets>Color>Old-style:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ \n\ list = $RangeSet_list\n\ if (list != "") {\n\ LL = substring(list, 0, 1)\n\ L = string_dialog("Range set to color (defined: " list ")", "OK", "Set " LL, "Cancel")\n\ if (L == "" && $string_dialog_button == 2)\n\ L = LL\n\ if (L == "")\n\ return\n\ }\n\ else {\n\ L = string_dialog("Range set to color", "OK", "Cancel")\n\ if (L == "" || $string_dialog_button == 2)\n\ return\n\ }\n\ \n\ C = string_dialog("Color for Range set \\""L"\\"")\n\ \n\ if (C == "")\n\ r = RangeSet_set_color(L)\n\ else\n\ r = RangeSet_set_color(L, C)\n\ }\n\ Rangesets>Color>XPM Color:::: {\n\ NEDIT_require_macro_file("element.nm")\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ \n\ set_language_mode("XPM pixmap")\n\ \n\ lablist = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"\n\ charlist = ""\n\ text = get_range(0, $text_length)\n\ rest = $text_length\n\ \n\ for (i = 0; text != "";)\n\ {\n\ l = element_i(text, 0)\n\ text = element_from_to(text, 1)\n\ \n\ if (search_string(l, "^\\"(.).*[ \\t]c[ \\t]([^ \\t\\"]+)\\",[ \\t]*$", 0, "regex") != -1)\n\ {\n\ v = replace_in_string(l, "^\\"(.).*[ \\t]c[ \\t]([^ \\t\\"]+)\\",[ \\t]*$", "\\\\1\\t\\\\2", "regex")\n\ r = substring(lablist, i, i+1)\n\ s = element_i(v, 0, "\\t")\n\ c = element_i(v, 1, "\\t")\n\ rest = length(text)\n\ if (tolower(c) == "none")\n\ continue\n\ if (i >= 26)\n\ continue\n\ i++\n\ # dialog("l='"l"'\\nv='"v"'\\n"i": Color range "r" for letter '"s"' with "c)\n\ charlist = charlist s\n\ if (RangeSet_defined(r))\n\ RangeSet_forget(r)\n\ RangeSet_set_color(r, c)\n\ }\n\ }\n\ \n\ startpos = search("^\\"", $text_length - rest, "regex")\n\ \n\ while (i > 0)\n\ {\n\ s = substring(charlist, i-1, i)\n\ r = substring(lablist, i-1, i)\n\ sre = s\n\ # dialog("search_string(\\"[]\\\\|+*?.^$<>\\", \\""s"\\", 0, \\"case\\") = " search_string("[]\\\\|+*?.^$<>", s, 0, "case"))\n\ if (search_string("[]\\\\|+*?.^$<>", s, 0, "case") >= 0)\n\ sre = "\\\\"s\n\ sre = sre"+"\n\ # dialog(i": Color range "r" for letter '"s"' ("sre")")\n\ \n\ pos = startpos\n\ while (pos != -1)\n\ {\n\ pos = search(sre, pos, "regex", "forward")\n\ if (pos >= 0)\n\ {\n\ RangeSet_add(r, pos, $search_end)\n\ pos = $search_end\n\ }\n\ }\n\ i--\n\ }\n\ }\n\ Rangesets>RS1 =>RS1 + RS2:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ intro = "Add second range set ranges to first range set\\n\\n"\n\ RS1 = RangeSet_ask(intro "First range set")\n\ if (RS1 == "")\n\ return\n\ \n\ RS2 = RangeSet_askExisting(intro "Second range set (first is "RS1")")\n\ if (RS2 == "")\n\ return\n\ \n\ r = RangeSet_add(RS1, RS2)\n\ }\n\ Rangesets>RS1 =>RS1 - RS2:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ intro = "Remove second range set ranges from first range set\\n\\n"\n\ RS1 = RangeSet_ask(intro "First range set")\n\ if (RS1 == "")\n\ return\n\ \n\ RS2 = RangeSet_askExisting(intro "Second range set (first is "RS1")")\n\ if (RS2 == "")\n\ return\n\ \n\ r = RangeSet_remove(RS1, RS2)\n\ }\n\ Rangesets>RS1 =>~RS1:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ RS1 = RangeSet_ask("Range set to invert")\n\ if (RS1 == "")\n\ return\n\ \n\ r = RangeSet_inverse(RS1)\n\ }\n\ Rangesets>Differences>Merge files from diff:::: {\n\ NEDIT_require_macro_file("RSfileMerge.nm")\n\ \n\ fileMerge_from_diff()\n\ }\n\ Rangesets>Differences>Merge files + rework:::: {\n\ NEDIT_require_macro_file("RSfileMerge.nm")\n\ \n\ fileMerge_from_diff("rework")\n\ }\n\ Rangesets>Differences>Merge files from diff [REV]:::: {\n\ NEDIT_require_macro_file("RSfileMerge.nm")\n\ \n\ fileMerge_from_diff(0, "rev")\n\ }\n\ Rangesets>Differences>Merge files + rework [REV]:::: {\n\ NEDIT_require_macro_file("RSfileMerge.nm")\n\ \n\ fileMerge_from_diff("rework", "rev")\n\ }\n\ Rangesets>Differences>Rework Changes:::: {\n\ NEDIT_require_macro_file("RSfileMerge.nm")\n\ \n\ fileMerge_rework_changes()\n\ }\n\ Rangesets>Differences>Show Changes:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSshowChange.nm")\n\ \n\ diff_with_saved()\n\ \n\ clear = dialog("Clear Difference Rangesets A, C and D?", "Yes", "No")\n\ if (clear == 1)\n\ {\n\ RangeSet_forget("a")\n\ RangeSet_forget("c")\n\ RangeSet_forget("d")\n\ }\n\ }\n\ Rangesets>Differences>Highlight Plain Diff:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ \n\ q = dialog("Highlight difference specs?", "Dark", "Light", "No")\n\ if (q == 1)\n\ col = "#808080"\n\ else if (q == 2)\n\ col = "#d8d8d8"\n\ else\n\ col = ""\n\ \n\ RangeSet_forget("Old")\n\ RangeSet_forget("New")\n\ RangeSet_forget("Line spec")\n\ \n\ RangeSet_set_color("Old", "#ffb0a0")\n\ RangeSet_set_color("New", "#b0ffff")\n\ if (col != "") RangeSet_set_color("Line spec", col)\n\ \n\ regex = "regex"\n\ \n\ RE = "(?<=^\\\\< ).*" # add \\n if you like\n\ pos = 0\n\ for (pos = search(RE, 0, regex); pos != -1; pos = search(RE, pos, regex))\n\ {\n\ r = RangeSet_add("Old", pos, $search_end)\n\ pos = $search_end + 1\n\ }\n\ \n\ RE = "(?<=^\\\\> ).*" # add \\n if you like\n\ pos = 0\n\ for (pos = search(RE, 0, regex); pos != -1; pos = search(RE, pos, regex))\n\ {\n\ r = RangeSet_add("New", pos, $search_end)\n\ pos = $search_end + 1\n\ }\n\ \n\ if (col != "")\n\ {\n\ RE = "\\\\d+(?:,\\\\d+)?[acd]\\\\d+(?:,\\\\d+)?\\n"\n\ pos = 0\n\ for (pos = search(RE, 0, regex); pos != -1; pos = search(RE, pos, regex))\n\ {\n\ r = RangeSet_add("Line spec", pos, $search_end)\n\ pos = $search_end\n\ }\n\ }\n\ }\n\ Rangesets>Differences>Forget Highlight:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ \n\ RangeSet_forget("Old")\n\ RangeSet_forget("New")\n\ RangeSet_forget("Line spec")\n\ }\n\ Rangesets>Differences>Preprocess diffs for CVS:::: {\n\ diffcmd = "diff"\n\ pos = search("^diff\\\\s+(-\\\\w+\\\\s+)*", 0, "regex")\n\ if (pos >= 0)\n\ diffcmd = get_range(pos, $search_end)\n\ \n\ diffline = "(?:\\\\d+(?:,\\\\d+)?[acd]\\\\d+(?:,\\\\d+)?|---|[<>] .*)"\n\ \n\ matchCVSdirDiffs = "^" diffcmd ".*/CVS/.*\\\\n(?:"diffline"\\\\n)*"\n\ \n\ matchWhatStringDiffs = "^" diffcmd ".*\\\\n\\\\d+c\\\\d+\\\\n" \\\n\ "\\\\<\\\\s+.*@\\\\(#\\\\) \\\\$Name.*\\\\n" \\\n\ "---\\\\n" \\\n\ "\\\\>\\\\s+.*@\\\\(#\\\\) \\\\$Name.*\\\\n(?!" diffline "$)"\n\ \n\ rsid = rangeset_create()\n\ if (rsid)\n\ rangeset_set_color(rsid, "#ff0080")\n\ \n\ # CVS directory diffs\n\ if (dialog("Remove:\\n" matchCVSdirDiffs, "OK", "Skip") == 1)\n\ {\n\ if (rsid)\n\ {\n\ end = 0\n\ for (pos = search(matchCVSdirDiffs, 0, "regex"); \\\n\ pos >= 0; \\\n\ pos = search(matchCVSdirDiffs, end, "regex"))\n\ {\n\ end = $search_end\n\ rangeset_add(rsid, pos, end)\n\ }\n\ if (dialog("Remove it?", "OK", "Skip") == 1)\n\ replace_all(matchCVSdirDiffs, "", "regex")\n\ }\n\ else\n\ replace_all(matchCVSdirDiffs, "", "regex")\n\ }\n\ \n\ # Diffs where only what strings change\n\ if (dialog("Remove:\\n" matchWhatStringDiffs, "OK", "Skip") == 1)\n\ {\n\ if (rsid)\n\ {\n\ end = 0\n\ for (pos = search(matchWhatStringDiffs, 0, "regex"); \\\n\ pos >= 0; \\\n\ pos = search(matchWhatStringDiffs, end, "regex"))\n\ {\n\ end = $search_end\n\ rangeset_add(rsid, pos, end)\n\ }\n\ if (dialog("Remove it?", "OK", "Skip") == 1)\n\ replace_all(matchWhatStringDiffs, "", "regex")\n\ }\n\ else\n\ replace_all(matchWhatStringDiffs, "", "regex")\n\ }\n\ \n\ rangeset_destroy(rsid)\n\ }\n\ Rangesets>Remove>From set:::R: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ L = RangeSet_askExisting("Range sets from which to remove selection", "multi")\n\ if (L[] == 0)\n\ return\n\ \n\ for (n in L)\n\ r = RangeSet_remove(L[n])\n\ }\n\ Rangesets>Remove>From all sets:::R: {\n\ for (i in $rangeset_list)\n\ rangeset_subtract($rangeset_list[i])\n\ }\n\ Rangesets>Forget>Set:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ L = RangeSet_askExisting("Range sets to forget", "multi")\n\ if (L[] == 0)\n\ return\n\ \n\ for (n in L)\n\ {\n\ # if (dialog("Forgetting Rangeset \\"" L[n] "\\"", "OK", "Skip") == 1)\n\ RangeSet_forget(L[n])\n\ }\n\ }\n\ Rangesets>Forget>All sets:::: {\n\ while (0 in $rangeset_list)\n\ rangeset_destroy($rangeset_list[0])\n\ }\n\ Rangesets>Navigate>Choose Set:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ $RS_Navigate[""] = ""\n\ rs = RangeSet_askExisting("Range set to navigate")\n\ nrs = RangeSet_defined(rs)\n\ if (!nrs)\n\ {\n\ dialog("Range set "rs" not defined in this window")\n\ return\n\ }\n\ else\n\ dialog("Range set "rs" has "$RangeSet_ranges" ranges")\n\ $RS_Navigate["?"] = rs\n\ }\n\ Rangesets>Navigate>Move Backward Select:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ $RS_Navigate[""] = ""\n\ if (!("?" in $RS_Navigate))\n\ {\n\ rs = RangeSet_askExisting("Range set to navigate")\n\ nrs = RangeSet_defined(rs)\n\ if (!nrs)\n\ {\n\ dialog("Range set "rs" not defined in this window")\n\ return\n\ }\n\ else\n\ dialog("Range set "rs" has "$RangeSet_ranges" ranges")\n\ nrs = $RangeSet_ranges\n\ $RS_Navigate["?"] = rs\n\ }\n\ else\n\ {\n\ rs = $RS_Navigate["?"]\n\ RangeSet_defined(rs)\n\ nrs = $RangeSet_ranges\n\ }\n\ \n\ n = -1\n\ for (i = 0; i < nrs; i++)\n\ {\n\ RangeSet_defined(rs, i)\n\ if ($cursor <= $RangeSet_range_end)\n\ {\n\ if ($cursor <= $RangeSet_range_start)\n\ n = i - 1 # cursor between ranges: go to previous range\n\ else\n\ n = i # cursor in range i: move to start of range\n\ break\n\ }\n\ }\n\ \n\ if (n >= 0 && RangeSet_defined(rs, n))\n\ {\n\ set_cursor_pos($RangeSet_range_end)\n\ centerline()\n\ set_cursor_pos($RangeSet_range_start)\n\ RangeSet_select(rs, n)\n\ }\n\ else\n\ beep()\n\ }\n\ Rangesets>Navigate>Move Backward:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ $RS_Navigate[""] = ""\n\ if (!("?" in $RS_Navigate))\n\ {\n\ rs = RangeSet_askExisting("Range set to navigate")\n\ nrs = RangeSet_defined(rs)\n\ if (!nrs)\n\ {\n\ dialog("Range set "rs" not defined in this window")\n\ return\n\ }\n\ else\n\ dialog("Range set "rs" has "$RangeSet_ranges" ranges")\n\ nrs = $RangeSet_ranges\n\ $RS_Navigate["?"] = rs\n\ }\n\ else\n\ {\n\ rs = $RS_Navigate["?"]\n\ RangeSet_defined(rs)\n\ nrs = $RangeSet_ranges\n\ }\n\ \n\ n = -1\n\ for (i = 0; i < nrs; i++)\n\ {\n\ RangeSet_defined(rs, i)\n\ if ($cursor <= $RangeSet_range_end)\n\ {\n\ if ($cursor <= $RangeSet_range_start)\n\ n = i - 1 # cursor between ranges: go to previous range\n\ else\n\ n = i # cursor in range i: move to start of range\n\ break\n\ }\n\ }\n\ \n\ if (n >= 0 && RangeSet_defined(rs, n))\n\ {\n\ set_cursor_pos($RangeSet_range_end)\n\ centerline()\n\ set_cursor_pos($RangeSet_range_start)\n\ }\n\ else\n\ beep()\n\ }\n\ Rangesets>Navigate>Move Forward:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ $RS_Navigate[""] = ""\n\ if (!("?" in $RS_Navigate))\n\ {\n\ rs = RangeSet_askExisting("Range set to navigate")\n\ nrs = RangeSet_defined(rs)\n\ if (!nrs)\n\ {\n\ dialog("Range set "rs" not defined in this window")\n\ return\n\ }\n\ else\n\ dialog("Range set "rs" has "$RangeSet_ranges" ranges")\n\ nrs = $RangeSet_ranges\n\ $RS_Navigate["?"] = rs\n\ }\n\ else\n\ {\n\ rs = $RS_Navigate["?"]\n\ RangeSet_defined(rs)\n\ nrs = $RangeSet_ranges\n\ }\n\ \n\ n = -1\n\ for (i = 0; i < nrs; i++)\n\ {\n\ RangeSet_defined(rs, i)\n\ if ($cursor < $RangeSet_range_start)\n\ {\n\ # range following cursor is range i\n\ n = i\n\ break\n\ }\n\ }\n\ \n\ if (n >= 0 && RangeSet_defined(rs, n))\n\ {\n\ set_cursor_pos($RangeSet_range_end)\n\ centerline()\n\ set_cursor_pos($RangeSet_range_start)\n\ }\n\ else\n\ beep()\n\ }\n\ Rangesets>Navigate>Move Forward Select:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ $RS_Navigate[""] = ""\n\ if (!("?" in $RS_Navigate))\n\ {\n\ rs = RangeSet_askExisting("Range set to navigate")\n\ nrs = RangeSet_defined(rs)\n\ if (!nrs)\n\ {\n\ dialog("Range set "rs" not defined in this window")\n\ return\n\ }\n\ else\n\ dialog("Range set "rs" has "$RangeSet_ranges" ranges")\n\ nrs = $RangeSet_ranges\n\ $RS_Navigate["?"] = rs\n\ }\n\ else\n\ {\n\ rs = $RS_Navigate["?"]\n\ RangeSet_defined(rs)\n\ nrs = $RangeSet_ranges\n\ }\n\ \n\ n = -1\n\ for (i = 0; i < nrs; i++)\n\ {\n\ RangeSet_defined(rs, i)\n\ if ($cursor < $RangeSet_range_start)\n\ {\n\ # range following cursor is range i\n\ n = i\n\ break\n\ }\n\ }\n\ \n\ if (n >= 0 && RangeSet_defined(rs, n))\n\ {\n\ set_cursor_pos($RangeSet_range_end)\n\ centerline()\n\ set_cursor_pos($RangeSet_range_start)\n\ RangeSet_select(rs, n)\n\ }\n\ else\n\ beep()\n\ }\n\ Rangesets>Run through:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ L = RangeSet_askExisting("Range set to run through")\n\ if (L == "")\n\ return\n\ \n\ old_p = $cursor\n\ \n\ if (RangeSet_defined(L))\n\ {\n\ s = "rangeset \\""L"\\" (id="RangeSet_getRangeSet(L)")\\n"\\\n\ "Rangeset "$RangeSet_label " has " $RangeSet_ranges " ranges\\n"\n\ c = $RangeSet_color\n\ if (c != "")\n\ s = s "Color "c\n\ s = s "\\nModify behaviour \\"" $RangeSet_modify_response "\\""\n\ s = s "\\n\\nDefined rangesets:\\n" RangeSet_list()\n\ r = dialog(s, "OK", "Select", "Cancel")\n\ if (r != 1 && r != 2)\n\ return\n\ \n\ doSelect = (r == 2)\n\ carry_on = 1\n\ for (i = 0; carry_on == 1 && i < RangeSet_get_count(L); i++) {\n\ # deselect_all()\n\ if (RangeSet_select(L, i))\n\ ok = "good"\n\ else\n\ ok = "bad"\n\ t = " "i+1" of "$RangeSet_ranges": [" $selection_start ", " $selection_end "] ("ok")\\n"\n\ set_cursor_pos($selection_start)\n\ set_cursor_pos($selection_end)\n\ set_cursor_pos($selection_start)\n\ if (!doSelect)\n\ deselect_all()\n\ carry_on = dialog(" " $RangeSet_label " range " t, "OK", "Cancel")\n\ }\n\ \n\ if (carry_on == 1)\n\ set_cursor_pos(old_p)\n\ }\n\ }\n\ Rangesets>Go to range:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ NEDIT_require_macro_file("centerline.nm")\n\ \n\ L = RangeSet_askExisting("Range in which set?")\n\ if (L == "")\n\ return\n\ \n\ if (RangeSet_defined(L))\n\ {\n\ loop = 1\n\ while (loop)\n\ {\n\ # build title string\n\ s = "rangeset \\""L"\\"\\n"\\\n\ "Rangeset "$RangeSet_label " has " $RangeSet_ranges " ranges\\n"\n\ c = $RangeSet_color\n\ if (c != "")\n\ s = s "Color " c\n\ s = s "\\nModify behaviour \\"" $RangeSet_modify_response "\\""\n\ \n\ width = length($RangeSet_ranges "")\n\ \n\ list = ""\n\ line = ""\n\ endline = ""\n\ for (i = 0; RangeSet_defined(L, i); i++) {\n\ numstr = " " i\n\ numstr = substring(numstr, length(numstr) - width, length(numstr)) ":"\n\ RangeSet_defined(L, i)\n\ p1 = search("\\n", max($RangeSet_range_start - 1, 0), "case", "backward")\n\ if (p1 < 0)\n\ p1 = 0\n\ if (p1 <= $RangeSet_range_start - 1)\n\ p1++\n\ p2 = search("\\n", $RangeSet_range_start, "case")\n\ if (p2 == -1)\n\ p2 = $text_length\n\ if (p2 < $RangeSet_range_end)\n\ endline = get_range($RangeSet_range_start, p2) "...»"\n\ else\n\ endline = get_range($RangeSet_range_start, $RangeSet_range_end) "»" \\\n\ get_range($RangeSet_range_end, p2)\n\ line = get_range(p1, $RangeSet_range_start) "«" endline\n\ where = "= "\n\ if ($cursor < $RangeSet_range_start)\n\ where = "> "\n\ else if ($cursor > $RangeSet_range_end)\n\ where = "< "\n\ list = list numstr where line "\\n"\n\ \n\ # debug = "p1 = " p1 "\\n" \\\n\ # "$RangeSet_range_start = " $RangeSet_range_start "\\n" \\\n\ # "p2 = " p2 "\\n" \\\n\ # "$RangeSet_range_end = " $RangeSet_range_end "\\n"\n\ # dialog(debug numstr line)\n\ }\n\ \n\ if (list != "")\n\ {\n\ line = list_dialog(s, list, "OK", "Select", "Find & Loop", "Cancel")\n\ if ($list_dialog_button > 3 || line == "")\n\ return # dismissed or dialog closed\n\ \n\ loop = $list_dialog_button == 3\n\ sel = $list_dialog_button == 2\n\ \n\ line = replace_in_string(line, " *(\\\\d+):.*", "\\\\1", "regex")\n\ if (RangeSet_defined(L, line))\n\ {\n\ set_cursor_pos($RangeSet_range_start)\n\ centerline()\n\ }\n\ if (sel)\n\ RangeSet_select(L, line)\n\ }\n\ else\n\ {\n\ loop = 0\n\ dialog("rangeset \\""L"\\" contains no ranges")\n\ }\n\ }\n\ }\n\ else\n\ {\n\ dialog("rangeset \\""L"\\" is undefined")\n\ }\n\ }\n\ Rangesets>Mark with range:::R: {\n\ NEDIT_require_macro_file("RScolor.nm")\n\ \n\ L = RangeSet_ask("Range set used to mark")\n\ if (L == "")\n\ return\n\ \n\ RangeSet_add(L)\n\ \n\ if (!RangeSet_defined(L) || $RangeSet_color == "")\n\ {\n\ RangeSet_QuickColor(L)\n\ }\n\ }\n\ Rangesets>Mark with TOP range:::R: {\n\ NEDIT_require_macro_file("RScolor.nm")\n\ \n\ idid = $rangeset_list[]\n\ id = $rangeset_list[idid - 1]\n\ # dialog("Number of RS="idid"\\nTop id="id)\n\ L = rangeset_info(id)["name"]\n\ \n\ RangeSet_add(L)\n\ \n\ if (!RangeSet_defined(L) || $RangeSet_color == "")\n\ {\n\ RangeSet_QuickColor(L)\n\ }\n\ }\n\ Rangesets>Delete text of set:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ L = RangeSet_askExisting("Range set whose text to delete")\n\ if (!RangeSet_defined(L))\n\ {\n\ dialog("Rangeset "L" not defined")\n\ return\n\ }\n\ \n\ prompt = "Do you really want to delete the contents of rangeset "L"?\\n"\n\ prompt = prompt "("L" contains "RangeSet_get_count(L)" ranges)\\n"\n\ prompt = prompt "Choose \\"Yes (prompt)\\" for confirmation for each range\\n"\n\ prompt = prompt "Choose \\"Yes (silent)\\" to remove all text unconditionally"\n\ para = dialog("Do you really want to delete the contents of rangeset "L"?", \\\n\ "No", "Yes (prompt)", "Yes (silent)")\n\ silent = 0\n\ if (para == 2 || para == 3)\n\ {\n\ silent = (para == 3)\n\ }\n\ else\n\ return\n\ \n\ prompt = ""\n\ prompt = prompt "Choose \\"OK\\" to delete this range\\n"\n\ prompt = prompt "Choose \\"Stop\\" to stop deleting ranges\\n"\n\ prompt = prompt "Choose \\"Skip\\" to keep this range and carry on"\n\ skip = 0\n\ while (RangeSet_get_count(L) > skip)\n\ {\n\ RangeSet_select(L, skip)\n\ set_cursor_pos($selection_end)\n\ set_cursor_pos($selection_start)\n\ \n\ if (silent)\n\ ok = silent\n\ else\n\ {\n\ prompt1 = "Rangeset "L" contains "RangeSet_get_count(L) " ranges\\n"\n\ if (skip > 0)\n\ prompt1 = prompt1 "of which the first "skip" have been skipped\\n"\n\ ok = dialog(prompt1 prompt, "OK", "Stop", "Skip")\n\ }\n\ \n\ if (ok == 1) # OK\n\ {\n\ RangeSet_select(L, skip)\n\ replace_selection("")\n\ }\n\ else if (ok == 3)\n\ {\n\ skip++\n\ deselect_all()\n\ }\n\ else\n\ break\n\ }\n\ \n\ if (silent)\n\ RangeSet_forget(L)\n\ else if (skip == 0)\n\ {\n\ dialog("Rangeset "L" contains "RangeSet_get_count(L) " ranges: forgetting")\n\ RangeSet_forget(L)\n\ }\n\ else\n\ {\n\ prompt = "Rangeset "L" contains "RangeSet_get_count(L) " ranges\\n"\n\ prompt = prompt "Do you want to forget "L"?"\n\ if (dialog(prompt, "Yes", "No") == 1) # yes clicked?\n\ RangeSet_forget(L)\n\ }\n\ }\n\ Rangesets>Modify Fn:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ L = RangeSet_askExisting("Range set whose behaviour to change")\n\ if (L == "")\n\ return\n\ \n\ info = "Range set " L\n\ if (RangeSet_defined(L))\n\ info = info " uses \\""$RangeSet_modify_response"\\""\n\ \n\ modify_fn = "maintain\\nins_del\\ninclude\\ndel_ins\\nexclude\\nbreak\\n"\n\ C = list_dialog(info "\\nWhich modify behaviour?", modify_fn, "OK")\n\ \n\ if (C == "")\n\ RangeSet_set_modify_response(L)\n\ else\n\ RangeSet_set_modify_response(L, C)\n\ }\n\ Rangesets>Move to topmost:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ L = RangeSet_askExisting("Range set to move to top")\n\ if (L == "" || !RangeSet_defined(L))\n\ return\n\ \n\ # get an anonymous rangeset\n\ id = rangeset_create()\n\ # save L's information\n\ lid = RangeSet_getRangeSet(L)\n\ RangeSet_defined(L)\n\ color = $RangeSet_color\n\ mode = $RangeSet_modify_response\n\ rangeset_add(id, lid)\n\ # remove L\n\ rangeset_destroy(lid)\n\ # set L's parameters in id\n\ rangeset_set_color(id, color)\n\ rangeset_set_name(id, L)\n\ rangeset_set_mode(id, mode)\n\ \n\ # Was: \n\ # T = RangeSet_ask("Temporary range set (will be deleted)")\n\ # if (T == "")\n\ # {\n\ # dialog("No temporary range set to perform move of range set" L)\n\ # return\n\ # }\n\ # else if (RangeSet_defined(T))\n\ # {\n\ # x = dialog("Temporary set "T" in use: do you want to erase it?", "No", "Yes")\n\ # if (x != 2)\n\ # {\n\ # dialog("Cannot use temporary range set "T" to move range set "L)\n\ # return\n\ # }\n\ # }\n\ # \n\ # RangeSet_forget(T)\n\ # RangeSet_defined(L)\n\ # color = $RangeSet_color\n\ # RangeSet_add(T, L)\n\ # RangeSet_forget(L)\n\ # RangeSet_add(L, T)\n\ # RangeSet_set_color(L, color)\n\ # RangeSet_forget(T)\n\ }\n\ Rangesets>Change behaviour:::: {\n\ NEDIT_require_macro_file("RSextensions.nm")\n\ NEDIT_require_macro_file("RSselect.nm")\n\ \n\ L = RangeSet_askExisting("Range set whose behaviour to change?")\n\ if (L == "")\n\ return\n\ \n\ list="maintain\\nins_del\\ninclude\\ndel_ins\\nexclude\\nbreak"\n\ \n\ id = RangeSet_getRangeSet(L)\n\ curr = rangeset_info(id)["mode"]\n\ \n\ mode = list_dialog("Range set " L " has behaviour " curr"\\nNew behaviour", \\\n\ list, "OK", "Cancel")\n\ \n\ if ($list_dialog_button != 1)\n\ return\n\ \n\ rangeset_set_mode(id, mode)\n\ }\n\ Backlight>Set XPM Backlighting:::: {\n\ NEDIT_require_macro_file("element.nm")\n\ NEDIT_require_macro_file("extensions.nm")\n\ \n\ set_backlight_string()\n\ \n\ new_bls = ""\n\ bls = ""\n\ pos = 0\n\ end = 0\n\ got_one = 0\n\ \n\ # process a line at a time\n\ while (pos >= 0)\n\ {\n\ end = search("\\n", pos, "case")\n\ if (end == -1)\n\ break\n\ \n\ # get the line\n\ l = get_range(pos, end)\n\ pos = end + 1\n\ \n\ # does it match a color specification?\n\ if (search_string(l, "^\\"(.).*[ \\t]c[ \\t]([^ \\t\\"]+)\\",[ \\t]*$", 0, "regex") != -1)\n\ {\n\ v = replace_in_string(l, "^\\"(.).*[ \\t]c[ \\t]([^ \\t\\"]+)\\",[ \\t]*$", "\\\\1\\t\\\\2", "regex")\n\ s = element_i(v, 0, "\\t")\n\ c = element_i(v, 1, "\\t")\n\ \n\ got_one = 1 # we're in the color specification part\n\ \n\ if (tolower(c) == "none") # special case: no color\n\ continue\n\ \n\ new_bls = new_bls ";" toascii(s) ":" c\n\ }\n\ else if (got_one) # not a color line: color specification part finished\n\ break\n\ }\n\ \n\ set_backlight_string()\n\ bls = $backlight_string # pick up old highlighting\n\ \n\ if (bls != "")\n\ new_bls = bls new_bls\n\ else\n\ new_bls = substring(new_bls, 1, length(new_bls))\n\ \n\ set_backlight_string(new_bls)\n\ \n\ set_language_mode("XPM pixmap")\n\ }\n\ Backlight>Set Default Backlighting:::: {\n\ set_backlight_string()\n\ }\n\ Backlight>Remove Backlighting:::: {\n\ set_backlight_string("")\n\ }\n\ Backlight>Show Backlighting Groups:::: {\n\ NEDIT_require_macro_file("backlight.nm")\n\ \n\ backlight_display_backlights()\n\ }\n\ Backlight>Change Backlighting Groups:::: {\n\ NEDIT_require_macro_file("backlight.nm")\n\ \n\ backlight_manip_backlights()\n\ }\n\ Backlight>Forget Backlighting Groups:::: {\n\ NEDIT_require_macro_file("backlight.nm")\n\ \n\ for (g in $backlights)\n\ delete $backlights[g]\n\ }\n\ Highlight>Convert to HTML:::: {\n\ NEDIT_require_macro_file("HStoHTML.nm")\n\ prompt = "Expand tabs to spaces during conversion?\\n"\n\ prompt = prompt "(Tab distance is " $tab_dist ")"\n\ if (dialog(prompt, "Yes", "No") == 1) # "yes" clicked?\n\ HighlightToHTML("detab") # do detab\n\ else\n\ HighlightToHTML() # leave tabs in HTML\n\ }\n\ Highlight>Convert to HTML Pretty:::: {\n\ NEDIT_require_macro_file("HStoHTML.nm")\n\ \n\ prompt = "Expand tabs to spaces during conversion?\\n"\n\ prompt = prompt "(Tab distance is " $tab_dist ")"\n\ if (dialog(prompt, "Yes", "No") == 1) # "yes" clicked?\n\ HighlightToHTML_PrettyPage("detab", "white", "#c0c0c0", "#e5e5e5") # do detab\n\ else\n\ HighlightToHTML_PrettyPage("", "white", "#c0c0c0", "#e5e5e5") # leave tabs in HTML\n\ }\n\ Highlight>Show Attributes:::: {\n\ s = "Position: " $cursor\n\ s = s "\\nPattern Info - get_pattern_at_pos(" $cursor "):"\n\ a = get_pattern_at_pos($cursor)\n\ for (v in a) {\n\ s = s "\\n [" v "] = " a[v]\n\ }\n\ pattern = a["pattern"]\n\ \n\ s = s "\\nStyle Info - get_style_at_pos(" $cursor "):"\n\ a = get_style_at_pos($cursor)\n\ for (v in a) {\n\ s = s "\\n [" v "] = " a[v]\n\ }\n\ style = a["style"]\n\ \n\ s = s "\\n\\nNon-Positional Info:"\n\ s = s "\\nPattern Info - get_pattern_by_name(" pattern "):"\n\ a = get_pattern_by_name(pattern)\n\ for (v in a) {\n\ s = s "\\n [" v "] = " a[v]\n\ }\n\ s = s "\\nStyle Info - get_style_by_name(" style "):"\n\ a = get_style_by_name(style)\n\ for (v in a) {\n\ s = s "\\n [" v "] = " a[v]\n\ }\n\ \n\ dialog(s)\n\ }\n\ Paragraph>Show settings@Plain text@Doxygen@Doxygen strict:::: {\n\ NEDIT_require_macro_file("PlainText.nm")\n\ \n\ PlainText_setSettings()\n\ }\n\ Paragraph>Toggle 1st Line Handling@PERS text:::: {\n\ NEDIT_require_macro_file("pers.nm")\n\ \n\ $PERS_take_second_line = !$PERS_take_second_line\n\ \n\ line = ""\n\ if ($PERS_take_second_line)\n\ line = "SECOND"\n\ else\n\ line = "FIRST"\n\ \n\ dialog("The " line " line of a paragraph\\n" \\\n\ "determines the indentation for\\n" \\\n\ "paragraph refilling.")\n\ }\n\ Paragraph>Select Paragraph@Plain text@Doxygen@Doxygen strict:::: {\n\ NEDIT_require_macro_file("PlainText.nm")\n\ \n\ paraBeg = PlainText_ParagraphBegin(get_range(0, $text_length), $cursor)\n\ paraEnd = PlainText_ParagraphEnd(get_range(0, $text_length), $cursor)\n\ select(paraBeg, paraEnd)\n\ set_cursor_pos(paraEnd)\n\ }\n\ Paragraph>Select Paragraph@PERS text:::: {\n\ NEDIT_require_macro_file("pers.nm")\n\ \n\ select(PERS_beginOfParagraph($cursor), PERS_endOfParagraph($cursor))\n\ }\n\ Paragraph>Refill Paragraphs@Plain text@Doxygen@Doxygen strict:Alt+J::: {\n\ NEDIT_require_macro_file("PlainText.nm")\n\ \n\ if ($selection_left != -1)\n\ return dialog("Cannot refill a paragraph in a rectangular selection")\n\ \n\ start = $cursor\n\ end = $cursor\n\ if ($selection_start != -1)\n\ {\n\ set_cursor_pos($selection_start)\n\ start = $selection_start\n\ end = $selection_end\n\ }\n\ else\n\ {\n\ start = PlainText_ParagraphBegin(get_range(0, $text_length), $cursor)\n\ end = PlainText_ParagraphEnd(get_range(0, $text_length), $cursor)\n\ set_cursor_pos(start)\n\ }\n\ \n\ p = PlainText_ParagraphFill(get_range(start, end), $column, 0, end - start)\n\ replace_range(start, end, p)\n\ set_cursor_pos(start + length(p))\n\ }\n\ Paragraph>Refill Paragraphs@PERS text:Alt+J::: {\n\ NEDIT_require_macro_file("pers.nm")\n\ \n\ if ($selection_start == -1)\n\ set_cursor_pos(PERS_refillParagraph($cursor))\n\ else\n\ set_cursor_pos(PERS_refillParagraph(PERS_makeParagraph($selection_start, $selection_end)))\n\ }\n\ Paragraph>Start of Paragraph@PERS text:::: {\n\ NEDIT_require_macro_file("pers.nm")\n\ \n\ set_cursor_pos(PERS_beginOfParagraph($cursor))\n\ }\n\ Paragraph>End of Paragraph@PERS text:::: {\n\ NEDIT_require_macro_file("pers.nm")\n\ \n\ set_cursor_pos(PERS_endOfParagraph($cursor))\n\ }\n\ Paragraph>Previous Paragraph@PERS text:::: {\n\ NEDIT_require_macro_file("pers.nm")\n\ \n\ c = PERS_beginOfParagraph(PERS_beginOfParagraph($cursor) - 1)\n\ while (c >= 0)\n\ {\n\ if (!PERS_isEmptyLine(c))\n\ {\n\ set_cursor_pos(c)\n\ return\n\ }\n\ c = PERS_beginOfParagraph(PERS_beginOfParagraph(c) - 1)\n\ }\n\ }\n\ Paragraph>Next Paragraph@PERS text:::: {\n\ NEDIT_require_macro_file("pers.nm")\n\ \n\ c = PERS_endOfParagraph($cursor) + 1\n\ while (c <= $text_length)\n\ {\n\ if (!PERS_isEmptyLine(c))\n\ {\n\ set_cursor_pos(c)\n\ return\n\ }\n\ c = PERS_endOfParagraph(c) + 1\n\ }\n\ }\n\ man / postprocess:F1::: {\n\ NEDIT_require_macro_file("ManHelp.nm")\n\ \n\ ManHelp()\n\ }\n\ Redo braces@C@C++@Perl@NEdit Macro:::: {\n\ indent[0] = ""\n\ \n\ n = string_dialog("Indent width (default "$em_tab_dist")", "OK")\n\ if ($string_dialog_button != 1)\n\ return\n\ \n\ if (search_string(n, "^\\\\s*\\\\d+\\\\s*$", 0, "regex") < 0)\n\ {\n\ dialog("Using indent width "$em_tab_dist" instead of '"n"'")\n\ n = $em_tab_dist\n\ }\n\ else if (n < 1)\n\ {\n\ dialog("Using indent width "$em_tab_dist" instead of "n)\n\ n = $em_tab_dist\n\ }\n\ \n\ spaces = ""\n\ for (i = 0; i < n; i++)\n\ spaces = spaces " "\n\ \n\ for (i = 1; i < 20; i++)\n\ {\n\ indent[i] = indent[i - 1] spaces\n\ }\n\ \n\ i = 0\n\ for (pos = search("{", 0); pos != -1; pos = search("[{}\\n]", pos + 1, "regex"))\n\ {\n\ c = get_character(pos)\n\ if (c == "{")\n\ i++\n\ else if (c == "}")\n\ i--\n\ else if (c == "\\n")\n\ {\n\ endpos = search("[^ \\t]", pos + 1, "regex")\n\ if (endpos != -1)\n\ {\n\ c = get_character(endpos)\n\ l = endpos - pos - 1\n\ if (c != "\\n" && c != "}")\n\ {\n\ dl = length(indent[i]) - l\n\ replace_range(pos + 1, endpos, indent[i])\n\ }\n\ else if (c == "}" && i > 0)\n\ {\n\ dl = length(indent[i]) - l\n\ replace_range(pos + 1, endpos, indent[i - 1])\n\ }\n\ else\n\ dl = 0\n\ }\n\ }\n\ }\n\ }\n\ C/C++ Prog>C++ cast - set@C++:::: {\n\ $CppCastOper[1] = ""\n\ prompt = "Which cast type to use?"\n\ if ($CppCastOper[] == 2)\n\ prompt = prompt " (currently " $CppCastOper[0] ")"\n\ i = dialog(prompt, "static", "dynamic", "reinterpret", "(reset)", "Cancel")\n\ if (i == 1)\n\ $CppCastOper[0] = "static_cast"\n\ else if (i == 2)\n\ $CppCastOper[0] = "dynamic_cast"\n\ else if (i == 3)\n\ $CppCastOper[0] = "reinterpret_cast"\n\ else if (i == 4)\n\ delete $CppCastOper[0]\n\ }\n\ C/C++ Prog>C++ cast - apply@C++:::R: {\n\ $CppCastOper[1] = ""\n\ if ($CppCastOper[] != 2)\n\ macro_menu_command("C/C++ Prog>C++ cast - set@C++")\n\ p = $selection_start\n\ replace_range($selection_end, $selection_end, ")")\n\ s = $CppCastOper[0] "<>("\n\ replace_range(p, p, $CppCastOper[0] "<>(")\n\ p += length(s) - 2\n\ set_cursor_pos(p)\n\ }\n\ Development>"what" string@C@C++@Doxygen@Doxygen strict:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ Development_makeWhatString_C_Cpp()\n\ }\n\ Development>"what" string@XML@SGML HTML:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ Development_makeWhatString_HTML_SGML_XML()\n\ }\n\ Development>"what" string@Makefile@Csh@Sh Ksh Bash@Hash comments:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ Development_makeWhatString_Hash()\n\ }\n\ Development>File header box@C@C++@Doxygen@Doxygen strict:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ Development_makeFileHeaderComment_C_Cpp()\n\ }\n\ Development>File header box@Makefile@Csh@Sh Ksh Bash@Hash comments:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ Development_makeFileHeaderComment_Hash()\n\ }\n\ Development>Add header file guards@C@C++@Doxygen@Doxygen strict:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ Development_addHeaderFileGuards_C_Cpp()\n\ }\n\ Development>New C++ file:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ s = string_dialog("Make new C++ file:", "OK", "Cancel")\n\ if (s != "" && $string_dialog_button == 1)\n\ Development_makeNewFile_Cpp(s)\n\ }\n\ Development>New C++ Class files:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ s = string_dialog("Make header and source C++ file for class:", "OK", "Cancel")\n\ if (s != "" && $string_dialog_button == 1)\n\ Development_makeClassFiles_Cpp(s)\n\ }\n\ Development>Open C++ Class files:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ s = string_dialog("Directory: " $file_path "\\n" \\\n\ "Open header and source C++ file for class:", "OK", "Cancel")\n\ if (s != "" && $string_dialog_button == 1)\n\ Development_openClassFiles_Cpp(s)\n\ }\n\ Development>Make C++ Method in class.cpp file@C++:::: {\n\ NEDIT_require_macro_file("Development.nm")\n\ \n\ Development_makeCppMethod()\n\ }\n\ Goto selected line number:Shift+Ctrl+L::: {\n\ sel = get_selection("any")\n\ if (sel == "")\n\ {\n\ pos = $cursor\n\ while (pos > 0 && (search("\\\\d", pos - 1, "regex") == pos - 1))\n\ pos--\n\ if (search("\\\\d+", pos, "regex") != pos)\n\ {\n\ beep() # no digit here\n\ }\n\ else\n\ {\n\ end = $search_end\n\ goto_line_number(get_range(pos, end))\n\ }\n\ }\n\ \n\ # dialog("In file "$file_name": line "sel)\n\ goto_line_number(get_selection("any"))\n\ }\n\ Error Numbers>Clear Numbers:::: {\n\ $errNos[""] = ""\n\ \n\ delete $errNos[]\n\ }\n\ Error Numbers>Set Numbers:::: {\n\ $errNos[""] = ""\n\ list = ""\n\ nl = ""\n\ l = 0\n\ for (e in $errNos)\n\ {\n\ if (e != "")\n\ {\n\ list = list nl e " =\\t" $errNos[e]\n\ nl = "\\n"\n\ l++\n\ }\n\ }\n\ \n\ if (list == "")\n\ {\n\ dialog("No error numbers set yet")\n\ return\n\ }\n\ \n\ if (l == 1)\n\ e = list\n\ else\n\ e = list_dialog("Correct which number?", list, "OK")\n\ \n\ e = replace_in_string(e, " .*", "", "regex", "copy")\n\ \n\ if (e == "")\n\ return\n\ \n\ n = string_dialog("Enter LAST value for " e " (now " $errNos[e] ")", "OK")\n\ nn = n\n\ if (n == "")\n\ return\n\ \n\ n = n + 0\n\ if (n < 999)\n\ {\n\ if (0) n = -1\n\ else if (e == "LGR_EMERG") n += 60000\n\ else if (e == "LGR_ERR") n += 61000\n\ else if (e == "LGR_WARNING") n += 62000\n\ else if (e == "LGR_INFO") n += 63000\n\ else if (e == "LGR_DEBUG") n += 64000\n\ else n = -1\n\ }\n\ \n\ if (n > 0)\n\ $errNos[e] = n\n\ else\n\ dialog("Error in setting " e " to " nn)\n\ }\n\ Error Numbers>Set Highest Numbers:::: {\n\ $errNos[""] = ""\n\ oldNos = $errNos\n\ ss = "Slogger::logMsg\\\\(\\\\s*(LGR_\\\\w*)\\\\s*, \\"\\\\|(6.\\\\d\\\\d\\\\d)\\\\|\\""\n\ end = 0\n\ for (pos = search(ss, end, "regex"); pos >= 0; pos = search(ss, end, "regex"))\n\ {\n\ beg = pos\n\ end = $search_end\n\ extract = get_range(beg, end)\n\ key = replace_in_string(extract, ss, "\\\\1", "regex")\n\ val = replace_in_string(extract, ss, "\\\\2", "regex") + 0\n\ if (!(key in $errNos))\n\ {\n\ oldNos[key] = 0\n\ $errNos[key] = val\n\ }\n\ else\n\ $errNos[key] = max($errNos[key], val)\n\ }\n\ \n\ list = ""\n\ nl = ""\n\ l = 0\n\ for (e in $errNos)\n\ {\n\ if (e != "")\n\ {\n\ list = list nl e " =\\t" $errNos[e]\n\ if ($errNos[e] > oldNos[e])\n\ list = list "\\t(was " oldNos[e] ")"\n\ nl = "\\n"\n\ l++\n\ }\n\ }\n\ \n\ if (list == "")\n\ {\n\ dialog("No error numbers set yet")\n\ return\n\ }\n\ \n\ list_dialog("Numbers are:", list, "Cancel")\n\ }\n\ Error Numbers>Set Highest Numbers from All:::: {\n\ $errNos[""] = ""\n\ oldNos = $errNos\n\ oldFile = $file_path $file_name\n\ for (file = focus_window("last"); file != ""; file = focus_window("next"))\n\ {\n\ raise_window()\n\ ss = "Slogger::logMsg\\\\(\\\\s*(LGR_\\\\w*)\\\\s*, \\"\\\\|(6.\\\\d\\\\d\\\\d)\\\\|\\""\n\ end = 0\n\ for (pos = search(ss, end, "regex"); pos >= 0; pos = search(ss, end, "regex"))\n\ {\n\ beg = pos\n\ end = $search_end\n\ extract = get_range(beg, end)\n\ key = replace_in_string(extract, ss, "\\\\1", "regex")\n\ val = replace_in_string(extract, ss, "\\\\2", "regex") + 0\n\ if (!(key in $errNos))\n\ {\n\ oldNos[key] = 0\n\ $errNos[key] = val\n\ }\n\ else\n\ $errNos[key] = max($errNos[key], val)\n\ }\n\ }\n\ \n\ list = ""\n\ nl = ""\n\ l = 0\n\ for (e in $errNos)\n\ {\n\ if (e != "")\n\ {\n\ list = list nl e " =\\t" $errNos[e]\n\ if ($errNos[e] > oldNos[e])\n\ list = list "\\t(was " oldNos[e] ")"\n\ nl = "\\n"\n\ l++\n\ }\n\ }\n\ \n\ if (list == "")\n\ {\n\ dialog("No error numbers set yet")\n\ return\n\ }\n\ \n\ list_dialog("Numbers are:", list, "Cancel")\n\ }\n\ Error Numbers>Check errors:::: {\n\ errNos = $empty_array\n\ errNoNum = $empty_array\n\ oldNos = errNos\n\ oldFile = $file_path $file_name\n\ \n\ for (file = focus_window("last"); file != ""; file = focus_window("next"))\n\ {\n\ ss = "Slogger::logMsg\\\\(\\\\s*(LGR_\\\\w*)\\\\s*, \\"\\\\|(6.\\\\d\\\\d\\\\d)\\\\|\\""\n\ end = 0\n\ for (pos = search(ss, end, "regex"); pos >= 0; pos = search(ss, end, "regex"))\n\ {\n\ beg = pos\n\ end = $search_end\n\ extract = get_range(beg, end)\n\ key = replace_in_string(extract, ss, "\\\\1", "regex")\n\ val = replace_in_string(extract, ss, "\\\\2", "regex") + 0\n\ \n\ # get line information\n\ line_no = 1\n\ old_nl =0\n\ for (nl = search("\\n", 0); nl < beg && nl >= 0; nl = search("\\n", nl + 1))\n\ {\n\ old_nl = nl\n\ line_no++\n\ }\n\ if (nl < 0)\n\ nl = $text_length\n\ if (!(val in errNoNum))\n\ errNoNum[val] = $empty_array\n\ i = errNoNum[val][]\n\ theline = $file_path $file_name ":" line_no ":" get_range(old_nl + 1, nl)\n\ errNoNum[val][i] = theline\n\ \n\ if (!(key in errNos))\n\ {\n\ oldNos[key] = 0\n\ errNos[key] = val\n\ }\n\ else\n\ errNos[key] = max(errNos[key], val)\n\ }\n\ }\n\ \n\ list = ""\n\ nl = ""\n\ l = 0\n\ for (e in errNos)\n\ {\n\ if (e != "")\n\ {\n\ list = list nl e " =\\t" errNos[e]\n\ if (errNos[e] > oldNos[e])\n\ list = list "\\t(was " oldNos[e] ")"\n\ nl = "\\n"\n\ l++\n\ }\n\ }\n\ \n\ err = ""\n\ lastVal = -1\n\ for (e in errNoNum)\n\ {\n\ if (lastVal < 0)\n\ err = err "starting at "e"\\n"\n\ else if (e > lastVal + 1)\n\ err = err "gap from "(lastVal+1)" to "(e-1)"\\n"\n\ lastVal = e\n\ if (errNoNum[e][] > 1)\n\ {\n\ err = err "duplicate number "e" in messages:\\n"\n\ for (i = 0; i < errNoNum[e][]; i++)\n\ err = err " "e"<"i"> " errNoNum[e][i] "\\n"\n\ }\n\ }\n\ if (err != "")\n\ err = err "ending at "lastVal"\\n"\n\ \n\ if (list == "")\n\ {\n\ dialog("No error numbers set yet")\n\ return\n\ }\n\ \n\ list_dialog("Numbers are:", list, "Cancel")\n\ list_dialog("Errors are:", err, "Cancel")\n\ }\n\ Error Numbers>Retrieve logs:::: {\n\ errNos = $empty_array\n\ errNoNum = $empty_array\n\ oldNos = errNos\n\ oldFile = $file_path $file_name\n\ \n\ sl = "(?<=Slogger::logMsg\\\\()\\\\s*LGR_\\\\w*\\\\s*, \\"\\\\|6.\\\\d\\\\d\\\\d\\\\|\\""\n\ ss = "\\\\s*(LGR_\\\\w*)\\\\s*, \\"\\\\|(6.\\\\d\\\\d\\\\d)\\\\|\\""\n\ for (file = focus_window("last"); file != ""; file = focus_window("next"))\n\ {\n\ end = 0\n\ #raise_window()\n\ for (pos = search(sl, end, "regex"); pos >= 0; pos = search(sl, end, "regex"))\n\ {\n\ beg = pos\n\ end = $search_end\n\ extract = get_range(beg, end)\n\ key = replace_in_string(extract, ss, "\\\\1", "regex")\n\ val = replace_in_string(extract, ss, "\\\\2", "regex") + 0\n\ \n\ # get line information\n\ line_no = 1\n\ old_nl =0\n\ for (nl = search("\\n", 0); nl < beg && nl >= 0; nl = search("\\n", nl + 1))\n\ {\n\ old_nl = nl\n\ line_no++\n\ }\n\ if (nl < 0)\n\ nl = $text_length\n\ \n\ # pick up the parameter list\n\ set_cursor_pos(pos)\n\ goto_matching()\n\ cpos = $cursor\n\ if (cpos > pos + 1)\n\ {\n\ # stick all content between parens together\n\ parms = replace_in_string(get_range(pos, cpos - 1), "\\n", " ", "copy")\n\ parms = replace_in_string(parms, "\\t", " ", "copy")\n\ # glob the string pieces together\n\ matchss = "\\"((?:[^\\"\\\\\\\\]|\\\\\\\\.)*)\\"\\\\s*\\""\n\ replss = "\\"\\\\1"\n\ #dialog("File "file"\\nLine "line_no"\\nParms = "parms"\\nmatchss = "matchss"\\nreplss = "replss)\n\ oldparms = parms\n\ for (parms = replace_in_string(parms, matchss, replss, "regex", "copy"); \\\n\ parms != oldparms; \\\n\ parms = replace_in_string(parms, matchss, replss, "regex", "copy"))\n\ {\n\ #dialog("\\nParms = "parms"\\noldparms = "oldparms)\n\ oldparms = parms\n\ }\n\ # add tabs on either side of format string\n\ parms = replace_in_string(parms, \\\n\ "^[^\\"]*\\\\s*\\"((?:[^\\"\\\\\\\\]+|\\\\\\\\.)*)\\"", \\\n\ "\\t\\"\\\\1\\"\\t", "regex", "copy")\n\ # compress spaces following last tab\n\ parms0 = replace_in_string(parms, "(.*\\t)[^\\t]*$", "\\\\1", "regex", "copy")\n\ parms1 = substring(parms, length(parms0), length(parms))\n\ parms1 = replace_in_string(parms1, "\\\\s\\\\s+", " ", "regex", "copy")\n\ parms = parms0 parms1\n\ }\n\ else\n\ {\n\ parms = "ERROR: " get_range(old_nl + 1, nl)\n\ }\n\ \n\ if (!(val in errNoNum))\n\ errNoNum[val] = $empty_array\n\ i = errNoNum[val][]\n\ theline = $file_path $file_name ":" line_no ":\\t" parms\n\ errNoNum[val][i] = theline\n\ \n\ if (!(key in errNos))\n\ {\n\ oldNos[key] = 0\n\ errNos[key] = val\n\ }\n\ else\n\ errNos[key] = max(errNos[key], val)\n\ }\n\ }\n\ \n\ list = ""\n\ nl = ""\n\ l = 0\n\ for (e in errNos)\n\ {\n\ if (e != "")\n\ {\n\ list = list nl e " =\\t" errNos[e]\n\ if (errNos[e] > oldNos[e])\n\ list = list "\\t(was " oldNos[e] ")"\n\ nl = "\\n"\n\ l++\n\ }\n\ }\n\ \n\ err = ""\n\ lastVal = -1\n\ for (e in errNoNum)\n\ {\n\ if (lastVal < 0)\n\ err = err "starting at "e"\\n"\n\ else if (e > lastVal + 1)\n\ err = err "gap from "(lastVal+1)" to "(e-1)"\\n"\n\ lastVal = e\n\ if (errNoNum[e][] > 1)\n\ {\n\ err = err "duplicate number "e" in messages:\\n"\n\ }\n\ for (i = 0; i < errNoNum[e][]; i++)\n\ err = err " "e"<"i"> " errNoNum[e][i] "\\n"\n\ }\n\ if (err != "")\n\ err = err "ending at "lastVal"\\n"\n\ \n\ if (list == "")\n\ {\n\ dialog("No error numbers set yet")\n\ #return\n\ }\n\ else\n\ list_dialog("Numbers are:", list, "Cancel")\n\ \n\ list_dialog("Errors are:", err, "Cancel", "To New File")\n\ if ($list_dialog_button == 2)\n\ {\n\ new()\n\ focus_window("last")\n\ insert_string(err)\n\ }\n\ }\n\ Error Numbers>Remove In File:::: {\n\ if (dialog("Remove error numbers in file\\nAre you sure?", "No", "Yes") == 2)\n\ {\n\ ss = "Slogger::logMsg\\\\(\\\\s*(LGR_\\\\w*)\\\\s*, \\"\\\\|(6.\\\\d\\\\d\\\\d)\\\\|\\""\n\ end = 0\n\ for (pos = search(ss, end, "regex"); pos >= 0; pos = search(ss, end, "regex"))\n\ {\n\ beg = pos\n\ end = $search_end\n\ extract = get_range(beg, end)\n\ key = replace_in_string(extract, ss, "Slogger::logMsg(\\\\1,", "regex")\n\ replace_range(beg, end, key)\n\ }\n\ }\n\ }\n\ Error Numbers>Next:Shift+F12::: {\n\ $errNos[""] = ""\n\ ss = "Slogger::logMsg\\\\(\\\\s*LGR_\\\\w*\\\\s*(,$|,(?!\\\\s*\\"\\\\|))"\n\ front = search(ss, $cursor, "regex", "wrap")\n\ if (front < 0)\n\ {\n\ dialog("No log messages found")\n\ return\n\ }\n\ set_cursor_pos(front)\n\ \n\ paren = search("(", front, "case") + 1\n\ line_start = search("\\n", paren, "case", "backward") + 1\n\ ind = paren - line_start\n\ indent = " "\n\ while (length(indent) < ind)\n\ indent = indent indent\n\ indent = substring(indent, 0, ind)\n\ \n\ pos = $cursor\n\ beg = search("LGR_\\\\w*", pos, "regex", "forward")\n\ end = $search_end\n\ done = 0\n\ no = 0\n\ ins = "?"\n\ if (beg >= 0)\n\ {\n\ levelstr = get_range(beg, end)\n\ \n\ if (!(levelstr in $errNos))\n\ {\n\ if (0) $errNos[""] = ""\n\ else if (levelstr == "LGR_EMERG") $errNos[levelstr] = 60000\n\ else if (levelstr == "LGR_ERR") $errNos[levelstr] = 61000\n\ else if (levelstr == "LGR_WARNING") $errNos[levelstr] = 62000\n\ else if (levelstr == "LGR_INFO") $errNos[levelstr] = 63000\n\ else if (levelstr == "LGR_DEBUG") $errNos[levelstr] = 64000\n\ }\n\ \n\ no = $errNos[levelstr] + 1\n\ $errNos[levelstr] = no\n\ ins = " \\"|"no"|\\""\n\ beg = search("(,$|,(?!\\\\s*\\"\\\\|))", beg, "regex", "forward")\n\ end = $search_end\n\ \n\ if (beg > 0)\n\ {\n\ replace_range(end, end, ins)\n\ beg = end + length(ins)\n\ if (search(".+", beg, "regex") == beg)\n\ {\n\ pos = search("\\\\s+", beg, "regex")\n\ if (pos == beg)\n\ end = $search_end\n\ else\n\ end = beg\n\ \n\ replace_range(beg, end, "\\n" indent)\n\ end = beg + length(indent)\n\ }\n\ else\n\ end = beg\n\ \n\ set_cursor_pos(paren)\n\ goto_matching()\n\ nerap = $cursor\n\ text = get_range(paren, nerap)\n\ reindent = replace_in_string(text, "^\\\\s+", indent, "regex", "copy")\n\ if (text != reindent)\n\ replace_range(paren, nerap, reindent)\n\ set_cursor_pos(paren)\n\ done = 1\n\ }\n\ else\n\ {\n\ $errNos[levelstr] = no - 1\n\ }\n\ }\n\ \n\ if (!done || !no)\n\ dialog("Error trying to insert" ins)\n\ }\n\ Error Numbers>Find Next:F12::: {\n\ old = $cursor\n\ ss = "(?=Slogger::logMsg\\\\(\\\\s*LGR_\\\\w*\\\\s*(,$|,(?!\\\\s*\\"\\\\|)))"\n\ front = search(ss, old, "regex", "wrap")\n\ if (front == old)\n\ front = search(ss, old + 1, "regex", "wrap")\n\ if (front < 0)\n\ {\n\ dialog("No log messages found")\n\ return\n\ }\n\ set_cursor_pos(front)\n\ }\n nedit.bgMenuCommands: \ Go there@grep -n out:::: {\n\ macro_menu_command("Go there@grep -n out")\n\ }\n\ Go there@CC output:::: {\n\ macro_menu_command("Go there@CC output")\n\ }\n\ Go there@Man page output:::: {\n\ macro_menu_command("Go there@Man page output")\n\ }\n\ Undo:::: {\n\ undo()\n\ }\n\ Redo:::: {\n\ redo()\n\ }\n\ Cut:::R: {\n\ cut_clipboard()\n\ }\n\ Copy:::R: {\n\ copy_clipboard()\n\ }\n\ Paste:::: {\n\ paste_clipboard()\n\ }\n\ Back:::: {\n\ macro_menu_command("Move>MultiTag>Back")\n\ }\n\ Push:::: {\n\ macro_menu_command("Move>MultiTag>Push")\n\ }\n\ Find forward@*:::R: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ s = get_selection()\n\ c = $cursor\n\ multitags_push_curpos()\n\ find(s, "forward", "literal")\n\ if ($cursor == c)\n\ multitags_pop_curpos_quiet()\n\ }\n\ Find forward@C@C++:::R: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ s = get_selection()\n\ c = $cursor\n\ multitags_push_curpos()\n\ find(s, "forward", "case")\n\ if ($cursor == c)\n\ multitags_pop_curpos_quiet()\n\ }\n\ Find backward@*:::R: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ s = get_selection()\n\ c = $cursor\n\ multitags_push_curpos()\n\ find(s, "backward", "literal")\n\ if ($cursor == c)\n\ multitags_pop_curpos_quiet()\n\ }\n\ Find backward@C@C++:::R: {\n\ NEDIT_require_macro_file("multitags.nm")\n\ \n\ s = get_selection()\n\ c = $cursor\n\ multitags_push_curpos()\n\ find(s, "backward", "case")\n\ if ($cursor == c)\n\ multitags_pop_curpos_quiet()\n\ }\n\ .../...@SGML HTML@XML:::R: {\n\ macro_menu_command("HTML>directive@SGML HTML@XML")\n\ }\n\ ...?...@SGML HTML@XML:::: {\n\ macro_menu_command("HTML>dialog directive@SGML HTML@XML")\n\ }\n\ -a name-@SGML HTML:::: {\n\ macro_menu_command("HTML>-a name-@SGML HTML")\n\ }\n\ -a href-@SGML HTML:::: {\n\ macro_menu_command("HTML>-a href-@SGML HTML")\n\ }\n\ -tt-@SGML HTML:::: {\n\ macro_menu_command("HTML>-tt-@SGML HTML")\n\ }\n\ -i-@SGML HTML:::: {\n\ macro_menu_command("HTML>-i-@SGML HTML")\n\ }\n\ -b-@SGML HTML:::: {\n\ macro_menu_command("HTML>-b-@SGML HTML")\n\ }\n\ -p-@SGML HTML:::: {\n\ macro_menu_command("HTML>-p-@SGML HTML")\n\ }\n\ -strong-@SGML HTML:::: {\n\ macro_menu_command("HTML>-strong-@SGML HTML")\n\ }\n\ -pre-@SGML HTML:::: {\n\ macro_menu_command("HTML>-pre-@SGML HTML")\n\ }\n\ &entities;@SGML HTML@XML:::: {\n\ macro_menu_command("HTML>&entities;@SGML HTML@XML")\n\ }\n\ Multitag>Find Def@*:::: {\n\ macro_menu_command("Move>MultiTag>Find def@*")\n\ }\n\ Multitag>Find Def@C@C++:::: {\n\ macro_menu_command("Move>MultiTag>Find def@C@C++")\n\ }\n\ Multitag>Find ?@*:::: {\n\ macro_menu_command("Move>MultiTag>Find ?@*")\n\ }\n\ Multitag>Find ?@C@C++:::: {\n\ macro_menu_command("Move>MultiTag>Find ?@C@C++")\n\ }\n\ Multitag>Reload Tags@*:::: {\n\ macro_menu_command("Move>MultiTag>Reload tags@*")\n\ }\n\ Multitag>Reload Tags@C@C++:::: {\n\ macro_menu_command("Move>MultiTag>Reload tags@C@C++")\n\ }\n\ Multitag>Forget Tags:::: {\n\ macro_menu_command("Move>MultiTag>Forget tags")\n\ }\n\ Multitag>File Symbols:::: {\n\ macro_menu_command("Move>MultiTag>File symbols")\n\ }\n\ Multitag>Show tags files:::: {\n\ macro_menu_command("Move>MultiTag>Show tags files")\n\ }\n\ Multitag>Set Stack:::: {\n\ macro_menu_command("Move>MultiTag>Set stack")\n\ }\n\ Multitag>Show Stack:::: {\n\ macro_menu_command("Move>MultiTag>Show stack")\n\ }\n\ Multitag>Empty Stack:::: {\n\ macro_menu_command("Move>MultiTag>Empty stack")\n\ }\n\ Grep>C lines@C@CC output:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ files = "[a-zA-Z]*.[ch] /dev/null"\n\ if ($selection_start != -1 && $selection_left == -1)\n\ greplines(files)\n\ else\n\ greplines_from_prompt(files)\n\ }\n\ Grep>C files@C@CC output:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ files = "[a-zA-Z]*.[ch]"\n\ if ($selection_start != -1 && $selection_left == -1)\n\ grepfiles(files)\n\ else\n\ grepfiles_from_prompt(files)\n\ }\n\ Grep>C++ lines@C++@CC output:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ files = "[a-zA-Z]*.[CcHh]* /dev/null"\n\ if ($selection_start != -1 && $selection_left == -1)\n\ greplines(files)\n\ else\n\ greplines_from_prompt(files)\n\ }\n\ Grep>C++ files@C++@CC output:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ files = "[a-zA-Z]*.[CcHh]*"\n\ if ($selection_start != -1 && $selection_left == -1)\n\ grepfiles(files)\n\ else\n\ grepfiles_from_prompt(files)\n\ }\n\ Grep>all lines:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ files = "* /dev/null"\n\ if ($selection_start != -1 && $selection_left == -1)\n\ greplines(files)\n\ else\n\ greplines_from_prompt(files)\n\ }\n\ Grep>all lines (-R):::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ grepmatch = "*"\n\ \n\ here = $file_path\n\ if (here == "")\n\ here = "."\n\ \n\ str = get_selection("any")\n\ \n\ dir = string_dialog("grep from which directory?" \\\n\ "\\n- " $NEDIT_START_DIR " : start directory" \\\n\ "\\n- " here " : this directory", \\\n\ "OK", "Start Directory +", "This Directory +", "Cancel")\n\ \n\ if ($string_dialog_button == 2)\n\ dir = NEDIT_remove_dotdot($NEDIT_START_DIR dir)\n\ else if ($string_dialog_button == 4 || $string_dialog_button == 0)\n\ return\n\ else if (dir == "" || $string_dialog_button != 1)\n\ dir = NEDIT_remove_dotdot(here dir)\n\ \n\ greplines_from_prompt_r(str, grepmatch, dir)\n\ }\n\ Grep>C/C++ all lines (-R)@C@C++:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ grepmatch = "*.[cChH][+pPxX][+pPxX] *.[cChH] *.inl *.INL"\n\ \n\ greplines_from_prompt_r("", grepmatch)\n\ }\n\ Grep>C/C++ all lines (-R) from ?@C@C++:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ str = get_selection("any")\n\ grepmatch = "*.[cChH][+pPxX][+pPxX] *.[cChH] *.inl *.INL"\n\ \n\ here = $file_path\n\ if (here == "")\n\ here = "."\n\ \n\ dir = string_dialog("grep from which directory?" \\\n\ "\\n- " $NEDIT_START_DIR " : start directory" \\\n\ "\\n- " here " : this directory", \\\n\ "OK", "Start Directory +", "This Directory +", "Cancel")\n\ \n\ if ($string_dialog_button == 2)\n\ dir = NEDIT_remove_dotdot($NEDIT_START_DIR dir)\n\ else if ($string_dialog_button == 4 || $string_dialog_button == 0)\n\ return\n\ else if (dir == "" || $string_dialog_button != 1)\n\ dir = NEDIT_remove_dotdot(here dir)\n\ \n\ greplines_from_prompt_r(str, grepmatch, dir)\n\ }\n\ Grep>all files:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ files = "*"\n\ if ($selection_start != -1 && $selection_left == -1)\n\ grepfiles(files)\n\ else\n\ grepfiles_from_prompt(files)\n\ }\n\ Grep>all lines (-R)@C@C++:::: {\n\ NEDIT_require_macro_file("grepfiles.nm")\n\ \n\ greplines_from_prompt_r("*.[ch]pp *.[CH]PP *.[ch]++ *.CC *.[chCH]")\n\ }\n\ Macros>Show Loaded@NEdit Macro:::: {\n\ NEDIT_show_macro_files()\n\ }\n\ Macros>Reload Selected@NEdit Macro:::: {\n\ macro_menu_command("Various>Macro>Reload file")\n\ }\n\ Macros>Reload All@NEdit Macro:::: {\n\ macro_menu_command("Various>Macro>Reload all")\n\ }\n\ Macros>Reload this file@NEdit Macro:::: {\n\ macro_menu_command("Various>Macro>Reload this file@NEdit Macro")\n\ }\n\ Menu>Toggle:::: {\n\ show_menu()\n\ }\n\ Menu>On:::: {\n\ show_menu("on")\n\ }\n\ Menu>Off:::: {\n\ show_menu("off")\n\ }\n\ Find all:::: {\n\ macro_menu_command("Rangesets>Find>All in \\"Find All\\" (green)")\n\ }\n\ Mark with range:::R: {\n\ macro_menu_command("Rangesets>Mark with range")\n\ }\n\ Rangeset>Find range:::: {\n\ macro_menu_command("Rangesets>Go to range")\n\ }\n\ Rangeset>Selection>RS + selection:::R: {\n\ macro_menu_command("Rangesets>Mark with range")\n\ }\n\ Rangeset>Selection>RS - selection:::R: {\n\ macro_menu_command("Rangesets>Remove>From set")\n\ }\n\ Rangeset>Selection>Remove from all sets:::R: {\n\ macro_menu_command("Rangesets>Remove>From all sets")\n\ }\n\ Rangeset>RS1 = RS1 + RS2:::: {\n\ macro_menu_command("Rangesets>RS1 =>RS1 + RS2")\n\ }\n\ Rangeset>RS1 = RS1 - RS2:::: {\n\ macro_menu_command("Rangesets>RS1 =>RS1 - RS2")\n\ }\n\ Rangeset>Color Set:::: {\n\ macro_menu_command("Rangesets>Color>Quick")\n\ }\n\ Rangeset>Forget Set:::: {\n\ macro_menu_command("Rangesets>Forget>Set")\n\ }\n\ Make C++ method@C++:::: {\n\ macro_menu_command("Development>Make C++ Method in class.cpp file@C++")\n\ }\n nedit.highlightPatterns: Ada:Default\n\ Awk:Default\n\ C++:1:0{\n\ comment:"/\\*":"\\*/"::Comment::\n\ comment work:"(?:TODO|(?:YOU ARE HERE))(?:(?!\\s*\\*/).)*":::Comment Work:comment:\n\ cplus comment:"//":"(?":"$"::Preprocessor::\n\ string escape chars:"\\\\(?:[0-7]{1,3}|x[0-9a-fA-F]+|['""?\\\\abfnrtv]|\\n)":::String1:string:\n\ preprocessor esc chars:"\\\\(?:[0-7]{1,3}|x[0-9a-fA-F]+|['""?\\\\abfnrtv]|\\n)":::Preprocessor1:preprocessor line:\n\ preprocessor comment:"/\\*":"\\*/"::Comment:preprocessor line:\n\ preproc cplus comment:"//":"$"::Comment:preprocessor line:\n\ preprocessor keywords:"<__(?:(?:LINE|FILE|DATE|TIME|STDC)__)|cplusplus>":::Preprocessor2::\n\ character constant:"L?'":"'":"[^\\\\][^']":Character Const::\n\ character escape chars:"\\\\(?:[0-7]{1,3}|x[0-9a-fA-F]+|['""?\\\\abfnrtv]|\\n)":::String1:character constant:\n\ numeric constant:"<(?i(?:0x[\\da-fA-F]+|0[0-7]*|[1-9]\\d*)(?:l|u|lu|ul)|(?:(?:\\d*\\.\\d+|\\d+\\.)(?:e[-+]?\\d+)?[lf]?))(?=\\W|$)":::Numeric Const::D\n\ storage keyword:"<(?:class|typename|template|friend|virtual|inline|explicit|operator|public|private|protected|const|extern|auto|register|static|mutable|unsigned|signed|volatile|char|double|float|int|long|short|bool|wchar_t|void|typedef|struct|union|enum|export)>":::Storage Type::D\n\ extension keyword:"<(?:typeid|asm)>":::Flag::D\n\ keyword:"<(?:new|delete|this|return|goto|if|else|case|default|switch|break|continue|while|do|for|try|catch|throw|sizeof|true|false|namespace|using|dynamic_cast|static_cast|reinterpret_cast|const_cast)>":::Keyword::D\n\ operator keyword:"<(?:and|bitand|and_eq|or|bitor|or_eq|xor|xor_eq|not|not_eq|compl)>":::Operator::D\n\ braces:"([{}]|\\<%|%\\>)":::Bracket::D\n\ semicolon:";":::Bracket::D\n\ operators:"(=|:|\\?|==|!=|\\<|\\<=|\\>|\\>=|-|-\\>|\\.|\\+|\\+\\+|-|--|\\*|/|%|\\&|\\&\\&|\\||\\|\\||^|!|~)":::Operator::D\n\ brackets:"([][]|\\<:|:\\>)":::Bracket::D\n\ parens:"[()]":::Bracket::D\n\ assert:"":::Text Key::D\n\ }\n\ C:1:0{\n\ comment:"/\\*":"\\*/"::Comment::\n\ comment work:"(?:TODO|(?:YOU ARE HERE))(?:(?!\\s*\\*/).)*":::Comment:comment:\n\ C++ line comment:"//":"$"::Comment line::\n\ Fold comment:"(\\f)\\[\\[\\[(([^\\f]*)\\|\\|\\|)?":"\\]\\]\\]\\f[^\\f]*$"::Dark::\n\ Fold Name:"\\3":""::Fold Comment:Fold comment:C\n\ Fold Start:"\\1":""::Flag:Fold comment:C\n\ string:"L?""":"""":"\\n":String::\n\ preprocessor line:"^\\s*#\\s*(?:include|define|if|ifn?def|line|error|else|endif|elif|undef|pragma)>":"$"::Preprocessor::\n\ string escape chars:"\\\\(?:[0-7]{1,3}|x[0-9a-fA-F]+|['""?\\\\abfnrtv]|\\n)":::String1:string:\n\ preprocessor esc chars:"\\\\(?:[0-7]{1,3}|x[0-9a-fA-F]+|['""?\\\\abfnrtv]|\\n)":::Preprocessor1:preprocessor line:\n\ preprocessor comment:"/\\*":"\\*/"::Comment:preprocessor line:\n\ preprocessor keywords:"<__(?:LINE|FILE|DATE|TIME|STDC)__>":::Preprocessor::\n\ character constant:"L?'":"'":"[^\\\\][^']":Character Const::\n\ numeric constant:"<(?i(?:0x[\\da-fA-F]+|0[0-7]*|[1-9]\\d*)(?:l|u|lu|ul)|(?:(?:\\d*\\.\\d+|\\d+\\.)(?:e[-+]?\\d+)?[lf]?))(?=\\W|$)":::Numeric Const::D\n\ storage keyword:"<(?:const|extern|auto|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum)>":::Storage Type::D\n\ extension keyword:"<(?:class|public|protected|private|typename)>":::Label::D\n\ keyword:"<(?:return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof)>":::Keyword::D\n\ braces:"[{}]":::Bracket::D\n\ operators:"(=|:|\\?|==|!=|\\<|\\<=|\\>|\\>=|-|-\\>|\\.|\\+|\\+\\+|-|--|\\*|/|%|\\&|\\&\\&|\\||\\|\\||^|!|~)":::Operator::D\n\ parens:"[)(]":::Operator::\n\ brackets:"[][]":::Bracket::\n\ }\n\ CSS:Default\n\ Csh:Default\n\ Fortran:Default\n\ Java:Default\n\ JavaScript:Default\n\ LaTeX:Default\n\ Lex:Default\n\ Makefile:Default\n\ Matlab:Default\n\ NEdit Macro:2:0{\n\ README:"NEdit Macro syntax highlighting patterns, version 2.6, maintainer Thorsten Haude, nedit at thorstenhau.de":::Flag::D\n\ Comment:"#":"$"::Comment::\n\ Built-in Misc Vars:"(?":::Identifier::\n\ Built-in Pref Vars:"(?":::Identifier2::\n\ Built-in Special Vars:"(?":::String1::\n\ Built-in Subrs:"<(?:append_file|beep|calltip|clipboard_to_string|dialog|focus_window|get_character|get_pattern_(by_name|at_pos)|get_range|get_selection|get_style_(by_name|at_pos)|getenv|kill_calltip|length|list_dialog|max|min|rangeset_(?:add|create|destroy|get_by_name|includes|info|invert|range|set_color|set_mode|set_name|subtract)|read_file|replace_in_string|replace_range|replace_selection|replace_substring|search|search_string|select|select_rectangle|set_cursor_pos|set_language_mode|set_locked|shell_command|split|string_compare|string_dialog|string_to_clipboard|substring|t_print|tolower|toupper|valid_number|write_file)>":::Subroutine::\n\ Menu Actions:"<(?:new|open|open-dialog|open_dialog|open-selected|open_selected|close|save|save-as|save_as|save-as-dialog|save_as_dialog|revert-to-saved|revert_to_saved|revert_to_saved_dialog|include-file|include_file|include-file-dialog|include_file_dialog|load-macro-file|load_macro_file|load-macro-file-dialog|load_macro_file_dialog|load-tags-file|load_tags_file|load-tags-file-dialog|load_tags_file_dialog|unload_tags_file|load_tips_file|load_tips_file_dialog|unload_tips_file|print|print-selection|print_selection|exit|undo|redo|delete|select-all|select_all|shift-left|shift_left|shift-left-by-tab|shift_left_by_tab|shift-right|shift_right|shift-right-by-tab|shift_right_by_tab|find|find-dialog|find_dialog|find-again|find_again|find-selection|find_selection|find_incremental|start_incremental_find|replace|replace-dialog|replace_dialog|replace-all|replace_all|replace-in-selection|replace_in_selection|replace-again|replace_again|replace_find|replace_find_same|replace_find_again|goto-line-number|goto_line_number|goto-line-number-dialog|goto_line_number_dialog|goto-selected|goto_selected|mark|mark-dialog|mark_dialog|goto-mark|goto_mark|goto-mark-dialog|goto_mark_dialog|match|select_to_matching|goto_matching|find-definition|find_definition|show_tip|split-window|split_window|close-pane|close_pane|uppercase|lowercase|fill-paragraph|fill_paragraph|control-code-dialog|control_code_dialog|filter-selection-dialog|filter_selection_dialog|filter-selection|filter_selection|execute-command|execute_command|execute-command-dialog|execute_command_dialog|execute-command-line|execute_command_line|shell-menu-command|shell_menu_command|macro-menu-command|macro_menu_command|bg_menu_command|post_window_bg_menu|beginning-of-selection|beginning_of_selection|end-of-selection|end_of_selection|repeat_macro|repeat_dialog|raise_window|focus_pane|set_statistics_line|set_incremental_search_line|set_show_line_numbers|set_auto_indent|set_wrap_text|set_wrap_margin|set_highlight_syntax|set_make_backup_copy|set_incremental_backup|set_show_matching|set_match_syntax_based|set_overtype_mode|set_locked|set_tab_dist|set_em_tab_dist|set_use_tabs|set_fonts|set_language_mode)(?=\\s*\\()":::Subroutine::\n\ Text Actions:"<(?:self-insert|self_insert|grab-focus|grab_focus|extend-adjust|extend_adjust|extend-start|extend_start|extend-end|extend_end|secondary-adjust|secondary_adjust|secondary-or-drag-adjust|secondary_or_drag_adjust|secondary-start|secondary_start|secondary-or-drag-start|secondary_or_drag_start|process-bdrag|process_bdrag|move-destination|move_destination|move-to|move_to|move-to-or-end-drag|move_to_or_end_drag|end_drag|copy-to|copy_to|copy-to-or-end-drag|copy_to_or_end_drag|exchange|process-cancel|process_cancel|paste-clipboard|paste_clipboard|copy-clipboard|copy_clipboard|cut-clipboard|cut_clipboard|copy-primary|copy_primary|cut-primary|cut_primary|newline|newline-and-indent|newline_and_indent|newline-no-indent|newline_no_indent|delete-selection|delete_selection|delete-previous-character|delete_previous_character|delete-next-character|delete_next_character|delete-previous-word|delete_previous_word|delete-next-word|delete_next_word|delete-to-start-of-line|delete_to_start_of_line|delete-to-end-of-line|delete_to_end_of_line|forward-character|forward_character|backward-character|backward_character|key-select|key_select|process-up|process_up|process-down|process_down|process-shift-up|process_shift_up|process-shift-down|process_shift_down|process-home|process_home|forward-word|forward_word|backward-word|backward_word|forward-paragraph|forward_paragraph|backward-paragraph|backward_paragraph|beginning-of-line|beginning_of_line|end-of-line|end_of_line|beginning-of-file|beginning_of_file|end-of-file|end_of_file|next-page|next_page|previous-page|previous_page|page-left|page_left|page-right|page_right|toggle-overstrike|toggle_overstrike|scroll-up|scroll_up|scroll-down|scroll_down|scroll_left|scroll_right|scroll-to-line|scroll_to_line|select-all|select_all|deselect-all|deselect_all|focusIn|focusOut|process-return|process_return|process-tab|process_tab|insert-string|insert_string|mouse_pan)>":::Subroutine::\n\ Keyword:"<(?:break|continue|define|delete|else|for|if|in|return|while)>":::Keyword::\n\ Braces:"[{}]":::Bracket::D\n\ ParensBrackets:"[\\[\\]()]":::Bracket::D\n\ Global Variable:"\\$[A-Za-z0-9_]+":::Identifier1::\n\ String:"""":"""":"\\n":String::\n\ String Escape Char:"\\\\(?:0[0-3][0-7]{1,2}|0[0-7]{1,2}|[xX][0-9a-fA-F]{1,2}|['""?\\\\abefnrtv]|\\n)":::String1:String:\n\ String Escape Undefined:"\\\\.":::Flag:String:\n\ Numeric Const:"(?":::Numeric Const::\n\ Macro Definition:"(?<=define)\\s+\\w+":::Subroutine1::\n\ Custom Macro:"\\w+(?=\\s*(?:\\\\\\n)?\\s*[\\(])":::Subroutine1::\n\ Variables:"\\w+":::Identifier1::D\n\ Operator:"(=|==|!=|\\<|\\<=|\\>|\\>=|-|\\+|\\+\\+|-|--|\\*|/|%|\\&|\\&\\&|\\||\\|\\||^|!|~)":::Operator::D\n\ Comma:",":::Bracket::D\n\ SemiColon:";":::Bracket::D\n\ Continuation:"\\\\$":::Operator::D\n\ Spaces:"\\s":::Plain::D\n\ Unknown:".":::Flag::D\n\ }\n\ NEdit Macro RE:2:0{\n\ README:"NEdit Macro syntax highlighting patterns, version 2.6, maintainer Thorsten Haude, nedit at thorstenhau.de":::Flag::D\n\ Comment:"#":"$"::Comment::\n\ Built-in Misc Vars:"(?":::Identifier::\n\ Built-in Pref Vars:"(?":::Identifier2::\n\ Built-in Special Vars:"(?":::String1::\n\ Built-in Subrs:"<(?:append_file|beep|calltip|clipboard_to_string|dialog|focus_window|get_character|get_pattern_(by_name|at_pos)|get_range|get_selection|get_style_(by_name|at_pos)|getenv|kill_calltip|length|list_dialog|max|min|rangeset_(?:add|create|destroy|get_by_name|includes|info|invert|range|set_color|set_mode|set_name|subtract)|read_file|replace_in_string|replace_range|replace_selection|replace_substring|search|search_string|select|select_rectangle|set_cursor_pos|set_language_mode|set_locked|shell_command|split|string_compare|string_dialog|string_to_clipboard|substring|t_print|tolower|toupper|valid_number|write_file)>":::Subroutine::\n\ Menu Actions:"<(?:new|open|open-dialog|open_dialog|open-selected|open_selected|close|save|save-as|save_as|save-as-dialog|save_as_dialog|revert-to-saved|revert_to_saved|revert_to_saved_dialog|include-file|include_file|include-file-dialog|include_file_dialog|load-macro-file|load_macro_file|load-macro-file-dialog|load_macro_file_dialog|load-tags-file|load_tags_file|load-tags-file-dialog|load_tags_file_dialog|unload_tags_file|load_tips_file|load_tips_file_dialog|unload_tips_file|print|print-selection|print_selection|exit|undo|redo|delete|select-all|select_all|shift-left|shift_left|shift-left-by-tab|shift_left_by_tab|shift-right|shift_right|shift-right-by-tab|shift_right_by_tab|find|find-dialog|find_dialog|find-again|find_again|find-selection|find_selection|find_incremental|start_incremental_find|replace|replace-dialog|replace_dialog|replace-all|replace_all|replace-in-selection|replace_in_selection|replace-again|replace_again|replace_find|replace_find_same|replace_find_again|goto-line-number|goto_line_number|goto-line-number-dialog|goto_line_number_dialog|goto-selected|goto_selected|mark|mark-dialog|mark_dialog|goto-mark|goto_mark|goto-mark-dialog|goto_mark_dialog|match|select_to_matching|goto_matching|find-definition|find_definition|show_tip|split-window|split_window|close-pane|close_pane|uppercase|lowercase|fill-paragraph|fill_paragraph|control-code-dialog|control_code_dialog|filter-selection-dialog|filter_selection_dialog|filter-selection|filter_selection|execute-command|execute_command|execute-command-dialog|execute_command_dialog|execute-command-line|execute_command_line|shell-menu-command|shell_menu_command|macro-menu-command|macro_menu_command|bg_menu_command|post_window_bg_menu|beginning-of-selection|beginning_of_selection|end-of-selection|end_of_selection|repeat_macro|repeat_dialog|raise_window|focus_pane|set_statistics_line|set_incremental_search_line|set_show_line_numbers|set_auto_indent|set_wrap_text|set_wrap_margin|set_highlight_syntax|set_make_backup_copy|set_incremental_backup|set_show_matching|set_match_syntax_based|set_overtype_mode|set_locked|set_tab_dist|set_em_tab_dist|set_use_tabs|set_fonts|set_language_mode)(?=\\s*\\()":::Subroutine::\n\ Text Actions:"<(?:self-insert|self_insert|grab-focus|grab_focus|extend-adjust|extend_adjust|extend-start|extend_start|extend-end|extend_end|secondary-adjust|secondary_adjust|secondary-or-drag-adjust|secondary_or_drag_adjust|secondary-start|secondary_start|secondary-or-drag-start|secondary_or_drag_start|process-bdrag|process_bdrag|move-destination|move_destination|move-to|move_to|move-to-or-end-drag|move_to_or_end_drag|end_drag|copy-to|copy_to|copy-to-or-end-drag|copy_to_or_end_drag|exchange|process-cancel|process_cancel|paste-clipboard|paste_clipboard|copy-clipboard|copy_clipboard|cut-clipboard|cut_clipboard|copy-primary|copy_primary|cut-primary|cut_primary|newline|newline-and-indent|newline_and_indent|newline-no-indent|newline_no_indent|delete-selection|delete_selection|delete-previous-character|delete_previous_character|delete-next-character|delete_next_character|delete-previous-word|delete_previous_word|delete-next-word|delete_next_word|delete-to-start-of-line|delete_to_start_of_line|delete-to-end-of-line|delete_to_end_of_line|forward-character|forward_character|backward-character|backward_character|key-select|key_select|process-up|process_up|process-down|process_down|process-shift-up|process_shift_up|process-shift-down|process_shift_down|process-home|process_home|forward-word|forward_word|backward-word|backward_word|forward-paragraph|forward_paragraph|backward-paragraph|backward_paragraph|beginning-of-line|beginning_of_line|end-of-line|end_of_line|beginning-of-file|beginning_of_file|end-of-file|end_of_file|next-page|next_page|previous-page|previous_page|page-left|page_left|page-right|page_right|toggle-overstrike|toggle_overstrike|scroll-up|scroll_up|scroll-down|scroll_down|scroll_left|scroll_right|scroll-to-line|scroll_to_line|select-all|select_all|deselect-all|deselect_all|focusIn|focusOut|process-return|process_return|process-tab|process_tab|insert-string|insert_string|mouse_pan)>":::Subroutine::\n\ Keyword:"<(?:break|continue|define|delete|else|for|if|in|return|while)>":::Keyword::\n\ Braces:"[{}\\[\\]]":::Keyword::\n\ Global Variable:"\\$[A-Za-z0-9_]+":::Identifier1::\n\ String:"""":"""":"\\n":Text Arg::\n\ Regex Escaped Operator:"(\\\\\\\\)(?:[][()<>{}.|^$*+?&-]|\\\\\\\\)":::String:String:\n\ Regex Escaped Backslash:"\\1":""::String1:Regex Escaped Operator:C\n\ Regex Character Groups:"\\\\\\\\[&1-9uUlLdDsSwWyY]":::Ada Attributes:String:\n\ Regex Parens:"\\(\\?[:=!IiNn]|\\(\\?\\<[=!]|[()]":::Pointer:String:\n\ Regex Bracket Group:"\\[\\^?":"(?+*?{}|.^]":::Text Arg:String:\n\ String Escape Char:"\\\\(?:0[0-3][0-7]{1,2}|0[0-7]{1,2}|[xX][0-9a-fA-F]{1,2}|['""?\\\\abefnrtv]|\\n)":::String1:String:\n\ String Escape Undefined:"\\\\.":::Flag:String:\n\ String Normal:".":::String:String:\n\ Numeric Const:"(?":::Numeric Const::\n\ Macro Definition:"(?<=define)\\s+\\w+":::Subroutine1::\n\ Custom Macro:"\\w+(?=\\s*(?:\\\\\\n)?\\s*[\\(])":::Subroutine1::\n\ Variables:"\\w+":::Identifier1::D\n\ }\n\ Pascal:Default\n\ Perl:Default\n\ PostScript:Default\n\ Python:Default\n\ Regex:1:0{\n\ Comments:"(?#This is a comment!)(?n\\(\\?#[^)]*(?:\\)|$))":::Comment::\n\ Special Escape:"(?#Special chars with that need escapes)\\\\[abefnrtv]":::String2::\n\ Shortcut Char Class Escapes:"(?#Shortcuts for common char classes)\\\\[dDlLsSwW]":::Storage Type::\n\ Word Delimiter:"(?#Special token to match NEdit [non]word-delimiters)\\\\[yY]":::Storage Type::\n\ Required Escape:"(?#metacharacters that require escapes)\\\\[-\\[\\]()<>{}.|^$*+?&\\\\]":::String1::\n\ Backreferences:"(?#Internal regex backreferences)\\\\[1-9]":::String2::\n\ Numeric Escape:"(?#Negative lookahead is to exclude \\x0 and \\00)\\\\(?i(?![x0]0(?:[^\\da-f]|$))(?:x0?[1-9a-f][\\da-f]?|0[1-3]?[0-7]?[0-7]))":::String1::\n\ Literal Escape:"(?#non-special escapes - flag as errors: they don't need escaping)\\\\.":::Flag::\n\ Parens and Alternation:"\\((?:\\?:|\\?=|\\?!|\\?\\<=|\\?\\{}.|^$*+?&\\\\]|[xX0][\\da-fA-F]+)|[^\\\\\\]])(?:-(?:\\\\(?:[abdeflnrstvwDLSW\\-()\\[\\]<>{}.|^$*+?&\\\\]|[xX0][\\da-fA-F]+)|[^\\\\\\]]))?)*\\-?]":::Preprocessor1::\n\ Anchors:"(?#\\B is the ""not a word boundary"" anchor)[$^<>]|\\\\B":::Regex::\n\ Match Themselves:"(?#Highlight chars left over which just match themselves).":::String::D\n\ }\n\ SGML HTML:Default\n\ SQL:Default\n\ Sh Ksh Bash:1:0{\n\ escaped special characters:"\\\\[\\\\""$`']":::Keyword::\n\ single quoted string:"'":"'"::String1::\n\ double quoted string:"""":""""::String::\n\ double quoted escape:"\\\\[\\\\""$`]":::String2:double quoted string:\n\ inline stream:"\\<\\<-?\\s*(<[\\w]+>)\\s*\\n((.*\\n)*?)\\s*(\\1)\\s*$":::Text Key::\n\ dq command sub:"`":"`":"""":Subroutine:double quoted string:\n\ dq arithmetic expansion:"\\$\\(\\(":"\\)\\)":"""":String:double quoted string:\n\ dq new command sub:"\\$\\(":"\\)":"""":Subroutine:double quoted string:\n\ dq variables:"\\$([-*@#?$!0-9]|[a-zA-Z_][0-9a-zA-Z_]*)":::Identifier1:double quoted string:\n\ dq variables2:"\\$\\{":"}":"\\n":Identifier1:double quoted string:\n\ arithmetic expansion:"\\$\\(\\(":"\\)\\)"::String::\n\ ae escapes:"\\\\[\\\\$`""']":::String2:arithmetic expansion:\n\ ae single quoted string:"'":"'":"\\)\\)":String1:arithmetic expansion:\n\ ae command sub:"`":"`":"\\)\\)":Subroutine:arithmetic expansion:\n\ ae arithmetic expansion:"\\$\\(\\(":"\\)\\)"::String:arithmetic expansion:\n\ ae new command sub:"\\$\\(":"\\)":"\\)\\)":Subroutine:arithmetic expansion:\n\ ae variables:"\\$([-*@#?$!0-9]|[a-zA-Z_][0-9a-zA-Z_]*)":::Identifier1:arithmetic expansion:\n\ ae variables2:"\\$\\{":"}":"\\)\\)":Identifier1:arithmetic expansion:\n\ comments:"^[ \\t]*#":"$"::Comment::\n\ command substitution:"`":"`"::Subroutine::\n\ cs escapes:"\\\\[\\\\$`""']":::Subroutine1:command substitution:\n\ cs single quoted string:"'":"'":"`":String1:command substitution:\n\ cs variables:"\\$([-*@#?$!0-9]|[a-zA-Z_][0-9a-zA-Z_]*)":::Identifier1:command substitution:\n\ cs variables2:"\\$\\{":"}":"`":Identifier1:command substitution:\n\ new command substitution:"\\$\\(":"\\)"::Subroutine::\n\ ncs escapes:"\\\\[\\\\$`""']":::Subroutine1:new command substitution:\n\ ncs single quoted string:"'":"'"::String1:new command substitution:\n\ ncs variables:"\\$([-*@#?$!0-9]|[a-zA-Z_][0-9a-zA-Z_]*)":::Identifier1:new command substitution:\n\ ncs variables2:"\\$\\{":"}":"\\)":Identifier1:new command substitution:\n\ assignment:"[a-zA-Z_][0-9a-zA-Z_]*=":::Identifier1::\n\ variables:"\\$([-*@#?$!0-9_]|[a-zA-Z_][0-9a-zA-Z_]*)":::Identifier1::\n\ variables2:"\\$\\{":"}"::Identifier1::\n\ internal var:"\\$\\{":"}"::Identifier1:variables2:\n\ comments in line:"#":"$"::Comment::\n\ numbers:"<(?i0x[\\da-f]+)|((\\d*\\.)?\\d+([eE][-+]?\\d+)?(?iul?|l|f)?)>":::Numeric Const::D\n\ keywords:"<(if|fi|then|else|elif|case|esac|while|for|do|done|in|select|time|until|function|\\[\\[|]])>[\\s\\n]":::Keyword::D\n\ command options:"[ \\t]-[^ \\t{}[\\],()'""~!@#$%^&*|\\\\<>?]+":::Identifier::\n\ delimiters:"[{};<>&~=!|^%[\\]+*|]":::Text Key::D\n\ built ins:"<(:|\\.|source|alias|bg|bind|break|builtin|cd|chdir|command|compgen|complete|continue|declare|dirs|disown|echo|enable|eval|exec|exit|export|fc|fg|getopts|hash|help|history|jobs|kill|let|local|logout|popd|print|printf|pushd|pwd|read|readonly|return|set|shift|shopt|stop|suspend|test|times|trap|type|typeset|ulimit|umask|unalias|unset|wait|whence)>[\\s\\n;]":::Subroutine1::D\n\ is start marker:"\\1":""::Marker:inline stream:C\n\ is end marker:"\\4":""::Marker:inline stream:C\n\ is content:"\\2":""::Inline Text:inline stream:C\n\ }\n\ Tcl:Default\n\ VHDL:Default\n\ Verilog:Default\n\ XML:1:0{\n\ comment:"\\