Lua
pcall
用途: 类似 try catch, 返回 retcode, retvalue 参考:
pairs vs ipairs
Vimium
Vomnibar
按键:
o或O
Search Engine
参考:Search Engines - philc/vimium Wiki
触发模式:
- Shortcutkeyword<空格>搜索词
常用 Engines
| |
vim notes
Cheat Sheet
插件
Python2
string 类型
参考: A Guide to Unicode, UTF-8 and Strings in Python | by Sanket Gupta | Towards D…
python2 有两种 string 类型
- str
- unicode
转换关系: str — decode –> unicode
unicode –> encode –> str
str 类型
- 默认使用 ascii 编码
- 类似 c/c++, 本身实际上无编码, string literal 编码类型由代码文件的编码决定
str.decode
- 语法:
str.decode('coding-name') - 返回值类型: <type 'unicode'>
str.encode
- 返回值类型: <type 'str'>
unicode 类型
- 默认使用 unicode 解码格式
unicode.encode()
- 返回值类型: <type 'str'>