diff --git a/scripts/sloth.in b/scripts/sloth.in index 225cef5..17b2a17 100644 --- a/scripts/sloth.in +++ b/scripts/sloth.in @@ -11,12 +11,12 @@ ;;; Code: (use-modules (config) - (config api) - (config licenses) - (config parser sexp) - (sloth editor) - (sloth interface) - (ncurses curses)) + (config api) + (config licenses) + (config parser sexp) + (sloth editor) + (sloth interface) + (ncurses curses)) ;; Commandline handling @@ -29,14 +29,14 @@ (license @LICENSE@) (synopsis "Text editor based on tree-sitter") (description - "TODO") + "TODO") (arguments - (list - (argument (name 'file) - (default "") - (test string?) - (synopsis "The file to open") - (example "./file.txt")))) + (list + (argument (name 'file) + (default "") + (test string?) + (synopsis "The file to open") + (example "./file.txt")))) (directory (in-home ".config/")) (parser simple-sexp-parser) (generate-cmdtree? #t))) diff --git a/sloth/editor.scm b/sloth/editor.scm index b890f79..56c61a2 100644 --- a/sloth/editor.scm +++ b/sloth/editor.scm @@ -10,19 +10,19 @@ (define ch (getch win)) (cond ((eqv? ch KEY_BACKSPACE) - (delch win #:y y #:x (- x 1))) + (delch win #:y y #:x (- x 1))) ((eqv? ch KEY_DC) - (delch win)) + (delch win)) ((eqv? ch KEY_LEFT) - (move win y (- x 1))) + (move win y (- x 1))) ((eqv? ch KEY_RIGHT) - (move win y (+ x 1))) + (move win y (+ x 1))) ((eqv? ch KEY_UP) - (move win (- y 1) x)) + (move win (- y 1) x)) ((eqv? ch KEY_DOWN) - (move win (+ y 1) x)) + (move win (+ y 1) x)) ((eqv? ch #\q) - (endwin) - (quit)) + (endwin) + (quit)) (else (echochar win (normal ch)))) (core-loop win))