WThreeMKeymap

Last edit

Summary: Rückgängig gemacht auf den Stand vom 2013-08-24 11:21 UTC

Changed:

< (define-key map "s" 'w3m-WikiModes)

to

> (define-key map "s" 'w3m-search)

Changed:

< (call-interactively 'w3m-WikiModes))))

to

> (call-interactively 'w3m-search))))


I found the default keymap somewhat confusing. The point of doing web browsing in emacs is to use familiar keys for navigation. So, here’s the keymap I use that feels more “emacs-like” for me. Sweeten to taste.

 (let ((map (make-keymap)))
   (suppress-keymap map)
   (define-key map [backspace] 'w3m-scroll-down-or-previous-url)
   (define-key map [delete] 'w3m-scroll-down-or-previous-url)
   (define-key map "\C-?" 'w3m-scroll-down-or-previous-url)
   (define-key map "\t" 'w3m-next-anchor)
   (define-key map [(shift tab)] 'w3m-previous-anchor)
   (define-key map [(shift iso-left-tab)] 'w3m-previous-anchor)
   (define-key map "\C-m" 'w3m-view-this-url)
   (define-key map [(shift return)] 'w3m-view-this-url-new-session)
   (define-key map [(shift kp-enter)] 'w3m-view-this-url-new-session)
   (define-key map [(button2)] 'w3m-mouse-view-this-url)
   (define-key map [(shift button2)] 'w3m-mouse-view-this-url-new-session)
   (define-key map " " 'scroll-up)
   (define-key map "a" 'w3m-bookmark-add-current-url)
   (define-key map "\M-a" 'w3m-bookmark-add-this-url)
   (define-key map "+" 'w3m-antenna-add-current-url)
   (define-key map "A" 'w3m-antenna)
   (define-key map "c" 'w3m-print-this-url)
   (define-key map "C" 'w3m-print-current-url)
   (define-key map "d" 'w3m-download)
   (define-key map "D" 'w3m-download-this-url)
   ;; (define-key map "D" 'w3m-download-with-wget)
   ;; (define-key map "D" 'w3m-download-with-curl)
   (define-key map "g" 'w3m-goto-url)
   (define-key map "G" 'w3m-goto-url-new-session)
   (define-key map "h" 'describe-mode)
   (define-key map "H" 'w3m-gohome)
   (define-key map "I" 'w3m-toggle-inline-images)
   (define-key map "\M-i" 'w3m-save-image)
   (define-key map "M" 'w3m-view-url-with-external-browser)
   (define-key map "n" 'w3m-view-next-page)
   (define-key map "N" 'w3m-namazu)
   (define-key map "o" 'w3m-history)
   (define-key map "O" 'w3m-db-history)
   (define-key map "p" 'w3m-view-previous-page)
   (define-key map "q" 'w3m-close-window)
   (define-key map "Q" 'w3m-quit)
   (define-key map "R" 'w3m-reload-this-page)
   (define-key map "s" 'w3m-search)
   (define-key map "S" (lambda ()
			  (interactive)
			  (let ((current-prefix-arg t))
			    (call-interactively 'w3m-search))))
   (define-key map "u" 'w3m-view-parent-page)
   (define-key map "v" 'w3m-bookmark-view)
   (define-key map "W" 'w3m-weather)
   (define-key map "=" 'w3m-view-header)
   (define-key map "\\" 'w3m-view-source)
   (define-key map "?" 'describe-mode)
   (define-key map ">" 'scroll-left)
   (define-key map "<" 'scroll-right)
   (define-key map "." 'beginning-of-buffer)
   (define-key map "^" 'w3m-view-parent-page)
   (define-key map "]" 'w3m-next-form)
   (define-key map "[" 'w3m-previous-form)
   (define-key map "}" 'w3m-next-image)
   (define-key map "{" 'w3m-previous-image)
   (define-key map "\C-c\C-c" 'w3m-submit-form)
   (setq dka-w3m-map map))
 (add-hook 'w3m-mode-hook '(lambda () (use-local-map dka-w3m-map)))

— See Also: WThreeM, CategoryHypermedia