Skip to content

Instantly share code, notes, and snippets.

@jcouyang
Last active August 29, 2015 14:08
Show Gist options
  • Save jcouyang/2208bd0aa2748c2998a5 to your computer and use it in GitHub Desktop.
Save jcouyang/2208bd0aa2748c2998a5 to your computer and use it in GitHub Desktop.
emacs 24.4 新特性

安装

brew install emacs --cocoa --with-glib

新特性

superword-mode

这个对于编程非常的有用, 比如以前的 subword-mode, 可以把 CamelCase 当成一个词. 但是下划线的单词还是会当成几个单词.

那么superword-mode 就解决了这一问题. 只需要设置成1就开启了.

(subword-mode 1)
normalsubwordsuperword
someThing▮
some▮-thing
some▮_thing
some▮Thing
some▮-thing
some▮_thing
someThing▮
some-thing▮
some_thing▮

rectangle mark

终于可以这样 mark 了

prettyfy symbol mode

缩略编程时啰嗦的字符, 比如 lisp 中的 "lambda", javasscript 中的 "function"

只需要把想要转换的字符加到prettify-symbols-alist

  (add-hook 'js2-mode-hook
            (lambda ()
              (push '("function" . ?ƒ) prettify-symbols-alist)))
var APIWidget = React.createClass({
  getInitialState: function(){
    return {
      loading: true,
      error: false,
      ...

会变成

var APIWidget = React.createClass({
  getInitialState:ƒ(){
    return {
      loading: true,
      error: false,
      ...

buildin browser eww

变身成为浏览器

Analytics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment