edit-in-vim

Edit a string in the default editor and get the result from your CLI app.

Usage no npm install needed!

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

README

var edit = require('edit-in-vim')
var result = edit('placeholder string')

/*
  the user is redirected to their default editor which will show a file containing
  the string "placeholder string".

  suppose he replaces that with the name of his favorite food: "chocolate"
*/

console.log(result) // will output "chocolate"
npm install --save edit-in-vim