Skip to content

Instantly share code, notes, and snippets.

View smallst's full-sized avatar
🏠
Working from home

Tong Yuqiang smallst

🏠
Working from home
View GitHub Profile
@smallst
smallst / moz.el
Created May 7, 2017 07:10
use `my-moz-setup` for selecting refresh tab when save web files in firefox with mozrepl
(defun my-ivy-list (retstring)
"firefox pages"
(interactive)
(let (collection)
(unless recentf-mode (recentf-mode 1))
(setq collection (split-string retstring "\n" t))
(ivy-read "pages:" collection :action (lambda (x)
(comint-send-string (inferior-moz-process) (concat "refreshtab=repl.tabs[" (number-to-string (cl-position x (split-string retstring "\n" t) :test 'equal)) "];"))))))
(defun my-moz-setup ()
(interactive)