SublimeText / WordHighlight

Highlight all copies of the currently selected word.
MIT License
180 stars 24 forks source link

Status Bar Message #11

Closed liamcain closed 12 years ago

liamcain commented 12 years ago

WordHighlight now indicates the number of occurrences of the selection in the sidebar.

adzenith commented 12 years ago

The indentation type has changed so I can't actually tell what the differences are. Can you resubmit and keep indentation how it was?

liamcain commented 12 years ago

Can't seem to figure out how to "edit" my pull request. Now the diff is all screwed up. I'm just going to open another issue.

liamcain commented 12 years ago

Nevermind. Is this file set to spaces or tabs?

adzenith commented 12 years ago

Alright, I still can't see the diff because both commits change the entire file's indentation. I'm just gonna pull your branch, squash those two commits together, and then push it myself. Sound good?

adzenith commented 12 years ago

Also, I think it was tabs.

liamcain commented 12 years ago

Alright. Sorry about that. I'm really making a mess of git :/

adzenith commented 12 years ago

Haha don't worry about it! I just pushed the status-bar thing, so that's good to go. I'd like to push the selection thing, too, but I'd like to chat about it for a second first: I think it would be nice to not have the "else" part of the highlight-all command add a newline. I think this was done so that a keybinding of alt+enter would do the "right" thing if there were no highlights, but I'm just wondering if there's not a better way. For example, what if my keybinding is something else? I probably don't want a newline added if I don't have any highlights.

liamcain commented 12 years ago

Good point. If someone were to set the keybinding to let's say, ctrl+alt+j, if nothing is selected, nothing should happen. That's why alt+enter is unusual. Because ST2 wants it to behave like enter. Not sure of a workaround there.

liamcain commented 12 years ago

Nevermind. I figured it out. I just added a context to the keybinding; selection cannot be empty :) I'll commit in a sec

adzenith commented 12 years ago

Cool. I also edited your commit and make a new pull request if you want to check it out. https://github.com/SublimeText/WordHighlight/pull/12