Dine kommentarer

FYI, you can already do this. See http://docs.sublimetext.info/en/sublime-text-2/file_management/file_management.html#project-definitions


Specifying a "name" attribute in the project file will make the folder display this name instead of the detfault.

Probably because you can write syntax definitions on your own. Not sure if userecho is the right place for package requests.

No, it just marks ZWSP characters with add_regions. Precisely, it paints their backgrounds but since they have zero width it just inserts a line in your string color. Just make sure that you fix the indentation and unindent after "break" because userecho messed up indentation and this is crutial with Python.

Iirc it saves stuff offline so it can be used offline once loaded (this is only possible with Chrome to my knowledge).

import sublime_plugin


class ShowZeroWidthSpace(sublime_plugin.EventListener):
  def on_modified(self, view):
  spaces = []
  p = 0
  while 1:
  s = view.find(u'\u200b', p + 1)
  if not s:
  break
  spaces.append(s)
  p = s.a

  if spaces:
  view.add_regions("zero-width", spaces, "string")
  else:
  view.erase_regions("zero-width")

Should work well enough. No feature to disable so be careful with editing large files (with many zero-width whitespaces).

Do you have write access to the path you are saving to? Did you use "save as"?

I see what you mean. Well, it wasn't really clear from the initial request, thus my misunderstanding.


Anyway, you can implement this by modifying "exec.py" in the Default package which is usually called when building. If you need more details on implementation, just ask.

There is a setting called "indent_to_bracket" which provides the mentioned "(" alignment behaviour.


Other than that I never really had problems with how indenting works except for "[\n" where I managed it to make it do the same as for "{\n".



Kundesupport af UserEcho