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
# zaw 設定 | |
# zaw - https://github.com/nakamuray/zaw | |
# 沒有 zaw.zsh 的話就跳過 | |
# 所以要先 git clone git://github.com/nakamuray/zaw.git ~/repository | |
if [ -e ~/repository/zaw/zaw.zsh ]; then | |
source ~/repository/zaw/zaw.zsh | |
# 改 key binding,有需要再改啦 | |
# bindkey ",ff" zaw |
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
" }}}2 help 檔案將 *keyword* 對齊到右端 {{{2 | |
function! HelpHyperTextEntryJustify() | |
let save_isk = &l:iskeyword | |
let save_et = &l:expandtab | |
let &l:isk = '!-~,^*,^|,^",192-255' | |
let &l:expandtab = 1 | |
.retab! | |
call setline(".", | |
\ substitute( |
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
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> | |
<os:ShortName>Google 字典 Morebile</os:ShortName> | |
<os:Description>Google 字典 Morebile</os:Description> | |
<os:InputEncoding>UTF-8</os:InputEncoding> | |
<os:Image width="16" height="16">data:image/gif;base64,R0lGODlhEAAQAPcAAP%2F%2F%2F%2F%2F%2FzP%2F%2Fmf%2F%2FZv%2F%2FM%2F%2F%2FAP%2FM%2F%2F%2FMzP%2FMmf%2FMZv%2FMM%2F%2FMAP%2BZ%2F%2F%2BZzP%2BZmf%2BZZv%2BZM%2F%2BZAP9m%2F%2F9mzP9mmf9mZv9mM%2F9mAP8z%2F%2F8zzP8zmf8zZv8zM%2F8zAP8A%2F%2F8AzP8Amf8AZv8AM%2F8AAMz%2F%2F8z%2FzMz%2Fmcz%2FZsz%2FM8z%2FAMzM%2F8zMzMzMmczMZszMM8zMAMyZ%2F8yZzMyZmcyZZsyZM8yZAMxm%2F8xmzMxmmcxmZsxmM8xmAMwz%2F8wzzMwzmcwzZswzM8wzAMwA%2F8wAzMwAmcwAZswAM8wAAJn%2F%2F5n%2FzJn%2FmZn%2FZpn%2FM5n%2FAJnM%2F5nMzJnMmZnMZpnMM5nMAJmZ%2F5mZzJmZmZmZZpmZM5mZAJlm%2F5lmzJlmmZlmZplmM5lmAJkz%2F5kzzJkzmZkzZpkzM5kzAJkA%2F5kAzJkAmZkAZpkAM5kAAGb%2F%2F2b%2FzGb%2FmWb%2FZmb%2FM2b%2FAGbM%2F2bMzGbMmWbMZmbMM2bMAGaZ%2F2aZzGaZmWaZZmaZM2aZAGZm%2F2ZmzGZmmWZmZmZmM2ZmAGYz%2F2YzzGYzm |
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
def | |
# vim: ft=ruby expandtab sts=2 sw=2 |
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
" }}}2 ToggleTextOption {{{2 | |
" http://vim.wikia.com/wiki/Toggling_yes-no | |
function! ToggleTextOption() | |
let w = expand("<cword>") | |
call RegStash(1, '"') | normal yl | |
let c = @" | call RegStash(0, '"') | |
let pairs = [ | |
\ ["true", "false"], |
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
if (typeof gBrowser.treeStyleTab !== 'undefined') { | |
var ah = gBrowser.treeStyleTab.autoHide; | |
if (ah.expanded) { | |
ah.hide(ah.kSHOWN_BY_SHORTCUT); | |
} else { | |
ah.show(ah.kSHOWN_BY_SHORTCUT); | |
} | |
} | |
// issue: wrong splitter position when auto hide is not enabled. |
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
nnoremap <silent> <LocalLeader>K :DictSearch<CR> | |
xnoremap <silent> <LocalLeader>K :<C-U>call SaveReg()<CR>gvy:let b:temp_reg=@"<CR> | |
\ :call RestoreReg()<CR>:call DictSearch(b:temp_reg)<CR> | |
command! -nargs=* DictSearch call DictSearch(<f-args>) | |
command! -nargs=0 DictSearchOff call <SID>dict_search_off() | |
function! DictSearch(...) | |
let save_isk = &l:iskeyword | |
let &l:iskeyword = '@' | |
let word = a:0 > 0 ? a:1 : expand('<cword>') | |
let mode = a:0 > 1 ? a:2 : '' |
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
command! -nargs=* DictSearch call DictSearch(<f-args>) | |
" 來源:Dr.eye 字典 移動版 | |
" 例: http://www.dreye.com/mws/dict.php?w=word&ua=dc_cont | |
let s:dict_search_modes = { | |
\ 'keys': ['cont', 'var', 'phra', 'diff', 'der' ], | |
\ 'values': ['字義', '變化', '片語', '辨析', '衍生'] | |
\ } | |
function! DictSearch(...) | |
let word = a:0 > 0 ? a:1 : '' |
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
#!/bin/bash | |
# 安裝相依套件 | |
apt-get install mercurial | |
apt-get install exuberant-ctags | |
# 取得 vim source | |
cd /usr/local/src |
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
#!/bin/bash | |
if which apt-get 2>&1 >/dev/null; then | |
[[ -z $(dpkg --get-selections | grep libncursesw5-dev) ]] && sudo apt-get install -y libncursesw5-dev | |
elif which brew 2>&1 >/dev/null; then | |
brew install tig --with-docs | |
exit | |
fi | |