AutoWrap
AutoWrap copied to clipboard
The new line isn't indented properly
When typing a comment like this:
# Make sure the HTTP response code is always 200. Codes should be sent by
And typing outside the wrap column, the result is this:
# Make sure the HTTP response code is always 200. Codes should be sent by
# the JSON response.
One would expect the result to be this:
# Make sure the HTTP response code is always 200. Codes should be sent by
# the JSON response.
And indeed, if one uses Alt+q to do the indentation rather than this plugin, the latter is the case.
Hi @Hubro, it should be fixed by now. Somehow Sublime does not indent comment correctly, so now I first indent the line and then comment the line.
I appreciate the quick response, but it unfortunately didn't work. I installed the most recent version from GitHub and checked the contents of the package to confirm that your fix was there.
That's strange, it works fine for me now..
Oopps..I can reproduce the issue now in some situations..
Ok, it seems that Sublime Text 3 caches packages even through reinstalls. Even though I installed your most recent version, Sublime Text 3 was still using the old, deleted one. Restarting the application fixed it. Things appear to be working now.
In which situations can you still reproduce this issue? i can confirm them if you'd like.
This one works
x = x + 1
# comment comment comment comment comment comment comment comment
y = y + 1
But this one do not
x = x + 1
# comment comment comment comment comment comment comment comment
y = y + 1
Though, it would be argued that the second case is not important.
Seems to work for me:
require "json"
# Foo bar baz woefijqpwefijqwpefijqwepfiqwj eopfij qweopfij qweopfijqw
module AddressKitServer
=>
require "json"
# Foo bar baz woefijqpwefijqwpefijqwepfiqwj eopfij qweopfij qweopfijqw
# feowij qpwoeijf qwpoefij qpoweif j
module AddressKitServer
It works for some languages such as Python, but not for some others such as C...
As the major issue has been solved, I will leave this minor issue for the future. I believe there is no quick fix for this one.
Could you perhaps use the wrap_lines
command already in Sublime Text instead of wrapping manually? It seems to work perfectly. Just execute it immediately when the user crosses the word wrap column.
You can test by disabling auto wrap, typing a line that crosses the text wrap column, then pressing alt+q
(on Windows).
I use it mostly for latex. But the default wrap_lines
function is very buggy in handling latex code. That's why I wrote this plugin.
How about using the default wrap_lines
in all cases except in latex code?
I will probably leave it as is for the moment. Thanks anyway for the comments.