summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/TODO.org4
-rw-r--r--.config/emacs/init.el15
2 files changed, 16 insertions, 3 deletions
diff --git a/.config/emacs/TODO.org b/.config/emacs/TODO.org
index ce81048..3cecd63 100644
--- a/.config/emacs/TODO.org
+++ b/.config/emacs/TODO.org
@@ -1,3 +1 @@
-- [ ] Fix completion issues
-- [ ] Fix freeze
-- [ ] Fix error messages on the side
+- [ ] connect xdg open to current session
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 0799189..015855c 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -189,6 +189,21 @@
(define-key evil-window-map (kbd "C-g") #'evil-keyboard-quit)
(define-key evil-operator-state-map (kbd "C-g") #'evil-keyboard-quit))
+;; Custom "in-line" text object
+(evil-define-text-object evil-inner-line (count &optional beg end type)
+ "Select the current line excluding leading/trailing whitespace."
+ (let* ((line-start (line-beginning-position))
+ (line-end (line-end-position))
+ (text (buffer-substring-no-properties line-start line-end))
+ (nonspace-start (string-match-p "\\S-" text))
+ (nonspace-end (or (save-match-data
+ (string-match-p "\\S-\\s-*\\'" text))
+ 0)))
+ (evil-range (+ line-start nonspace-start)
+ (+ line-start nonspace-end)
+ 'exclusive)))
+(define-key evil-inner-text-objects-map "l" 'evil-inner-line)
+
;; == style
;; theme
;; (use-package dracula-theme