ameyp / CscopeSublime

A Cscope plugin for Sublime Text 2 and 3
89 stars 37 forks source link

Results page tweaks #9

Closed vanrijn closed 11 years ago

vanrijn commented 11 years ago

In comparing the results buffer for CscopeSublime to the Emacs/Cscope results buffer, I think the Emacs/Cscope results buffer is a little easier to read. Here's what it looks like:

cscope

Specifically, the Emacs buffer has:

1) A line at the top of the buffer that gives the user context. In this example, the search type was a "global definition" and the search criteria was "schedule".

2) An ASCII line separator ("-------"), separating the search criteria from the results. This helps to break up the results page a little and gives a clean separation, I feel.

3) The file that contains the search result is listed on its own line and is colored differently from the actual result text. All lines that match the search criteria appear on their own lines that list the line number as well as the actual matching text. If there are multiple matches in a single file, the file is listed once with the results listed individually below the file. I feel that this separation makes it a little easier to focus on the result text since the lines aren't as busy and the thing that you're looking for (the result text) is more to the left of the buffer since it's not being pushed to the right by the filename being on the same page.

I would like to help make these changes. Would you be open to them? And if you have any pointers on where I should start making changes, that would be greatly appreciated too, since I'm new to python, SublimeText, and ST plugins. =:)

Thanks again!!

vanrijn commented 11 years ago

Actually, I just realized that the default Sublime Text "Find in Files" results page is pretty close to what I'm looking for, I think.

Screen Shot 2013-03-10 at 2 31 14 PM

ameyp commented 11 years ago

How's this look?

find-results-new

ameyp commented 11 years ago

Or, even better, this:

find-results-new-2

Please sync to commit https://github.com/ameyp/CscopeSublime/commit/20c44510aff0e556d236ff1e9636f116fddcc2a7 and let me know if you'd like any more tweaks in it.

vanrijn commented 11 years ago

Holy cow, that is awesome!!!!! I can't wait to try this today! THANK YOU!!! =:)

ameyp commented 11 years ago

Heh, I was bored at work so thought I'd see if I could figure it out :)

I also found a way of outlining the match itself, as seen below, the way "Find in files" does but I don't know if it's better or not. To me it looks a bit cluttered, but I can also see how it would be helpful. Should I commit it or not?

find-results-new-3

vanrijn commented 11 years ago

Ooh! I am torn! How about making it default to that, but provide a setting to disable it? I'd say commit what you have and I can add the conditional check later if you want. Actually, I kind of like it, so maybe just use it like that for a while and see? =:)

ameyp commented 11 years ago

I like the settings idea, I'm doing that right now

vanrijn commented 11 years ago

You rock, Amey!

ameyp commented 11 years ago

Thanks Jason :)

Changes done with commit https://github.com/ameyp/CscopeSublime/commit/0999169b287770b79ae5a8b77f70d58482b1041a