Skip to content

Instantly share code, notes, and snippets.

@mmcfarland
Last active December 4, 2017 16:21
Show Gist options
  • Save mmcfarland/cf8dba3a8a08dd9512fa7621c434555e to your computer and use it in GitHub Desktop.
Save mmcfarland/cf8dba3a8a08dd9512fa7621c434555e to your computer and use it in GitHub Desktop.
TSM: zsh vi bindings
# Readline in vi mode
bindkey -v
bindkey -s jj '\e'
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
[[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search
[[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search
bindkey "^R" history-incremental-search-backward
ogr2ogr -t_srs "epsg:4326" floodplains_2016.shp elev.gdb HCFCD_EffectiveFloodplains2016 

Navigate

  • jj/i(a)
  • f/t, w/e, 0/$

Edit

  • r
  • u
  • c*
  • d*

Command History

  • k/j

Existing behavior

  • ctrl-r
  • type + up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment