Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Last active March 22, 2025 04:19
Show Gist options
  • Save sogaiu/1fd5b304688d205aa2eb8a280a1c379d to your computer and use it in GitHub Desktop.
Save sogaiu/1fd5b304688d205aa2eb8a280a1c379d to your computer and use it in GitHub Desktop.
quickscript notes
  • docs, tutorials, etc.

  • misc

  • samples

  • things i wish i had figured out sooner

    • (send ed <what can go here?>[ ...]) - ed, interactions, and definitions are all text% objects (and text% implements editor%) so see the following links (at least) for details of possibilities and also the containing document The Racket Graphical Interface for more info:
  • a selection of some (send ed ...) determined via samples (see above for info on detailed docs)

    • (send ed begin-edit-sequence)
    • (send ed end-edit-sequence)
    • (send ed get-text[ ...])
    • (send ed delete <start-pos> <end-pos>)
    • (send ed insert <string>)
    • line
      • (send ed line-start-position <line-number>)
      • (send ed line-end-position <line-number>)
    • position
      • (send ed set-position <pos>)
      • (send ed get-start-position)
      • (send ed get-end-position)
      • (send ed classify-position <pos>)
      • (send ed get-token-range <pos>)
      • (send ed get-character <pos>)
      • (send ed position-line <pos>)
    • paragraph
      • (define par (send ed position-paragraph <pos>)) - move-line.rkt
      • (send ed paragraph-start-position (- par 1) #f) - move-line.rkt
      • (send ed paragraph-end-position (- par 1) #f) - move-line.rkt
      • (send ed paragraph-start-position par #f) - move-line.rkt
      • (send ed paragraph-end-position par #f) - move-line.rkt
    • clipboard
      • (send the-clipboard get-clipboard-string 0) - clipboard->text_url.rkt
      • (send the-clipboard get-clipboard-data <mime-type-string> 0) - clipboard->text_url.rkt
      • (send the-clipboard set-clipboard-string <string> 0) - abstract-variable.rkt
    • pdf
      • (send ed print #t #t 'pdf) - print-editor.rkt
    • symbolic expression
      • (send ed get-forward-sexp <position>) - provided-by.rkt
      • (send ed get-backward-sexp <position>) - provided-by.rkt
      • (send ed select-backward-sexp) - complete-word.rkt
      • (send ed find-up-sexp <position>) - extract-function.rkt
    • (send ed tabify-selection <start> <end>) - extract-function.rkt
    • (send ed get-visible-line-range <start-line> <end-line>) - bookmarks.rkt
    • (send ed get-top-level-window) - bookmarks.rkt
    • (send ed move-position 'left #f 'line) - join-previous-line.rkt
    • (send ed get-word-at ...) - def-signatures.rkt
    • (send ed get-dc) - def-signatures.rkt
    • (send ed editor-location-to-dc-location ...) - def-signatures.rkt
    • (send ed get-canvas) - def-signatures.rkt
    • (send ed get-lexer) - classify-position-quickscript.rkt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment