快捷键:
C-A-t: 启动终端
C-S-t C-S-w: 新建/关闭 标签页
系统设置 -> 键盘,绑定快捷键的时候按下 Backtrace 便可解除绑定,如果不行,则先绑一个不怎么用的按键后,再在其他操作上绑定该按键,那么之前绑定该按键的操作就解除绑定了。
find:
C-s: (C-s) search again forward, (C-r) search again backward
——————————————————————————————————————————————————
etags:
find . -name “*.[ch]” -print | etags -
M-.: find tag
M-*: Pop back to where M-. was last invoked
M-Tab[Shift-Tab]: auto compeletion
——————————————————————————————————————————————————
括号跳转:
C-M-n,C-M-p
programming:
hex-mode: 文件以16进制查看
区域缩进:C-M-\
back-to-identation: M-m
delete-identation: M-^
comment: M-;
print value into current buffer: C-j (C-x C-e 后将结果打印到当前 buffer)
—————————————————————————————————————————————————————————————————————-
无窗口启动:-nw
显示行号:M-x linum-mode(http://emacser.com/linum-plus.htm)
菜单:
显示菜单: M-x menu-bar-mode
打开菜单:M-x menu-bar-open (http://stackoverflow.com/questions/191312/how-do-i-get-to-the-menu-in-emacs-in-console-mode)
切换 buffer:C-x b
暂时退出和返回:C-z, fg
打开文件:C-x C-f
关闭 buffer :C-x k
退出辅助输入区:C-g
查看 buffer:C-x C-b
跳到指定行: M-g g
———————————————————————————————————————————————————————————-
删除:
删除空白:M-\
删除字符:C-d, backspace
删除 word: M-d, M-backspace
删除行:C-k, C-a-k
删除句:M-k, C-x backspace
删除所有:C-x h C-w
查看 man page: M-x man 或 M-x woman
info:
返回上一节点 u:<http://doc.linuxpk.com/3948.html>
重新加载配置:M-x: eval-buffer,有时不是很管用(比如注释了某个函数)
插入:
新行:C-o
SHELL:
历史命令:M-p, M-n
命令:
多次执行最后的命令:C-x z
undo:C-_
redo agter undo:C-g C-_
—————————————————————————————————————-
帮助:
查看 C-x 下的所有快捷键:C-x C-h
帮助窗口的滚动:C-M-v
查看某个快捷键:C-h k (http://hi.baidu.com/84fy/blog/item/9db592fbc754b8214f4aeaf1.html)
+ ,查看历史(http://daiyuwen.freeshell.org/gb/emacs_tools/history.html)
http://www.gnu-m68hc11.org/doc/cpp_2.html#SEC8
GCC looks in several different places for headers. On a normal Unix system, if you do not instruct it otherwise, it will look for headers requested with #include <file> in:
/usr/local/include /usr/lib/gcc-lib/target/version/include /usr/target/include /usr/include
java 开启 assert 检查(java 默认关闭 assert 的):
Window > Preferences > Java > Installed JREs > Edit > Default VM Arguments: -ea
已载入的模块:会放到 sys.modules 中去
装饰器:
def decorator(fn):
@functools.wraps(fn)
def wrapper(*arg):
print ‘decorator’
fn(*arg)
return wrapper
@decorator
def f(x, y): print x, y
f(1, 2) ->
decorator
1 2
1. 字面上的转换:
int(‘111’, 10) -> 111 或者 string.atoi(‘111’) -> 111
str(111) -> ‘111’
2. 二进制流的转化:
struct.pack(‘i’, 111) -> ’o\x00\x00\x00’
i, = struct.unpack(‘i’, ’o\x00\x00\x00’) -> 111
3. 字符转化为它的二进制对应的数字:
ord(‘a’) -> 97
chr(97) -> ‘a’
4. 数字显示为 二进制格式
bin(205) -> 0b11001101
Vincent van Gogh, Starry Night
Pierre-Auguste Renoir, Spring
Abbott Handerson Thayer, Angel
The Boston Globe has posted the 50 Best Photos from the Natural World taken in 2011. This is number 8, a mama Amur tiger licking the face of its...
Vincent van Gogh, Straw Hats at Dusk
Vincent van Gogh, Avenue of Poplars at Sunset