! Import this file with: ! ! nedit -import ! ! Some features: ! ! - Recognizes ruby files named with *.rb, *.rd, rakefile. ! ! - Recognizes #!...ruby. ! ! - F12 to run current ruby file or selection. (SHIFT-F12 for -w option.) ! ! - F11 to invoke ri on selection. ! ! - F10 to pass this file to rd2html. ! ! - Macros to help with rd2 markup. ! ! - Comment/Uncomment macros work with or without selection (without ! selection, affects current line). ! nedit.shellCommands: \ ruby@Ruby:F12::ED:\n\ env RUBY_CALLER=nedit ruby\n\ ruby -w@Ruby:Shift+F12::ED:\n\ env RUBY_CALLER=nedit ruby -w\n\ ri@Ruby:F11::ID:\n\ read name; ri $name\n\ rd2html@Ruby:F10::AD:\n\ rd2 >%.html\n nedit.macroCommands: \ Comment@Ruby:Alt+3::: {\n\ if ($selection_start == -1) {\n\ cur = $cursor\n\ beginning_of_line()\n\ select($cursor, $cursor + 1)\n\ replace_in_selection("^", "#", "regex")\n\ set_cursor_pos(cur)\n\ select(-1,-1)\n\ # replace_all("^", "#", "regex")\n\ }\n\ else\n\ replace_in_selection("^", "#", "regex")\n\ }\n\ Uncomment@Ruby:Shift+Alt+3::: {\n\ if ($selection_start == -1) {\n\ cur = $cursor\n\ beginning_of_line()\n\ select($cursor, $cursor + 1)\n\ replace_in_selection("^#", "", "regex")\n\ set_cursor_pos(cur)\n\ select(-1,-1)\n\ # replace_all("^#", "", "regex")\n\ }\n\ else\n\ replace_in_selection("^#", "", "regex")\n\ }\n\ interpolate@Ruby:Ctrl+3::R: {\n\ replace_selection("#{" get_selection() "}")\n\ }\n\ RubyDoc>code@Ruby@Documentation:Shift+Alt+Bracketleft::R: {\n\ replace_selection("(({" get_selection() "}))")\n\ }\n\ RubyDoc>emphasis@Ruby@Documentation:Shift+Alt+8::R: {\n\ replace_selection("((*" get_selection() "*))")\n\ }\n\ RubyDoc>variable@Ruby@Documentation:Shift+Alt+Backslash::R: {\n\ replace_selection("((|" get_selection() "|))")\n\ }\n\ RubyDoc>input@Ruby@Documentation:Shift+Alt+5::R: {\n\ replace_selection("((%" get_selection() "%))")\n\ }\n\ RubyDoc>index term@Ruby@Documentation:Shift+Alt+Semicolon::R: {\n\ replace_selection("((:" get_selection() ":))")\n\ }\n\ RubyDoc>reference@Ruby@Documentation:Shift+Alt+Comma::R: {\n\ replace_selection("((<" get_selection() ">))")\n\ }\n\ RubyDoc>footnote@Ruby@Documentation:Alt+Minus::R: {\n\ replace_selection("((-" get_selection() "-))")\n\ }\n\ RubyDoc>verbatim@Ruby@Documentation:Alt+Apostrophe::R: {\n\ replace_selection("(('" get_selection() "'))")\n\ }\n\ language modes>ruby:Ctrl+Alt+R::: {\n\ set_language_mode("Ruby")\n\ }\n nedit.highlightPatterns: Ruby:2:0{\n\ embedded documentation:"^=begin":"^=end"::Comment::\n\ embedded header:"^={1,3}":"$"::Header Comment:embedded documentation:\n\ embedded method:"^---":"$"::Text Arg2:embedded documentation:\n\ embedded code:"\\n\\n ":"\\n\\n(?=.)"::Plain:embedded documentation:\n\ embedded markup:"\\(\\(.*?\\)\\)":::String:embedded documentation:\n\ here doc:"\\<\\<-?([""'`]?)[\\l_]\\w*\\1.*\\<\\<([""'`]?)([\\l_]\\w*)\\2.*((?:\\n.*)*?)\\n\\3>":::String2::\n\ here doc indented:"\\<\\<-?([""'`]?)[\\l_]\\w*\\1.*\\<\\<-([""'`]?)([\\l_]\\w*)\\2.*((?:\\n.*)*?)\\n\\s*\\3>":::String2::\n\ here doc content:"\\4":""::String:here doc:C\n\ here doc indented content:"\\4":""::String:here doc indented:C\n\ urgent comment:"###":"$"::Urgent Comment::\n\ hilite comment:"##":"$"::Hilite Comment::\n\ header comment:"#[-=_]":"$"::Header Comment::\n\ comment:"#(?:$|[^{])":"$"::Comment::\n\ dq string:"""":""""::String::\n\ dq string delims:"&":"&"::Keyword:dq string:C\n\ dq string esc chars:"\\\\([nrtfbaeulULQE""\\\\]|0[0-7]+|x[0-9a-fA-F]+|cC)":::String2:dq string:\n\ dq string expr:"#\\{":"\\}"::String2:dq string:\n\ sq string:"'":"'"::String::\n\ sq string delims:"&":"&"::Keyword:sq string:C\n\ sq string esc chars:"\\\\(\\\\|')":::String2:sq string:\n\ bq string:"`":"`"::String::\n\ bq string delims:"&":"&"::Keyword:bq string:C\n\ regexp:"(/)(?:\\\\/|[^/])*(/[imox]*)":::String::\n\ regexp match:"\\1\\2":""::Keyword:regexp:C\n\ def method:"()\\s+(?:[A-Za-z_]\\w*[!?=]?(?=[\\s\\n(;]))?":::Text Arg2::\n\ def:"\\1":""::Keyword:def method:C\n\ keyword:"(?:^|[^@:.])<(alias|and|begin|break|case|class|(?# )defined\\?|do|else|elsif|end|ensure|extend|false|for|if|(?# )in|include|lambda|module|next|nil|not|or|private|proc|(?# )protected|public|raise|redo|retry|require|rescue|return|(?# )self|super|then|true|undef|unless|until|when|while|yield)>(?![\\?!])":::Plain::\n\ keyword body:"\\1":""::Keyword:keyword:C\n\ symbol:"(?:^|[^:])(:(?:\\$.|\\$\\-.|(@|\\$)?[\\l_]\\w*[?!=]?|\\.\\.|\\||\\^|(?# )\\&|\\<=\\>|==|===|=~|\\>|\\>=|\\<|\\<=|\\+|\\-|\\*|/|%|\\*\\*|(?# )\\<\\<|\\>\\>|~|\\+@|\\-@|\\[\\]|\\[\\]=))":::Plain::\n\ symbol body:"\\1":""::Identifier:symbol:C\n\ assignment:"(\\+=|\\-=|\\*=|/=|%=|\\*\\*=|\\&=|\\|=|\\^=|(?# )\\<\\<=|\\>\\>=|\\&\\&=|\\|\\|=)":::Keyword::\n\ operator:"(\\.\\.\\.|\\.\\.|\\||\\^|\\&|\\<=\\>|==|===|=~|\\>|\\>=|\\<|::| \\? | : (?# )\\<=|\\+|\\-|\\*|/|%|\\*\\*|\\<\\<|\\>\\>|~|\\+@|\\-@|(?# )\\[\\]|\\[\\]=)":::Keyword::\n\ global:"\\$(\\-?.>|[\\l_]\\w*|.)":::Storage Type::\n\ constant:"<[A-Z][A-Za-z0-9$_]*>":::Text Arg::\n\ method:"\\.[\\n\\s]*[a-z_][A-Za-z0-9$_]*[?!]?>":::Text Arg2::\n\ method with parens:"[a-z_][A-Za-z0-9$_]*[?!]?(?=\\()":::Text Arg2::\n\ attribute:"@\\w+":::Attribute::\n\ class attribute:"@@\\w+":::Class Attribute::\n\ __END__:"^__END__$":"(?n.*)"::String2::\n\ char literal:" \\?[^ ]":::Storage Type::\n\ } nedit.languageModes: Ruby:.rb .rd rakefile:"^[ \\t]*#[ \\t]*(!|.*-\\*-).*ruby":::::".,/\\\\`'!#%^&*()-=+{}[]"":;<>?~|": nedit.styles: Header Comment:gray20:Bold Italic\n\ Hilite Comment:Purple:Italic\n\ Urgent Comment:magenta:Bold Italic\n\ Attribute:VioletRed4:Plain\n\ Class Attribute:VioletRed4:Bold