Coder Social home page Coder Social logo

sublime-filterlines's People

Contributors

cibinmathew avatar colinng avatar davidpeckham avatar gene1wood avatar grayhare avatar jfcherng avatar poma avatar schlamar avatar timothyaaron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sublime-filterlines's Issues

Filter Lines not work

Filter Lines always match with last line.

For example, I have following text.

foo
bar
hello

Filter With String with "foo".

Filter Result

hello

I'm using

  • SublimeText version 2.0.2, Build 2221
  • FilterLines version 2014.05.12.06.23.19

Could you tell me why filtering is not work ?

Matching over several lines

I want to match

"documentType": {
    "id": 72
}

and started playing with '"documentType": {\n' as a regex. That, however, returns an empty list of results.

Note: the built-in regex search of sublime text matches the above string with the regex '"documentType": {\n.*\n\s+}'

How to go about matching multiple lines in a document?

Thanks in advance!

Shortcut suggestion

"Ctrl+F" prefix is not a good idea since it disables normal Ctrl+F (You have to press Ctrl+FF in this case). My suggestion would be like this:

[  
    { "keys": ["ctrl+k", "ctrl+e"], "command": "filter_to_lines", "args": { "search_type": "regex" } },
    { "keys": ["ctrl+k", "ctrl+f"], "command": "filter_to_lines", "args": { "search_type": "string" } },
    { "keys": ["ctrl+k", "ctrl+r"], "command": "fold_to_lines", "args": { "search_type": "regex" } },
    { "keys": ["ctrl+k", "ctrl+s"], "command": "fold_to_lines", "args": { "search_type": "string" } }
] 

Add the search term to the new tab's title

Hi,

Great plugin! I'm using it a lot.

Lot's of time - I run several different filters on one file and I have all the filter tabs in the same window. As you can see - all filter tabs have the same title - "Filter Results".

It would be extremely helpful if each tab's title would contain the search term. This would enable the user to switch to the right tab from the filter tabs much easier.

thanks!
Screen Shot 2020-01-08 at 12 09 38 PM

Port to Visual Studio Code

Hi!

Thank you for this useful extension.

I find it very handy, but these days I mostly use Visual Studio Code, so I decided to port it.
In case you also use Visual Studio Code and want to give my port a try, here are some relevant links:

Feedback is welcome! There is a couple of ways to share your thoughts, suggestions and bug reports:

P.S. You can close this issue.

Fold or filter to lines not matching the search string

Plugin currently behaves likes this:

Remove/fold everything that's not what I enter

Maybe it would be more helpful like this:

Remove/fold what I enter

An example use case:
I am viewing a log file. There are error lines which is type A. I know they are trivial, so I want to hide them and check other errors. Then I notice there are B type error lines and they are trivial too. Hide them, too. And so on. This way I can analyze the whole log file and there is no way to miss an important single line.

Let's discus on this :)

Enable folding through a preference

Filtering is the most important use case for Filter Lines. Folding, while very useful, is secondary, so to simplify the user experience, hide fold commands and menus by default, and enable them with a preference.

it is not clear how to install it

You don't give any instructions on how to install this plugin.

Searching the internet for "how to install a sublime package" mostly explains how to use package manager, which is already extremely obvious but does not help me.

Searching the internet for "how to install a sublime package without package manager" leads me to a rabbit hole of forums which don't immediately provide any illuminating answers about what to do with your files from github.

thanks.

Enhancement to result

Firstly thanks for creating this useful package.

The result is currently being copied into a read-only buffer from what I can see. It would be a lot more useful IMO if the results were placed on a view of the original buffer that could accept edits.

Then you could have a scenario where you could run your filter on the original file; make changes to the filtered view that would then propogate back to the original file. Magic!

'Filter Results' tab is always empty

I've tried this extension on several types of files, specifically the option Filter lines: Include lines with Strings and it always opens an empty Filter Results tab.

Sublime Text 3 Build 3126, elementary OS (based on ubuntu 16.04, 64 bit)

improper fold when two matches are adjcent

Hi !

      I really appreciate your work!  The pattern-match folding  helps me a lot when reading long Fortran programs, although I find sth not so well.  I spend about 2h and find 

one solution.

ISSUE: If two matches are adjcent, therewill be improper behavior. When you expect no folding in this situation, FilterLines actually fold inside "..." one of the two matches.

Solution: Change a tiny bit in fold_to_lines_command.py
Line71 if matched and folds:
self.fold_regions(folds)
folds = []
else: (---------> elif not matched: )
folds.append(line)

Nice job, FilterLines.

Feature Request: Allow for Custom Filter/Folding Expressions

Hi,
first of all thank you for your plugin which I find very useful. I am very frequently using a certain regular filter expression, and want to create a (keyboard or menu) shortcut which calls the folding command with this expression predefined. It would be great if the command would accept some such string as one if its parameters.
I am totally unexperienced in python, so I will not be able to try this myself very soon...

How about filter as you type

Right now you have to press enter for it to work. With simple strings it should be straight forward to make the filter results auto update. With regex, maybe it's worth verifying the regex is valid before running it or watching out for performance if it is a big file/slow regex, but in any case it would make the plugin alot more useful I think, because right now if you want to try multiple strings you need to switch back to the original file every time.

Installation instructions

Thanks for the awesome plugin!

But I just thought I'd suggest that you add install instructions. You're plugin is the #1 google hit for "sublime text filter" but I had to go find another one that had install instructions. I'm a dev but not a Sublime text pro, and in general I'm too busy to spend more than a couple of mins on stuff like this.

But not too busy to give you a tip to help your repo get more installs! ;) Because these contribs are so valuable. Thanks again, just a suggestion.

Line indentation via keyboard shortcuts is broken

For some reason, when sublime-filterlines is enabled, I can't line indent in Sublime Text 3 in OS X, using keyboard shortcuts.

So CMD + ] and CMD + [ does not work.

Works again after disabling the package. Any ideas how to mitigate this?

Filtering options are greyed out / disabled except for folding options

I have used this plugin for quite a while and it is great!

But today I tried to use it and strangely when I did Ctrl-Shift-P, the only filtering actions that were in the actions menu were the ones to do with Folding. These are not useful to me, I only use the "include lines" and "exclude lines" actions, but these are for some reason not available.

I can see the options that I want to use under Edit-->Line but they are greyed out, and it is not clear why.

There's nothing too unusual about the text file that I'm trying to use it on, I have tried a few files.

I uninstalled the package and reinstalled using package control, but still have the same problem.

Don't overwrite buffer

It'd be nice to have the option to not overwrite the buffer, and maybe collapse all lines that don't contain the search? I was hoping to be able to use it to quickly check/edit lines that contain a pattern :)

Filter Multiple strings

Hello,

this plugin is very handy to me and imho it's one of the few things ST miss. It would be nice to add the ability to search for multiplie strings i.e.

filter for: oranges ; apples ; bananas and separate them by colors :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.