浏览代码

Add my-occur

master
10sr 7 年前
父节点
当前提交
e7ab9e6fa0
签署人:: 10sr GPG 密钥 ID: 7BEC428194130EB2
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. +7
    -2
      emacs.el

+ 7
- 2
emacs.el 查看文件

@@ -383,8 +383,6 @@ found, otherwise returns nil."
(global-set-key (kbd "C-s") 'isearch-forward-regexp) (global-set-key (kbd "C-s") 'isearch-forward-regexp)
(global-set-key (kbd "C-r") 'isearch-backward-regexp) (global-set-key (kbd "C-r") 'isearch-backward-regexp)


(define-key ctl-x-map (kbd "C-o") 'occur)

(require 'page-ext nil t) (require 'page-ext nil t)


(when (safe-require-or-eval 'page-break-lines) (when (safe-require-or-eval 'page-break-lines)
@@ -1740,6 +1738,13 @@ and search from projectile root (if projectile is available)."
(define-key ctl-x-map "s" 'my-rgrep) (define-key ctl-x-map "s" 'my-rgrep)
(define-key ctl-x-map "." 'my-rgrep-thing-at-point-projectile-root) (define-key ctl-x-map "." 'my-rgrep-thing-at-point-projectile-root)


(defun my-occur (regexp &optional region)
"My occur command to search REGEXP."
(interactive (list (read-string "List lines matching regexp: "
(thing-at-point 'symbol t))))
(occur regexp nil region))
(define-key ctl-x-map (kbd "C-o") 'my-occur)

(set-variable 'dumb-jump-prefer-searcher 'rg) (set-variable 'dumb-jump-prefer-searcher 'rg)


(defalias 'make 'compile) (defalias 'make 'compile)


正在加载...
取消
保存