Skip to content

Commit

Permalink
Reformat code example in readme for goto
Browse files Browse the repository at this point in the history
  • Loading branch information
meain committed Aug 17, 2023
1 parent e9c81d2 commit de4abc9
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,32 @@ that is available here.

```emacs-lisp
;; Goto start of next function
(define-key evil-normal-state-map (kbd "]f") (lambda ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer")))
(define-key evil-normal-state-map
(kbd "]f")
(lambda ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer")))
;; Goto start of previous function
(define-key evil-normal-state-map (kbd "[f") (lambda ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer" t)))
(define-key evil-normal-state-map
(kbd "[f")
(lambda ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer" t)))
;; Goto end of next function
(define-key evil-normal-state-map (kbd "]F") (lambda ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer" nil t)))
(define-key evil-normal-state-map
(kbd "]F")
(lambda ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer" nil t)))
;; Goto end of previous function
(define-key evil-normal-state-map (kbd "[F") (lambda ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer" t t)))
(define-key evil-normal-state-map
(kbd "[F")
(lambda ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer" t t)))
```

# Finding and contributing to textobjects
Expand Down

0 comments on commit de4abc9

Please sign in to comment.