Add commands for usual text
Add commands for usual text
CudaText (and SynWrite) is primarily a programmer's editor, and those features are great. There are, of course, some features which are valuable both for programmers and for writers. But the editor would have much broader appeal if, in addition to what is already there, it were given more writer's features. I'm not suggesting it become a full-fledged writer's editor, but that it become more centered, as a general-purpose editor. A good starting point would be some of the following features:
1. Navigation. Functions/Hotkeys to:
a. Goto Beginning of Paragraph
b. Goto End of Paragraph
c. Goto Previous Paragraph
d. Goto Next Paragraph.
2. Formatting/Justification. The ability to format/justify paragraphs in various ways, either live (as editing occurs) or on command. Formatting would include:
a. Indented paragraphs
b. Outdented/hanging paragraphs
c. Non-indented paragraphs
d. Block-indented paragraphs.
Justification would include:
a. Left justified (smooth left edge, ragged right edge)
b. Right justified (ragged left edge, smooth right edge)
c. Center justified (ragged left/right edge)
d. Fully justified (smooth left/right edge)
3. Spell Checking. SynWrite at one time included a live (non-plugin) spell-checker, which I used frequently. It had great performance, and is exactly the type of feature needed in CudaText. (The current spell-check plugin seems not to work, at least for 64-bit version.)
These are just some initial thoughts. If there are other writer-users who read these forums, I'm sure each will have his own ideas as well.
1. Navigation. Functions/Hotkeys to:
a. Goto Beginning of Paragraph
b. Goto End of Paragraph
c. Goto Previous Paragraph
d. Goto Next Paragraph.
2. Formatting/Justification. The ability to format/justify paragraphs in various ways, either live (as editing occurs) or on command. Formatting would include:
a. Indented paragraphs
b. Outdented/hanging paragraphs
c. Non-indented paragraphs
d. Block-indented paragraphs.
Justification would include:
a. Left justified (smooth left edge, ragged right edge)
b. Right justified (ragged left edge, smooth right edge)
c. Center justified (ragged left/right edge)
d. Fully justified (smooth left/right edge)
3. Spell Checking. SynWrite at one time included a live (non-plugin) spell-checker, which I used frequently. It had great performance, and is exactly the type of feature needed in CudaText. (The current spell-check plugin seems not to work, at least for 64-bit version.)
These are just some initial thoughts. If there are other writer-users who read these forums, I'm sure each will have his own ideas as well.
Okay.Alexey wrote:4 types of paragraphs above.
I dont know what it means.
Give examples (in quoted blocks) of all types of paragraphs: hanging, indented...
An indented paragraph, sometimes called first-line indent, often considered a 'normal' paragraph:
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies sagittis
orci, nec consequat dolor consequat ac. Nulla eleifend rutrum semper. Sed fringilla,
ligula eu gravida tempor, quam magna blandit dolor, quis imperdiet sapien erat eu nibh.
Nunc rutrum pulvinar nulla in facilisis. Quisque feugiat purus in leo condimentum non
congue eros consectetur. Praesent dictum consequat nulla, bibendum rhoncus enim
adipiscing et. Pellentesque mi tellus, ornare id mattis ac, sollicitudin a erat. Maecenas
sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies sagittis orci,
nec consequat dolor consequat ac. Nulla eleifend rutrum semper. Sed fringilla,
ligula eu gravida tempor, quam magna blandit dolor, quis imperdiet sapien erat eu
nibh. Nunc rutrum pulvinar nulla in facilisis. Quisque feugiat purus in leo
condimentum non congue eros consectetur. Praesent dictum consequat nulla,
bibendum rhoncus enim adipiscing et. Pellentesque mi tellus, ornare id mattis ac,
sollicitudin a erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies sagittis orci,
nec consequat dolor consequat ac. Nulla eleifend rutrum semper. Sed fringilla, ligula
eu gravida tempor, quam magna blandit dolor, quis imperdiet sapien erat eu nibh. Nunc
rutrum pulvinar nulla in facilisis. Quisque feugiat purus in leo condimentum non congue
eros consectetur. Praesent dictum consequat nulla, bibendum rhoncus enim adipiscing
et. Pellentesque mi tellus, ornare id mattis ac, sollicitudin a erat. Maecenas sit amet
vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies sagittis
orci, nec consequat dolor consequat ac. Nulla eleifend rutrum semper. Sed
fringilla, ligula eu gravida tempor, quam magna blandit dolor, quis imperdiet sapien
erat eu nibh. Nunc rutrum pulvinar nulla in facilisis. Quisque feugiat purus in leo
condimentum non congue eros consectetur. Praesent dictum consequat nulla,
bibendum rhoncus enim adipiscing et. Pellentesque mi tellus, ornare id mattis ac,
sollicitudin a erat. Maecenas sit amet vehicula odio.
A command, when issued, must reformat the paragraph, based on the right margin, to match whichever paragraph style is being used. Alternatively, the formatting may be 'live'; i.e. it is reformatted with each keystroke.And tell what a cmd must do to a paragraph.
Notice that all of the paragraphs above are left-justified: the left edge (apart from indent) is smooth, while the right edge is ragged.
Here is an outdented/hanging paragraph that is right-justified (right edge smooth, left edge ragged):
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies sagittis orci,
nec consequat dolor consequat ac. Nulla eleifend rutrum semper. Sed fringilla,
ligula eu gravida tempor, quam magna blandit dolor, quis imperdiet sapien erat eu
nibh. Nunc rutrum pulvinar nulla in facilisis. Quisque feugiat purus in leo
condimentum non congue eros consectetur. Praesent dictum consequat nulla,
bibendum rhoncus enim adipiscing et. Pellentesque mi tellus, ornare id mattis ac,
sollicitudin a erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies sagittis
orci, nec consequat dolor consequat ac. Nulla eleifend rutrum semper. Sed
fringilla, ligula eu gravida tempor, quam magna blandit dolor, quis imperdiet sapien
erat eu nibh. Nunc rutrum pulvinar nulla in facilisis. Quisque feugiat purus in leo
condimentum non congue eros consectetur. Praesent dictum consequat nulla,
bibendum rhoncus enim adipiscing et. Pellentesque mi tellus, ornare id mattis ac,
sollicitudin a erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies sagittis
orci, nec consequat dolor consequat ac. Nulla eleifend rutrum semper. Sed
fringilla, ligula eu gravida tempor, quam magna blandit dolor, quis imperdiet sapien
erat eu nibh. Nunc rutrum pulvinar nulla in facilisis. Quisque feugiat purus in leo
condimentum non congue eros consectetur. Praesent dictum consequat nulla,
bibendum rhoncus enim adipiscing et. Pellentesque mi tellus, ornare id mattis ac,
sollicitudin a erat. Maecenas sit amet vehicula odio.
Okay. A normal, indented paragraph should have the first line indented as compared to the other lines. This makes sense with left- or full-justification. With right-justification, the first line can still be indented more than the others, but that is subjective.Alexey wrote:How indented/outdented types- work with right/center align?
pls example in monospaced fonts (type in Cuda, paste here).
Left:
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies
sagittis orci, nec consequat dolor consequat ac. Nulla eleifend rutrum semper.
Sed fringilla, ligula eu gravida tempor, quam magna blandit dolor, quis
imperdiet sapien erat eu nibh. Nunc rutrum pulvinar nulla in facilisis.
Quisque feugiat purus in leo condimentum non congue eros consectetur. Praesent
dictum consequat nulla, bibendum rhoncus enim adipiscing et. Pellentesque mi
tellus, ornare id mattis ac, sollicitudin a erat. Maecenas sit amet vehicula
odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies
sagittis orci, nec consequat dolor consequat ac. Nulla eleifend rutrum semper.
Sed fringilla, ligula eu gravida tempor, quam magna blandit dolor, quis
imperdiet sapien erat eu nibh. Nunc rutrum pulvinar nulla in facilisis.
Quisque feugiat purus in leo condimentum non congue eros consectetur. Praesent
dictum consequat nulla, bibendum rhoncus enim adipiscing et. Pellentesque mi
tellus, ornare id mattis ac, sollicitudin a erat. Maecenas sit amet vehicula
odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
ultricies sagittis orci, nec consequat dolor consequat ac. Nulla eleifend
rutrum semper. Sed fringilla, ligula eu gravida tempor, quam magna blandit
dolor, quis imperdiet sapien erat eu nibh. Nunc rutrum pulvinar nulla in
facilisis. Quisque feugiat purus in leo condimentum non congue eros
consectetur. Praesent dictum consequat nulla, bibendum rhoncus enim adipiscing
et. Pellentesque mi tellus, ornare id mattis ac, sollicitudin a erat. Maecenas
sit amet vehicula odio.
Left:
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies
sagittis orci, nec consequat dolor consequat ac. Nulla eleifend rutrum
semper. Sed fringilla, ligula eu gravida tempor, quam magna blandit dolor,
quis imperdiet sapien erat eu nibh. Nunc rutrum pulvinar nulla in
facilisis. Quisque feugiat purus in leo condimentum non congue eros
consectetur. Praesent dictum consequat nulla, bibendum rhoncus enim
adipiscing et. Pellentesque mi tellus, ornare id mattis ac, sollicitudin a
erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies
sagittis orci, nec consequat dolor consequat ac. Nulla eleifend rutrum
semper. Sed fringilla, ligula eu gravida tempor, quam magna blandit dolor,
quis imperdiet sapien erat eu nibh. Nunc rutrum pulvinar nulla in
facilisis. Quisque feugiat purus in leo condimentum non congue eros
consectetur. Praesent dictum consequat nulla, bibendum rhoncus enim
adipiscing et. Pellentesque mi tellus, ornare id mattis ac, sollicitudin a
erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies
sagittis orci, nec consequat dolor consequat ac. Nulla eleifend
rutrum semper. Sed fringilla, ligula eu gravida tempor, quam magna
blandit dolor, quis imperdiet sapien erat eu nibh. Nunc rutrum
pulvinar nulla in facilisis. Quisque feugiat purus in leo
condimentum non congue eros consectetur. Praesent dictum consequat
nulla, bibendum rhoncus enim adipiscing et. Pellentesque mi tellus,
ornare id mattis ac, sollicitudin a erat. Maecenas sit amet
vehicula odio.
Alternatively, the algorithm can simply disallow right-justification with indented/outdented paragraphs.
With block-indented right-justification, the first line is no different than the other lines; so the algorithm simply ensures that every line has a minimum of the chosen amount of indentation:
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies
sagittis orci, nec consequat dolor consequat ac. Nulla eleifend rutrum
semper. Sed fringilla, ligula eu gravida tempor, quam magna blandit dolor,
quis imperdiet sapien erat eu nibh. Nunc rutrum pulvinar nulla in
facilisis. Quisque feugiat purus in leo condimentum non congue eros
consectetur. Praesent dictum consequat nulla, bibendum rhoncus enim
adipiscing et. Pellentesque mi tellus, ornare id mattis ac, sollicitudin a
erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies
sagittis orci, nec consequat dolor consequat ac. Nulla eleifend rutrum semper.
Sed fringilla, ligula eu gravida tempor, quam magna blandit dolor, quis
imperdiet sapien erat eu nibh. Nunc rutrum pulvinar nulla in facilisis.
Quisque feugiat purus in leo condimentum non congue eros consectetur. Praesent
dictum consequat nulla, bibendum rhoncus enim adipiscing et. Pellentesque mi
tellus, ornare id mattis ac, sollicitudin a erat. Maecenas sit amet vehicula
odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ultricies
sagittis orci, nec consequat dolor consequat ac. Nulla eleifend rutrum
semper. Sed fringilla, ligula eu gravida tempor, quam magna blandit dolor,
quis imperdiet sapien erat eu nibh. Nunc rutrum pulvinar nulla in
facilisis. Quisque feugiat purus in leo condimentum non congue eros
consectetur. Praesent dictum consequat nulla, bibendum rhoncus enim
adipiscing et. Pellentesque mi tellus, ornare id mattis ac, sollicitudin a
erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
ultricies sagittis orci, nec consequat dolor consequat ac. Nulla
eleifend rutrum semper. Sed fringilla, ligula eu gravida tempor, quam
magna blandit dolor, quis imperdiet sapien erat eu nibh. Nunc rutrum
pulvinar nulla in facilisis. Quisque feugiat purus in leo condimentum
non congue eros consectetur. Praesent dictum consequat nulla,
bibendum rhoncus enim adipiscing et. Pellentesque mi tellus, ornare
id mattis ac, sollicitudin a erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
ultricies sagittis orci, nec consequat dolor consequat ac. Nulla
eleifend rutrum semper. Sed fringilla, ligula eu gravida tempor, quam
magna blandit dolor, quis imperdiet sapien erat eu nibh. Nunc rutrum
pulvinar nulla in facilisis. Quisque feugiat purus in leo condimentum
non congue eros consectetur. Praesent dictum consequat nulla,
bibendum rhoncus enim adipiscing et. Pellentesque mi tellus, ornare
id mattis ac, sollicitudin a erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
ultricies sagittis orci, nec consequat dolor consequat ac. Nulla
eleifend rutrum semper. Sed fringilla, ligula eu gravida tempor, quam
magna blandit dolor, quis imperdiet sapien erat eu nibh. Nunc rutrum
pulvinar nulla in facilisis. Quisque feugiat purus in leo condimentum
non congue eros consectetur. Praesent dictum consequat nulla,
bibendum rhoncus enim adipiscing et. Pellentesque mi tellus, ornare
id mattis ac, sollicitudin a erat. Maecenas sit amet vehicula odio.
Code: Select all
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
ultricies sagittis orci, nec consequat dolor consequat ac. Nulla
eleifend rutrum semper. Sed fringilla, ligula eu gravida tempor, quam
magna blandit dolor, quis imperdiet sapien erat eu nibh. Nunc rutrum
pulvinar nulla in facilisis. Quisque feugiat purus in leo condimentum
non congue eros consectetur. Praesent dictum consequat nulla,
bibendum rhoncus enim adipiscing et. Pellentesque mi tellus, ornare
id mattis ac, sollicitudin a erat. Maecenas sit amet vehicula odio.
Other variations are possible, such as indented/outdented block or quote-block paragraphs. How many variations to implement is up to you.
Frankly, I don't think that I ever use right-justification, nor out-dented paragraphs (though some people do). But left-and full-justification with indented, and with block-indented/quoted-block (with or without a first-line indent) seem to me to be most important, followed by center-justification.
What do you and others think?
Another consideration is the way in which a paragraph is represented, with the three main being:
1. Beginning a paragraph with a first-line indentation,
2. Separating one paragraph from another with a blank line, and
3. Ending a paragraph with a <return> (line-end), making the entire paragraph a single line, and relying upon the software to format the display of the paragraph.
Each method is, of course, preferred by some authors, and therefore should be handled by a complete software solution.
A note about word-wrap: currently, word-wrap is based on the screen right edge (and therefore re-wraps if the window is resized.) That is probably best for program code. But for general writing, word-wrap should be based on the right margin. Therefore, an option should be provided for this. In addition to a general option for this, you might consider making a lexer-specific override for the option.
In plain-text files there is no way, without employing some form of mark-up, to distinguish so-called 'soft' returns, from 'hard' returns which are represented by line-end sequences (CRLF, LF, CR). Therefore, right-margin word-wrap is especially important for general writing, and is essential for paragraph style no. 3 above.
Wikipedia article on indentation.
Wikipedia article on paragraphs.
1. Beginning a paragraph with a first-line indentation,
2. Separating one paragraph from another with a blank line, and
3. Ending a paragraph with a <return> (line-end), making the entire paragraph a single line, and relying upon the software to format the display of the paragraph.
Each method is, of course, preferred by some authors, and therefore should be handled by a complete software solution.
A note about word-wrap: currently, word-wrap is based on the screen right edge (and therefore re-wraps if the window is resized.) That is probably best for program code. But for general writing, word-wrap should be based on the right margin. Therefore, an option should be provided for this. In addition to a general option for this, you might consider making a lexer-specific override for the option.
In plain-text files there is no way, without employing some form of mark-up, to distinguish so-called 'soft' returns, from 'hard' returns which are represented by line-end sequences (CRLF, LF, CR). Therefore, right-margin word-wrap is especially important for general writing, and is essential for paragraph style no. 3 above.
Wikipedia article on indentation.
Wikipedia article on paragraphs.