This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sort-order": [ | |
[ | |
"all" | |
], | |
[ | |
"box-sizing" | |
], | |
[ | |
"display", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang s-exp framework/keybinding-lang | |
;; definitions: | |
;; commented line: a line where the first non-blank character is ";" | |
;; non-commented line: any line that isn't a commented line | |
;; | |
;; selected line: all partially or fully selected lines | |
;; blank line an empty line or a line with only spaces | |
;; | |
;; behavior: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang s-exp framework/keybinding-lang | |
(require fmt) | |
(define (format editor event) | |
(define text (send editor get-text)) | |
;; for more options, see https://docs.racket-lang.org/fmt/ | |
(define formatted-text (program-format text #:max-blank-lines +inf.0)) | |
(send editor insert formatted-text 0 (string-length text) #f)) |