Skip to content

An alternative way to insert output from arbitrary shell commands in vis

Notifications You must be signed in to change notification settings

seifferth/vis-super-shellout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Vis Super Shellout

This is a plugin for vis. For further Information on plugins please refer to the wiki. To use this plugin simply download and add the following line to your visrc.lua:

require('super-shellout')

Super-shellout provides a custom version of the standard :< command, callable as :R (think of it as Read from shell command). The main reason for writing super-shellout was that :< would not work with the cite command I use for inserting citekeys into pandoc-markdown documents. The code was heavily inspired by Guillaume Chérel's vis-fzf-open.

:R differs from :< in the following aspects:

  • Stderr is released, so that commands run as :R command can use stderr for drawing user interfaces (like fzf and vis itself may do).
  • Trailing newline is removed. Most shell command output ends with \n. By automatically removing this character I can run commands like :R date in a more convenient manner.
  • The cursor will be placed at the end of the inserted text, not the beginning (as with :<).

About

An alternative way to insert output from arbitrary shell commands in vis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages