editor/format: general fix & refactor

+ Fixes function/command formatters (like #'gofmt)
+ Fixes formatting by region
+ Adds default keybindings:
  + gQ evil operator
  + SPC c f (normal mode) to format buffer
  + SPC c f (visual mode) to format selection
This commit is contained in:
Henrik Lissner 2018-08-25 00:02:53 +02:00
parent 469cc7fbc1
commit 171c87aa2c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 228 additions and 165 deletions

View file

@ -0,0 +1,8 @@
;;; editor/format/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+format:region "editor/format/autoload/evil" nil t)
(evil-define-operator +format:region (beg end type)
"Evil ex interface to `+format-region'."
(interactive "<R>")
(+format-region beg end))