diff --git a/_keysnail.js b/_keysnail.js index 21cd397..43831be 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -616,6 +616,7 @@ key.suspendKey = "Not defined"; // ================================= Hooks ================================= // + hook.setHook('KeyBoardQuit', function (aEvent) { ext.exec("hide-sidebar"); let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); @@ -643,7 +644,6 @@ hook.setHook('Unload', function () { }); - // ============================= Key bindings ============================== // key.setGlobalKey('C-', function () { @@ -682,6 +682,10 @@ key.setGlobalKey('', function (ev, arg) { ext.exec("strong-fullscreen", arg, ev); }, 'go fullscreen with hiding toolbar and tabbar', true); +key.setViewKey('0', function (ev) { + BrowserCloseTabOrWindow(); +}, 'タブ / ウィンドウを閉じる'); + key.setViewKey('N', function (ev) { getBrowser().mTabContainer.advanceSelectedTab(1, true); }, 'ひとつ右のタブへ'); @@ -822,10 +826,6 @@ key.setViewKey('B', function (ev) { } }, '選択中のタブを左へ'); -key.setViewKey('0', function (ev) { - BrowserCloseTabOrWindow(); -}, 'タブ / ウィンドウを閉じる'); - key.setViewKey('C', function (ev, arg) { ext.exec("linksnail", arg, ev); }, 'LinkSnail', true); @@ -918,3 +918,7 @@ key.setEditKey('C-p', function (ev) { key.setEditKey('C-o', function (ev) { command.openLine(ev); }, '行を開く (Open line)'); + +key.setViewKey('f', function (ev, arg) { + ext.exec('strong-fullscreen', arg, ev); +}, 'go fullscreen with hiding toolbar and tabbar', true); diff --git a/emacs.el b/emacs.el index 60b1e57..07c3b48 100644 --- a/emacs.el +++ b/emacs.el @@ -68,6 +68,27 @@ otherwise the path where the library installed." ok-if-already-exists) path))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; package + +(when (require 'package nil t) + (add-to-list 'package-archives + '("ELPA" . "http://tromey.com/elpa/")) + (add-to-list 'package-archives + '("melpa" . "http://melpa.milkbox.net/packages/") + t) + (add-to-list 'package-archives + '("marmalade" . "http://marmalade-repo.org/packages/")) + ;; (package-initialize) + ;; (package-refresh-contents) + ) + +;; http://qiita.com/items/5f1cd86e2522fd3384a0 +;; http://blog.64p.org/entry/2013/05/01/233306 + + +;; (lazy-load-eval 'sudoku) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; autoload @@ -313,6 +334,8 @@ found, otherwise returns nil." ;; (set-face-background 'vertical-border (face-foreground 'mode-line)) +;; (set-window-margins (selected-window) 1 1) + (and (or (eq system-type 'Darwin) (eq system-type 'darwin)) (fboundp 'mac-set-input-method-parameter) @@ -640,24 +663,10 @@ found, otherwise returns nil." (getenv "TMUX") (pasteboard-enable-rtun)) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; package - -(when (require 'package nil t) - (add-to-list 'package-archives - '("melpa" . "http://melpa.milkbox.net/packages/") - t) - (add-to-list 'package-archives - '("marmalade" . "http://marmalade-repo.org/packages/")) - (add-to-list 'package-archives - '("ELPA" . "http://tromey.com/elpa/")) - (package-initialize)) - -(lazy-load-eval 'sudoku) - +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; https://github.com/lunaryorn/flycheck (when (require 'flycheck nil t) - (add-hook 'after-init-hook #'global-flycheck-mode)) + (add-hook 'after-init-hook 'global-flycheck-mode)) (defun my-install-packages () nil)