Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --select-lines option #127

Open
bkuhlmann opened this issue Nov 10, 2020 · 0 comments
Open

Add --select-lines option #127

bkuhlmann opened this issue Nov 10, 2020 · 0 comments

Comments

@bkuhlmann
Copy link

bkuhlmann commented Nov 10, 2020

Overview

Would it be possible to allow Silicon to specify the lines of a file to screenshot in addition to the lines highlighted? I ask because I often find I want to select a snippet of code for illustration and sharing but also highlight maybe a line or two within the selected lines.

Screenshots/Screencasts

Firefox-xdgenvironment rb at master · bkuhlmannxdg-Xkw0X6IP

Steps to Recreate

At the moment, I have to do the following:

  1. Copy Lines 11-13 to a file called snippet.rb.
  2. Run: silicon --language rb --highlight-lines 2 --to-clipboard snippet.rb
  3. Run: rm -f snippet.rb.

Example result (with a few more options thrown in not shown above):

image

Desired Behavior

It would be neat to simplify the steps presented above to a single step. Example:

  1. Run: silicon --language rb --select-lines 11-13 --highlight-lines 12 --to-clipboard lib/xdg/environment.rb

It could also be handy to have an option for --line-count-start 1 in case someone didn't want the count to start at 11 from the original source but start at 1 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant