duydao / Text-Pastry

Extend the power of multiple selections in Sublime Text. Modify selections, insert numeric sequences, incremental numbers, generate uuids, date ranges, insert continuously from a word list and more.
MIT License
830 stars 46 forks source link

add selection max limit #65

Closed hgaibor closed 5 years ago

hgaibor commented 6 years ago

It seems there is a maximum limit of the iterations the add TEXT command does.

Some times it selects 70 lines that contain that text, others, 80 or maximum 146

I tried to use this in a log file with 144098 lines, what is the maximum lines limit for selecting specific text ?

duydao commented 5 years ago

@himura-hg There is no code limitation, but certainly there is a limitation regarding memory. I will check the implementation. How big is your file?

hgaibor commented 5 years ago

Hello @duydao thanks for following up, I have seen this issue with files ranging from 6K to 40K lines, I mostly used the Text-Pastry to add and highlight several similar lines that are repetitive in log files and to remove them or do operations with them.

This does not occurs for example if at the same file I use Sublime's built in find and use regular expression to attempt to replicate similar behavior.

duydao commented 5 years ago

Hi @himura-hg, there is indeed a configurable file size limitation for that feature. You can change it by creating TextPastrySelection.sublime-settings in your user directory (Browse Packages -> User) and setting the threshold value. The value represents megabytes:

{
    "preview_file_size_threshold": 100
}

Thanks for using text pastry!