Skip to content


Filter selected text/range of line and open the output in a Clam split #2

ms opened this Issue · 2 comments

2 participants

ms commented

I'd like to be able to do something like this (for example):

  1. Select some portion of my LaTeX file
  2. Run :'<'>Clam detex | wc
  3. Get the number of words in my selection

(In a nutshell, give the first command the selected text as stdin)

Currently I can do

A. Regular vim

  1. Select some portion of my LaTeX file
  2. Run :! detex|wc
  3. Check the output
  4. Undo

B. Clam

  1. Run :Clam cat % (or maybe if I'm clever use sed to get the right line right away)
  2. Delete the parts I don't want (if necessary)
  3. Run \p detex | wc

Thanks a lot!


Version 1.2.0 should cover this.

:Clam now supports a range of lines, and you can also use :ClamVisual to pipe in an exact visual selection if you need partial lines.

@sjl sjl closed this
ms commented

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.