Skip to content

Instantly share code, notes, and snippets.

@danr
Last active December 14, 2018 16:56
Show Gist options
  • Save danr/78e0005b3f732f18c12d757a7c6fb16c to your computer and use it in GitHub Desktop.
Save danr/78e0005b3f732f18c12d757a7c6fb16c to your computer and use it in GitHub Desktop.
def tabsearch -params 1 %{
define-command -allow-override next "exec \"%arg{1}\%reg{/}\""
map global prompt <tab> <ret>:next<ret>
exec %arg{1}
}
def colon %{
map global prompt <tab> <tab>
exec :
}
map global normal / ':tabsearch /<ret>'
map global normal ? ':tabsearch ?<ret>'
map global normal <a-/> ':tabsearch <lt>-/><ret>'
map global normal <a-?> ':tabsearch <lt>-?><ret>'
map global normal : :colon<ret>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment