Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 07-31-2018, 01:20 PM   #1
Sam Sahara
Enthusiast
Sam Sahara began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Aug 2014
Device: lambda k21
[request] New feature about text selection

Hallo Kovid.

The scenario is: a huge html file to manage, 30000 lines long; I have to run a regex on a certain quote of the file, say from line 33 to line 12612. I have to click on line 33, then shift the cursor through the file up to line 12612, and only then release the mouse button, Alt-Shift-M to mark the region, run the regex.

But selecting such a big chunk of text lines is very difficult and prone to errors.

A useful feature to solve the problem would are two html editor commands:

Code:
right-click -> select -> begin
to mark the point from where start the selection;

Code:
right-click -> select -> end
to mark the point to where end the selection.

In the case above I should go to line 33, right-click -> select -> begin, then slowly and comfortably go up to line 12612, right-click -> select -> end, Alt-Shift-M, and finally run the regex.

A much more useful version of the same feature (but a bit more complex) would be the ability to select the start and the end of the region via a regex, a command like: "select from the line that match the regex "A" up to the line that match the regex "B"".

ss

Last edited by Sam Sahara; 07-31-2018 at 02:05 PM.
Sam Sahara is offline   Reply With Quote
Old 07-31-2018, 05:33 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,219
Karma: 10205092
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Since you want to use a regexp to select a region to use another regexp on anyway just modify the search/replace regexp it to only match the region of interest. And note that you can press Ctrl+. to jump to any line number (although that will not help with marking).
kovidgoyal is offline   Reply With Quote
Old 07-31-2018, 08:00 PM   #3
retiredbiker
Enthusiast
retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.
 
retiredbiker's Avatar
 
Posts: 45
Karma: 29896
Join Date: May 2013
Device: Kindle KB, Oasis, Ubuntu, Jutoh
Why not just put the cursor at the start of the text you want, release mouse, go down to the end of the desired text, and shift-click? This is how I always select large sections.
retiredbiker is offline   Reply With Quote
Reply

Tags
editor, regex, select text

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature request: accented characters and plain-text copy & paste holymadness Library Management 3 07-15-2014 02:47 PM
A wee request regarding search notification (and file selection) sherman Editor 1 04-06-2014 10:50 AM
Feature request, unlock text color. bizzybody Conversion 2 10-23-2011 12:05 AM
Feature request: full text search Laisvunas EPUBReader 3 04-03-2011 11:47 AM
Feature request for formatting text speakingtohe Calibre 0 08-06-2010 11:17 PM


All times are GMT -4. The time now is 05:28 PM.


MobileRead.com is a privately owned, operated and funded community.