tlaWrapParagraph
Wrap Paragraph and Move Cursor to Next or Previous

Visual SlickEdit® - Slick-C Macro - Royalty Free - 2005.01.01 17:15
Send Comments

Purpose

Wrap Paragraph and Move Cursor to Next or Previous.

Operation

This function finds the first character of the first line of the paragraph adn defines it as the left margin. The paragraph is the wrapped between this left margin and the right margin defined for the file.

If the ""D" or "U" option is set the cursor is moved to the first character of the next paragraph or the first character of the preivious paragraph.

Our enterprise corporate standard for ASP and HTML is to separate paragraphs with a single blank line. This results in code that looks something like ...

<p>This function moves the cursor to the first character of a line of a block of information.

<p>This function also invites further exploration to determine its full potential.

Example

Wrap current paragraph and move cursor to first character of currentt paragraph.

tlaWrapPara( );

Wrap current paragraph and move cursor down to first character of next paragraph.

tlaWrapPara( "D" );

Wrap current paragraph and move cursor up to first character of previous paragraph.

tlaWrapPara( "U" );

Input Parameters

Parm Name Code Meaning
1 Direction   Wrap current paragraph.
"D" Wrap current paragraph and move cursor down.
"U" Wrap current paragraph and move cursor up.

Return Codes

Code Message/Meaning
-1 tlaWrapParagraph: Direction (parm 1) not null, "D", or "U" -- Error.
-1 tlaWrapParagraph: Paragraph not selected -- Error.
0 No match found.
1 Match found.

Reference

This function calls tlaError, tlaMoveParagraph, and tlaSkip.

Compatibility

Current version verified under:

  • Visual SlickEdit 8.0.1

Installation

Perform the following steps:

  • Select the Code button on this page.
  • When the second window opens, select all the text in the text box.
  • Issue Ctl-C (copy).
  • Create a file in Visual SlickEdit with type Slick-C and extension ".e".
  • Issue Ctl-V (paste).
  • Issue Ctl-S (save).
  • Select PFK-12 to compile the macros.

Purchase

tlaSlick is a Visual Slick-C module that contains all of the Slick-C macros on this website in a single easy to install package. The tlaSlick module can be purchased by selecting the Buy button on this page.

tlaWrapParagraph is included as a function in tlaSlick.

Copyright © 1993-2005 Thom Little Associates, Ltd. revised 2005.01.01 17:15
One Central Square, Keene, NH 03431-3787 phone 603-357-7567