- 减少RSI!避免control,也避免meta和shift.
- 尽量接近原始Emacs的按键绑定,减少学习的成本。
- 使用和位置无关的按键,这样在所有的键盘布局下都可以使用。
- 可以不需要hack就能方便的使用各个package。
- 可以高效的编辑文字。
- 指令序列尽量保持简短。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Edit a file in the host nvim instance.""" | |
import os | |
import sys | |
from neovim import attach | |
args = sys.argv[1:] | |
if not args: | |
print "Usage: {} <filename> ...".format(sys.argv[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.codehaus.jettison.json.JSONObject; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.List; | |
/** | |
* Created by DogLooksGood on 16/1/3. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns mkd.core | |
(:require [reagent.core :as r :refer [atom]] | |
cljsjs.marked | |
[goog.style :as style] | |
[goog.dom :as dom] | |
[garden.core :refer [css]] | |
[garden.units :refer [percent px vh em]])) | |
(enable-console-print!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.set :refer [difference intersection]]) | |
(defn diff [x y k] | |
(let [xks (set (map k x)) | |
yks (set (map k y)) | |
y-map (zipmap (map k y) y) | |
x-map (zipmap (map k x) x) | |
cancel (difference xks yks) | |
commit-ks (difference yks xks) | |
commit (vec (vals (select-keys y-map commit-ks))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Minimal setup for Clojure development & Org document. | |
(require 'package) | |
(setq package-enable-at-startup nil) | |
(setq package-archives | |
'(("gnu-cn" . "http://elpa.zilongshanren.com/gnu/") | |
("melpa-cn" . "http://elpa.zilongshanren.com/melpa/") | |
("melpa-stable-cn" . " http://elpa.zilongshanren.com/melpa-stable/") | |
("marmalade-cn" . "http://elpa.zilongshanren.com/marmalade/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun user/lisp-semicolon () | |
"Will insert a semicolon if we are at the beginning of the line, | |
otherwise will insert a colon." | |
(interactive) | |
(if (or (nth 3 (syntax-ppss)) | |
(save-mark-and-excursion | |
(while (equal (char-before) 59) | |
(backward-char)) | |
(equal (point) (line-beginning-position)))) | |
(call-interactively 'paredit-semicolon) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns demo.list-view | |
"A ListView provides: | |
1. Refresh control | |
2. Pagination" | |
(:require [reagent.core :as reagent])) | |
(def ^:private default-bounce-height 100) | |
;;; Event Handlers | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun user/clojure-comment () | |
(interactive) | |
(cond | |
((not current-prefix-arg) | |
(save-mark-and-excursion | |
(if (equal "#_" (buffer-substring-no-properties (point) (+ 2 (point)))) | |
(while (equal "#_" (buffer-substring-no-properties (point) (+ 2 (point)))) | |
(delete-char 2)) | |
(progn | |
(unless (or (equal (char-after) 40) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defface rime-preedit-face | |
'((((class color) (background dark)) | |
(:underline t)) | |
(((class color) (background light)) | |
(:underline t))) | |
"Face for preedit string" | |
:group 'rime) | |
(defvar rime--preedit-overlay nil) | |
(defvar rime--backspace-fallback nil) |
OlderNewer