SublimeText / TrailingSpaces

Highlight trailing spaces and delete them in a flash.
MIT License
897 stars 94 forks source link

Doesn't seem to work with ST2 #77

Closed ghost closed 4 years ago

ghost commented 10 years ago

Hey, installed via Package Control and I don't see any highlighting showing up (nor does the delete trailing spaces command do anything - "no trailing spaces found").

revolunet commented 9 years ago

same here

jbrooksuk commented 9 years ago

What environment are you on? Which version of Sublime are you using? We need more info please.

revolunet commented 9 years ago

sorry. OSX 10.10, ST2 2.0.2 build 2221

jbrooksuk commented 9 years ago

I assume that you've restarted Sublime by now? Do you have any errors in the console?

revolunet commented 9 years ago

ok after a fresh restart the "remove trailing whitespaces on save" works but the highlight doesnt for some reason.

jbrooksuk commented 9 years ago

What colour scheme are you using?

revolunet commented 9 years ago

Monokai black

jbrooksuk commented 9 years ago

screen shot 2014-11-07 at 11 24 33

It could be that TrailingSpaces is no longer compatible with ST2? @FichteFoll I believe you fixed support in #33 - did something break since?

FichteFoll commented 9 years ago

Uhm, I don't know about that. I have, in fact, never used this plugin. A console traceback would be nice for debugging.

moloko commented 9 years ago

I had a similar issue - no highlighting, delete not working (on Win 7, ST 2 Build 2221, blackboard colour scheme) - but then after highlighting an area I knew to have trailing spaces it all started working!

only small complaint is that it also removes tab indentations from blank lines - but setting 'trailing_spaces_include_empty_lines' to false resolved this. just seems a little odd that it would include tabs...

nice plugin, thanks!

Honghe commented 9 years ago

not work on st2 too.

iamntz commented 9 years ago

Why not update to ST3? It's just a matter of time for plugin developers to ditch ST2...

jbrooksuk commented 9 years ago

I believe we've dropped support for ST2? Can anyone confirm @SublimeText/developers

FichteFoll commented 9 years ago
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 200, in on_selection_modified
    callback.__module__, "on_selection_modified", FAST_EVENT_TIMEOUT)
  File ".\sublime_plugin.py", line 154, in run_timed_function
    ret = f()
  File ".\sublime_plugin.py", line 199, in <lambda>
    run_timed_function(lambda: callback.on_selection_modified(v),
  File ".\trailing_spaces.py", line 416, in on_selection_modified
  File ".\trailing_spaces.py", line 129, in match_trailing_spaces
  File ".\trailing_spaces.py", line 92, in find_trailing_spaces
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Also, I'm sorry, but I made the package control messages view read only in wbond/package_control#893 so you won't be able to remove them as a kind of "introductory task". It's not yet merged though.

Edit: Due to the amount of tracebacks I also noticed that this is called when editing in the console. You should add some checks for that and exclude panels, console, output panels etc. Also, on_selection_modified is always run after on_modified so you can get rid of the latter.

Edit2: sublime.load_settings("trailing_spaces.sublime-settings").get("trailing_spaces_regexp") indeed returns None in the console, though I don't understand why. In fact, all the settings are None.

shellscape commented 8 years ago

anyone know what the last working version for ST2 is?

rchl commented 4 years ago

I'd consider ST2 no longer supported.

shellscape commented 4 years ago

Wow. Three years. Zombie issue!