factor/basis/editors/editors-docs.factor

39 lines
1.9 KiB
Factor
Raw Normal View History

2009-04-10 05:41:26 -04:00
USING: help.markup help.syntax parser source-files
2011-10-19 03:57:20 -04:00
source-files.errors vocabs.loader kernel ;
2007-09-20 18:09:08 -04:00
IN: editors
ARTICLE: "editor" "Editor integration"
"Factor development is best done with one of the supported editors; this allows you to quickly jump to definitions from the Factor environment."
{ $subsections edit }
2009-08-11 10:58:47 -04:00
"Depending on the editor you are using, you must load one of the child vocabularies of the " { $vocab-link "editors" } " vocabulary, for example " { $vocab-link "editors.emacs" } ":"
2007-11-04 18:07:03 -05:00
{ $code "USE: editors.emacs" }
"If you intend to always use the same editor, it helps to have it load during stage 2 bootstrap. Place the code to load and possibly configure it in the " { $link ".factor-boot-rc" } "."
2009-08-11 10:58:47 -04:00
$nl
"Editor integration vocabularies store a class or tuple in a global variable when loaded:"
{ $subsections editor-class }
2007-09-20 18:09:08 -04:00
"If a syntax error was thrown while loading a source file, you can jump to the location of the error in your editor:"
{ $subsections :edit } ;
2007-09-20 18:09:08 -04:00
ABOUT: "editor"
HELP: edit
2011-10-19 03:57:20 -04:00
{ $values { "object" object } }
{ $description "Opens the source file containing the definition using the current " { $link editor-class } ". See " { $link "editor" } "." }
2007-09-20 18:09:08 -04:00
{ $examples
"Editing a word definition:"
{ $code "\\ foo edit" }
"A word's documentation:"
{ $code "\\ foo >link edit" }
"A method definition:"
2009-04-06 03:59:59 -04:00
{ $code "M\\ fixnum + edit" }
2007-09-20 18:09:08 -04:00
"A help article:"
{ $code "\"handbook\" >link edit" }
} ;
HELP: edit-location
{ $values { "file" "a pathname string" } { "line" "a positive integer" } }
{ $description "Opens a source file at the specified line number containing using the current " { $link editor-class } ". Line numbers are indexed starting from 1. See " { $link "editor" } "." } ;
2007-09-20 18:09:08 -04:00
HELP: :edit
{ $description "If the most recent error was a " { $link source-file-error } " thrown while parsing a source file, opens the source file at the failing line in the default editor. See " { $link "editor" } "." } ;