vim-stream

v0.2.2
Parse keystrokes into vim commands
vim lexer parser commands stream

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

npm i vim-stream

Metadata

  • ISC
  • Whatever
  • Drew Stokes
  • released 12/30/2020

Downloads

Maintainers