Skip to content

Latest commit

 

History

History
110 lines (91 loc) · 3.29 KB

READMECN.org

File metadata and controls

110 lines (91 loc) · 3.29 KB

W3M contribution layer for Spacemacs

简介

这个 layer 用于在 Spacemacs 中使用 W3M。

所使用的 Emacs 包:

Emacs-w3m http://emacs-w3m.namazu.org

Helm-w3m https://github.com/emacs-helm/helm-w3m

播放 Youtube 和 Bilibili 需要`mpv`与`Bilidan`

MPV https://mpv.io/

Bilidan https://github.com/m13253/BiliDan

安装

W3M

W3M

http://w3m.sourceforge.net

OS X

使用 Homebrew 安装 W3M

$brew install w3m

Ubuntu/Debian

$sudo apt install w3m

Layer

$git clone https://github.com/venmos/w3m-layer.git ~/.emacs.d/private/w3m

将 w3m layer 加入你的 ~/.spacemacs

(setq-default dotspacemacs-configuration-layers '(
                                                  w3m
))

快捷键

启动 W3M

Key BindingDescription
SPC a w o打开链接
SPC a w f打开文件
SPC a w s使用 Google 搜索
SPC a w b用 helm 打开书签

W3M

Key BindingDescription
oAce-link
w p使用 MPV 播放 Youtube 与 Blibli
w y拷贝光标处链接
w f打开文件
w o打开链接
w O在新标签中打开链接
w t打开光标处链接到新标签
w T打开新的空白标签
w s使用 Google 搜索
w S在新标签中搜索
w l下一个标签页
w h上一个标签页
w d保存页面为文本文件
w D保存页面为 HTML
w x关闭标签
w a添加到收藏夹
w b用 helm 打开收藏夹
w B用 w3m 收藏夹
w e编辑收藏夹
w m使用外部游览器打开链接
q挂起 W3M
Q退出 W3M
B返回
N前进
H打开默认主页
R刷新
C-f向下移动一页
C-b向上移动一页

Config

Emacs-w3m

W3M 推荐配置示例

(defun dotspacemacs/user-config ()
  (setq w3m-home-page "https://www.google.com")
  ;; W3M Home Page
  (setq w3m-default-display-inline-images t)
  (setq w3m-default-toggle-inline-images t)
  ;; W3M default display images
  (setq w3m-command-arguments '("-cookie" "-F"))
  (setq w3m-use-cookies t)
  ;; W3M use cookies
  (setq browse-url-browser-function 'w3m-browse-url)
  ;; Browse url function use w3m
  (setq w3m-view-this-url-new-session-in-background t)
  ;; W3M view url new session in background
)