Quellcode durchsuchen

misc changes

pull/1/head
10sr vor 12 Jahren
Ursprung
Commit
d51dcea8fc
3 geänderte Dateien mit 29 neuen und 20 gelöschten Zeilen
  1. +9
    -5
      _keysnail.js
  2. +3
    -2
      bashrc
  3. +17
    -13
      emacs.el

+ 9
- 5
_keysnail.js Datei anzeigen

@@ -550,6 +550,10 @@ key.setGlobalKey('M-:', function (ev) {
command.interpreter();
}, 'JavaScript のコードを評価');

key.setGlobalKey('C-h', function (ev, arg) {
return;
}, 'ignore');

key.setViewKey('D', function (ev, arg) {
ext.exec("dig-url", arg, ev);
}, 'dig url with selector', true);
@@ -684,7 +688,7 @@ key.setViewKey([['<prior>'], ['<next>']], function (ev, arg) {
return;
}, 'ignore');

key.setViewKey(':', function (ev, arg) {
key.setViewKey([[':'], ['P']], function (ev, arg) {
return !document.getElementById("keysnail-prompt").hidden &&
document.getElementById("keysnail-prompt-textbox").focus();
}, 'KeySnail のプロンプトへフォーカス', true);
@@ -713,10 +717,10 @@ key.setViewKey('I', function (ev, arg) {
ext.exec("instapaper-post-page-with-comment", arg, ev);
}, 'post page and comment', true);

key.setViewKey('T', function (ev, arg) {
ext.exec("mstranslator-open-prompt", arg, ev);
}, 'MSTranslator - Open prompt', true);

key.setEditKey('C-<tab>', function (ev) {
command.walkInputElement(command.elementsRetrieverTextarea, true, true);
}, '次のテキストエリアへフォーカス');

key.setViewKey('T', function (ev, arg) {
ext.exec('mstranslator-open-prompt', arg, ev);
}, 'MSTranslator - Open prompt', true);

+ 3
- 2
bashrc Datei anzeigen

@@ -34,7 +34,7 @@ else
fi
export LESS="-iRMX"

if false null type vim
if null type vim
then
export EDITOR=vim
else
@@ -79,6 +79,7 @@ alias grep="grep -n${_coloroption}"
# alias less=""
alias vl=/usr/share/vim/vimcurrent/macros/less.sh
alias em="emacs -nw"
null type vim && alias vi=vim
alias pstree="LANG=C pstree"
alias cp="cp -v"
alias mv="mv -v"
@@ -450,7 +451,7 @@ __my_set_title(){
;;
esac
}
PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD};${PROMPT_COMMAND}"
export PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD};${PROMPT_COMMAND}"

# copied from https://wiki.archlinux.org/index.php/X_resources
invader(){


+ 17
- 13
emacs.el Datei anzeigen

@@ -1,4 +1,4 @@
;; 外部ファイル読み込み
;; load another file
;; (load-file "~/filepath")

;; (thing-at-point 'word)
@@ -150,10 +150,11 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB."

;; my prefix map
(define-prefix-command 'my-prefix-map)
(add-hook 'after-init-hook
'(add-hook 'after-init-hook
(lambda ()
(define-key ctl-x-map (kbd "C-x") 'my-prefix-map)
))
(define-key ctl-x-map (kbd "C-x") 'my-prefix-map)
(define-key my-prefix-map (kbd "C-q") 'quoted-insert)
(define-key my-prefix-map (kbd "C-z") 'suspend-frame)

@@ -177,6 +178,18 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; global keys

(and (dllib-if-unfound "drill-instructor"
"https://raw.github.com/k1LoW/emacs-drill-instructor/master/drill-instructor.el"
t)
(require 'drill-instructor nil t)
(setq drill-instructor-global t)
(let ((map drill-instructor-key-map))
(define-key map (kbd "RET") nil)
(define-key map (kbd "DEL") nil)))
'(mapc (lambda (key)
(global-set-key (read-kbd-macro key) 'ignore))
'("<up>" "<down>" "<right>" "<left>"))

(define-key my-prefix-map (kbd "C-o") 'occur)

;; (define-key my-prefix-map (kbd "C-h") help-map)
@@ -434,7 +447,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB."
(setq-default tab-width 4)
(setq-default indent-tabs-mode nil)
(setq-default indent-line-function nil)
(pc-selection-mode 1)
;(pc-selection-mode 1) ; this reverts back all keybind defined until this line
(delete-selection-mode 1)
(cua-mode 0)

@@ -453,7 +466,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB."
(global-set-key (kbd "C-<down>") (lambda () (interactive)(scroll-up 1)))
(global-set-key (kbd "C-<left>") 'scroll-down)
(global-set-key (kbd "C-<right>") 'scroll-up)
(global-set-key (kbd "<select>") 'previous-line-mark)
(global-set-key (kbd "<select>") 'ignore) ; 'previous-line-mark)
(define-key ctl-x-map (kbd "ESC x") 'execute-extended-command)
(define-key ctl-x-map (kbd "ESC :") 'eval-expression)

@@ -476,15 +489,6 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB."
(global-set-key (kbd "C-s") 'isearch-forward-regexp)
(global-set-key (kbd "M-i") (kbd "ESC TAB"))

'(and (dllib-if-unfound "drill-instructor"
"https://raw.github.com/k1LoW/emacs-drill-instructor/master/drill-instructor.el"
t)
(require 'drill-instructor nil t)
(setq drill-instructor-global t))
(mapc (lambda (key)
(global-set-key (read-kbd-macro key) 'ignore))
'("<up>" "<down>" "<right>" "<left>"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; gmail



Laden…
Abbrechen
Speichern