Menu

#178 Add option to display lines of context

New
nobody
None
Medium
Enhancement
2015-02-08
2011-03-28
Anonymous
No

Originally created by: torgers...@gmail.com

What version of the product are you using? On what operating system?
Windows 7. GrepWin 1.5.1.341

Please provide any additional information below.
Would like to request the addition of an option to display lines of context around search result like GNU grep provides with:

Context control:
  -B, --before-context=NUM  print NUM lines of leading context
  -A, --after-context=NUM   print NUM lines of trailing context
  -C, --context=NUM         print NUM lines of output context
  -NUM                      same as --context=NUM

Use radio button to enable and text field to specify number of lines. Choice

Related

Tickets: #253

Discussion

  • Anonymous

    Anonymous - 2011-03-28

    Originally posted by: torgers...@gmail.com

    Should be request for Enhancement but could not change type

     
  • Anonymous

    Anonymous - 2011-03-28

    Originally posted by: tortoisesvn

    (No comment was entered for this change.)

    Labels: -Type-Defect Type-Enhancement

     
  • Anonymous

    Anonymous - 2012-06-07

    Originally posted by: wolfpeu...@gmail.com

    Issue 280 relates to limited space in "Content" mode (a matter of the chosen widget?)

     

    Related

    Tickets: #280

  • Anonymous

    Anonymous - 2013-10-04

    Originally posted by: JBarrett...@gmail.com

    You can do this by adding .*\r\n.*\r\n.*r\n for multiple lines, before and after your query; a bit hacky, but handy a lot of the time.

     
  • Anonymous

    Anonymous - 2013-12-04

    Originally posted by: helder.magalhaes

    Windows Grep implements this quite handy behavior. While displaying the results it allows to select anywhere between 1 and 5 (before and after) lines of context (uses the "preview pane" concept).

    I'd propose that such settings to be placed into the recently introduced "Settings" dialog, as it's much more comfortable for most users than changing command-line parameters. Plus, it should be able to change the behavior in a given instance without affecting the other instances (I'd probably want context only for a small subset of searches, for the remaining I'd still use a single line for performance in a replace operation, for example).

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.