Fix keymaps and git-gutter
This commit is contained in:
parent
2e7ba4a21e
commit
1dd426eede
4 changed files with 83 additions and 79 deletions
|
@ -10,18 +10,18 @@
|
|||
:config
|
||||
(progn
|
||||
(defun markdown-insert-del ()
|
||||
(interactive)
|
||||
(let ((delim "~~"))
|
||||
(if (markdown-use-region-p)
|
||||
;; Active region
|
||||
(let ((bounds (markdown-unwrap-things-in-region
|
||||
(region-beginning) (region-end)
|
||||
markdown-regex-del 2 4)))
|
||||
(markdown-wrap-or-insert delim delim nil (car bounds) (cdr bounds)))
|
||||
;; Bold markup removal, bold word at point, or empty markup insertion
|
||||
(if (thing-at-point-looking-at markdown-regex-del)
|
||||
(markdown-unwrap-thing-at-point nil 2 4)
|
||||
(markdown-wrap-or-insert delim delim 'word nil nil)))))
|
||||
(interactive)
|
||||
(let ((delim "~~"))
|
||||
(if (markdown-use-region-p)
|
||||
;; Active region
|
||||
(let ((bounds (markdown-unwrap-things-in-region
|
||||
(region-beginning) (region-end)
|
||||
markdown-regex-del 2 4)))
|
||||
(markdown-wrap-or-insert delim delim nil (car bounds) (cdr bounds)))
|
||||
;; Bold markup removal, bold word at point, or empty markup insertion
|
||||
(if (thing-at-point-looking-at markdown-regex-del)
|
||||
(markdown-unwrap-thing-at-point nil 2 4)
|
||||
(markdown-wrap-or-insert delim delim 'word nil nil)))))
|
||||
(sp-local-pair 'markdown-mode "*" "*" :unless '(sp-point-after-bol-p sp-point-before-same-p sp-point-after-same-p))
|
||||
|
||||
(let ((map markdown-mode-map))
|
||||
|
@ -43,10 +43,10 @@
|
|||
(kbd "<M-left>") nil
|
||||
(kbd "<M-right>") nil
|
||||
|
||||
(kbd "s-*") 'markdown-insert-list-item
|
||||
(kbd "s-b") 'markdown-insert-bold
|
||||
(kbd "s-i") 'markdown-insert-italic
|
||||
(kbd "s-`") 'markdown-insert-del))))
|
||||
(kbd "M-*") 'markdown-insert-list-item
|
||||
(kbd "M-b") 'markdown-insert-bold
|
||||
(kbd "M-i") 'markdown-insert-italic
|
||||
(kbd "M-`") 'markdown-insert-del))))
|
||||
|
||||
|
||||
(provide 'init-text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue