Add commands for usual text

Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

>> word-wrap should be based on the right margin
It is made: change in Options Editor plugin, option wrap_mode
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

3 break styles: blank line = ok, indent / EOL = ???
How justify commands can work with EOL breaks? they cannot. they make multiline text. So kvichans says only blankline will be supported.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

CudaExt is updated in Github. Call Plugins/ Addon Manager/ Install from github,
enter url https://github.com/kvichans/cuda_ext

Test new commands in F1 dialog:
+1.3.10 (2017-07-18)
+added: commands "Go to Beginning/End of Paragraph", "Go to Next/Prev Paragraph"
+added: commands "Align paragraph***"

4 paragraph types can be used:
set 3 options in command "Align paragraph: Configure"
- r-margin
- indent of 1st line
- indent of other lines

Is it OK?
User avatar
kvichans
Posts: 203
Joined: 07.10.2012 05:45

Post by kvichans »

Hi, qwerky.

1. New commands:
- Go to Beginning/End of Paragraph, Go to Next/Prev Paragraph
- Align paragraph(s): Configure..., Align paragraph(s): Left/Right/Center/Fully justify

2. These commands are testing.
If you want to try then update plugin cuda_ext directly from Github:
- Call menu Plugins--Addon Man--Install from from Github
- Enter "https://github.com/kvichans/cuda_ext" (without quotes)

3. About GoTos
Go to Beginning/End of Paragraph very usefull. (I will often call its. Thanks!)
- If caret is already at End then Go to End moves caret to End of next paragraph.
- If caret is already at Begin - Go to Beginning moves to prev.

4. About Align
No paragraph's types. All alignments are configured with three options by Align paragraph(s): Configure...
- Right margin (=Max column)
- Indent for first line of a paragraph
- Indent for other lines of a paragraph
The commands work with paragraphs which have intersection with selection.
Last paragraph line stays Left justified when whole paragraph is Fully justified.
CudaText 1.163, TC9.51x32, Win10x64(1920x1080)
qwerky
Posts: 172
Joined: 21.10.2013 00:58

Post by qwerky »

Wow! You guys are really doing a great job :D !! Your paragraph implementation is really nice.
kvichans wrote:3. About GoTos
Go to Beginning/End of Paragraph very usefull. (I will often call its. Thanks!)
- If caret is already at End then Go to End moves caret to End of next paragraph.
- If caret is already at Begin - Go to Beginning moves to prev.
That is just the way it should be--excellent!
4. About Align
No paragraph's types. All alignments are configured with three options by Align paragraph(s): Configure...
- Right margin (=Max column)
- Indent for first line of a paragraph
- Indent for other lines of a paragraph
The commands work with paragraphs which have intersection with selection.
That is a very interesting way of doing it--I like it a lot :) .
Last paragraph line stays Left justified when whole paragraph is Fully justified.
Sorry, I should have mentioned this previously--but you got it exactly right!

There is one big problem though, which should not be difficult to correct: After formatting a paragraph (whether left, right, center, or full), all punctuation is gone! Only the word-characters remain.

A suggestion: Generate a large Lorem Ipsum paragraph, and then full-format it. Notice that on each line, the extra (padding) spaces begin from the left end. See how the paragraph appears a little lopsided, since there is much more white-space on the left side than on the right. It would be nice if the spaces were added from the right end of the first line, from the left end of the second line, and so on... to generalize, add the spaces from the right end in odd-numbered lines, and from the left end in even-numbered lines, where line numbers here refer to the number of lines in the paragraph--not the line numbers shown in the gutter. The first line of a paragraph should always begin the padding from the right end, so that it is less visible.

Perhaps there may be more ideas as we work with this, but this is already a very good implementation. Thanks!
User avatar
kvichans
Posts: 203
Joined: 07.10.2012 05:45

Post by kvichans »

"punctuation" fixed
CudaText 1.163, TC9.51x32, Win10x64(1920x1080)
qwerky
Posts: 172
Joined: 21.10.2013 00:58

Post by qwerky »

kvichans wrote:"punctuation" fixed
Works good. Thanks.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

You can mention in the review that we added 8 paragraph cmds :)
qwerky
Posts: 172
Joined: 21.10.2013 00:58

Post by qwerky »

Alexey wrote:>> word-wrap should be based on the right margin
It is made: change in Options Editor plugin, option wrap_mode
Set wrap-mode = 2 (right margin), and look at a file with wrapping turned on: it is okay, wrapped at right margin. Now press hotkey to turn wrapping off; okay. Now press hotkey to turn wrapping on--it turns on to wrap-mode = 1 (screen edge). No way to get it back to right margin. Also, wrap-mode = 1 is written to the history file, so even reloading file won't get it back to right margin.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

What do you suggest: that "toggle wrap mode" does loop 0/1/2 ?
Post Reply