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
let g:ref_no_default_key_mappings = 1 | |
nnoremap <silent> K :<C-u>call Ref('normal')<CR> | |
vnoremap <silent> K :<C-u>call Ref('visual')<CR> | |
function! Ref(mode) | |
if &filetype ==# 'vim' | |
execute 'silent! help ' . expand("<cword>") | |
"execute 'help index| tj /' . expand("<cword>") | |
if &filetype !=# 'help' | |
echo 'No entry' |
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
" Tab management utility. | |
let s:save_cpo = &cpo | |
set cpo&vim | |
function! s:any(list, item) | |
for i in a:list | |
if type(i) == type(a:item) && i == a:item | |
return 1 | |
endif |
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
# Factorize last two arguments of command line. | |
# | |
# Example: | |
# % a.zsh b.zsh | |
# (factorize-last-two-args) | |
# % {a,b}.zsh | |
# | |
# To use this: | |
# autoload -U factorize-last-two-args | |
# zle -N factorize-last-two-args |
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
function! ReorganizeTabs(only) | |
let tablists = [] | |
let bufs = {} | |
tabfirst | |
let tabnr = 1 | |
while type(tabpagebuflist(tabnr)) == type([]) | |
let tablist = tabpagebuflist(tabnr) |
NewerOlder