Skip to content

Instantly share code, notes, and snippets.

@ishideo
Created October 20, 2017 01:38
Show Gist options
  • Save ishideo/6b9dc4e981b8c467e8a98b46efb46f47 to your computer and use it in GitHub Desktop.
Save ishideo/6b9dc4e981b8c467e8a98b46efb46f47 to your computer and use it in GitHub Desktop.
#!/bin/sh
vim -X -u NONE -c ':1 | /abc' -c '/xyz' -c '/123' -c 'normal! $vT y' -c ':redir! >> input.txt | silent! echo @0 | redir END | :q!' output.txt
vim -X -u NONE -c ':redir! >> output.txt | silent! echon "\n" | redir END | :q!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment