Skip to content

Instantly share code, notes, and snippets.

View ngn999's full-sized avatar
💭
I may be slow to respond.

ngn999 ngn999

💭
I may be slow to respond.
View GitHub Profile
@ngn999
ngn999 / gist:3994582
Created November 1, 2012 16:03
emacs的自动缩进

上次发现在注释里, 回车后, 行首不能自动添加 *了. 像这样:

/*
 * =====================================================================================
 *
 *       Filename:  word_segment.cpp
 *
 *    Description:
 *
@ngn999
ngn999 / gist:4005647
Created November 3, 2012 02:58
那些年我用的神器
  • GNU Emacs, 神用的编辑器
  • Total Commander, windows下取代我的电脑
  • Cterm, 上水木社区
  • Git, 分布式版本控制工具.
  • Tmux/GNU Screen, 终端窗口管理器.
  • lftp, nb的终端下的ftp client.
  • putty, 小巧实用的Term
@ngn999
ngn999 / gist:4025187
Created November 6, 2012 14:56
往emacs24发展

目标

使用package.el, 主要用来编程:

  • CC Mode
  • Ruby Mode
  • CPerl Mode
  • lua Mode
  • yaml Mode
  • markdown Mode
@ngn999
ngn999 / gist:4040317
Created November 8, 2012 17:42
query mode
;;; query-mode.el --- a mode for view our access log
;; query example
;; /bin/search?auction?user_id=79586&statistic=field=pidvid,count=500&n=4&s=2
;; Author : ngn <[email protected]>
;; URL : https://gist.github.com/4040317
;; Version : 0.1
;; Keywords : query, url
@ngn999
ngn999 / gist:4057657
Created November 12, 2012 05:28
生成uuid
uuidgen | perl -F'-' -ane 'chomp @F;print "DECLARE_UUID(".(join ",",map { "0x".$_ } @F).");";print "\n";'
@ngn999
ngn999 / gist:4076412
Created November 15, 2012 03:09
psvn.el的bug

不能连续操作属性

你得先:

svn up

tmux cheatsheet

As configured in my dotfiles.

开启一个新的会话:

tmux

开启一个新的带名字的会话:

@ngn999
ngn999 / gist:4211479
Created December 5, 2012 02:08
临时命令

tail -n 10000 access_log_searcher | perl -nale 'if ($F[5] > $max) {$max = $F[5]; $maxq = $_}; END{print $max /1000, "\t",$maxq}'

@ngn999
ngn999 / gist:4232438
Created December 7, 2012 10:46
psvn.el 快捷键

psvn.el 快捷键

其实快捷键是不用记录下来的, 这个应该是用肌肉记忆的.

psvn.el的安装

下载地址

终端下psvn.el不能用的问题

@ngn999
ngn999 / gist:4243728
Created December 9, 2012 07:17
dabbrev-completion

M-x dabbrev-completion

相当于补全当前buffer里已经出现过的word, 而不用预先定义abbrev.

默认绑定到了M-/, C-M-/, 前都被已经被我用掉了, 后者在terminal下按不出来:(

不过已经启用Auto Complete的同学是不需要这个了.

写这个只是记录一下dabbrev是怎么回事.