Sublime Forum

Question about word wrapping

#1

i am new to sublime text2 , could you tell me that is there any way to wrap line(as praragraph) like this way below(thanks very much):

“----” as indentation

(line 001)text text text text text text text text text 80
(the line been wrapped)text text text text text text 80
(the line been wrapped)text text text text text text 80
(the line been wrapped)text text text text text text 80
(the line been wrapped)text text text text(one line end)
----(line 002)text text text text text text text text text 80
----(the line been wrapped)text text text text text text 80
----(the line been wrapped)text text text text text text 80
----(the line been wrapped)text text text text text text 80
----(the line been wrapped)text text text text(one line end)
--------(line 003)text text text text text text text text text 80
--------(the line been wrapped)text text text text text text 80
--------(the line been wrapped)text text text text text text 80
--------(the line been wrapped)text text text text text text 80
--------(the line been wrapped)text text text text(one line end)
------------(line 004)text text text text text text text text text 80
------------(the line been wrapped)text text text text text text 80
------------(the line been wrapped)text text text text text text 80
------------(the line been wrapped)text text text text text text 80
------------(the line been wrapped)text text text text text text 80
------------(the line been wrapped)text text text text(one line end)
----------------(line 005)text text text text text text text text text 80
----------------(the line been wrapped)text text text text text text 80
----------------(the line been wrapped)text text text text text text 80
----------------(the line been wrapped)text text text text text text 80
----------------(the line been wrapped)text text text text text text 80
----------------(the line been wrapped)text text text text(one line end)
--------------------(line 006)text text text text text text text text text 80
--------------------(the line been wrapped)text text text text text text 80
--------------------(the line been wrapped)text text text text text text 80
--------------------(the line been wrapped)text text text text text text 80
--------------------(the line been wrapped)text text text text text text 80
--------------------(the line been wrapped)text text text text(one line end)

0 Likes

#2

Sorry, it’s probably due to my limited knowledge of English, but I didn’t understand your question.
Could you please give us an explication, not only an example ?

0 Likes

#3

I guess he wants word wrap to be done at column 80, related to the current indent, not from column 0.

Yestalk: please add few more threads. Two with the same content is not enough…

0 Likes

#4

yes, buddy-upstairs, you have refined exactly what i meant: wrap each line(one line as one paragraph) in n characters relatively to the indent(not 4 spaces), is there any way to do so?

0 Likes

#5

I believe it would/may be possible to do this with a shortcut key that runs a TextCommand, but not with a simple word-wrap setting.

The Edit menu, Wrap command allows us to wrap different paragraphs at different column numbers. Presumably, these menu options run a Command, but we/you need to find the name of this command firstly.

But, on second thoughts, is word-wrapping really appropriate for this? Having tabs at the beginning of each line seems to contradict the purpose of word-wrapping :question:

0 Likes

#6

it is not what i meant -----“the editMenu—>wrap”.

what i mean is, wrap a line visually(it well be still a line),not physically by adding “\r\n”.

their could be two purpose that make you feel missing the piont which i think is important:

1.the view-wrap has the purpose of visual convenient.

2.the indent make the doc have structure between lines(paragraphs), what does those structure mean depend on others(app,person,definition)how to interpret it.

0 Likes

#7

please,don’t sink.

0 Likes

#8

I see this thread is quite old, but I too would love a feature like this. Soft word wrap is very nice for making comments in my code more readable by organizing it into a block-style paragraph. I personally prefer a paragraph width of about a 100 characters, but as I indent my code more and more, the space before the wrapping point becomes smaller and smaller, 80, 60, 40, etc, until at some point it’s actually making the comments harder to read rather than easier.

My only options becomes to either set the word-wrap distance absurdly high to account for indented situations, or use hard word wrapping to manually fix the length of the comments to be the correct paragraph length regardless of context.

0 Likes