Browse Source

less-like searching in view-mode

pull/1/head
10sr 12 years ago
parent
commit
1b8c25cc63
1 changed files with 15 additions and 4 deletions
  1. +15
    -4
      emacs.el

+ 15
- 4
emacs.el View File

@@ -699,9 +699,17 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB."
(lambda()
(define-key view-mode-map "j" (lambda() (interactive) (scroll-up 1)))
(define-key view-mode-map "k" (lambda() (interactive) (scroll-down 1)))
(define-key view-mode-map "/" 'isearch-forward)
(define-key view-mode-map "v" 'toggle-read-only)
(define-key view-mode-map "q" 'bury-buffer)))
(define-key view-mode-map "q" 'bury-buffer)
;; (define-key view-mode-map "/" 'nonincremental-re-search-forward)
;; (define-key view-mode-map "?" 'nonincremental-re-search-backward)
;; (define-key view-mode-map "n" 'nonincremental-repeat-search-forward)
;; (define-key view-mode-map "N" 'nonincremental-repeat-search-backward)
(define-key view-mode-map "/" 'isearch-forward-regexp)
(define-key view-mode-map "?" 'isearch-backward-regexp)
(define-key view-mode-map "n" 'isearch-repeat-forward)
(define-key view-mode-map "N" 'isearch-repeat-backward)
))
(global-set-key "\M-r" 'view-mode)
(setq view-read-only t)

@@ -755,14 +763,17 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB."
;; (define-key term-raw-map "\C-t" 'set-mark-command)
(define-key term-raw-map "\C-x" (lookup-key (current-global-map) "\C-x"))
(define-key term-raw-map "\C-z" (lookup-key (current-global-map) "\C-z")))
(define-key term-raw-map (kbd "C-p") 'term-send-raw)
(define-key term-raw-map (kbd "C-n") 'term-send-raw)
(define-key term-raw-map "q" 'my-term-quit-or-send-raw)
(define-key term-raw-map (kbd "ESC") 'term-send-raw)
;; (define-key term-raw-map (kbd "ESC") 'term-send-raw)
(define-key term-raw-map [delete] 'term-send-raw)
(define-key term-raw-map (kbd "DEL") 'term-send-backspace)
(define-key term-raw-map "\C-y" 'term-paste)
(define-key term-raw-map "\C-c" 'term-send-raw) ;; 'term-interrupt-subjob)
'(define-key term-mode-map (kbd "C-x C-q") 'term-pager-toggle)
;; (dolist (key '("<up>" "<down>" "<right>" "<left>"))
;; (define-key term-raw-map (kbd key) 'term-send-raw))
;; (define-key term-raw-map (read-kbd-macro key) 'term-send-raw))
;; (define-key term-raw-map "\C-d" 'delete-char)
(set (make-local-variable 'scroll-margin) 0)
;; (set (make-local-variable 'cua-enable-cua-keys) nil)


Loading…
Cancel
Save