vim-stream

Parse keystrokes into vim commands

Usage no npm install needed!

<script type="module">
  import vimStream from 'https://cdn.skypack.dev/vim-stream';
</script>

README

vim-stream

A through stream that filters and parses vim keystrokes

Build Status Donate
NPM

This module is highly experimental.

example

Simple parsing:

  echo "ifoo bar\x1b:wq" | vim-stream --noMeta
  i:wq

Quick frequency stats:

  cat ~/.vimlog | vim-stream --noMeta | \
    sed -e 's/\(.\)/\1\'

\n/g' | sort | uniq -c | sort -nr
  2835 k
  2827 j
  1307 l
   821 h
   152 w
   136 :
   114 d
   ...

setup

Track vim keystrokes by creating an alias that uses the scriptout flag:

  alias vim="vim -w ~/.vimlog"

This will write keystrokes to the supplied file when vim is closed.

options

noMeta

Exclude meta characters from output.

install

With npm do:

npm install vim-stream

for fun

You can now do crazy stuff like generate heatmaps of different keyboard layouts.. Heatmaps