Please enable JavaScript to view this site.

A-Shell Programmer’s Notepad

There are boilerplate snippets of text which can be inserted with a few keystrokes or mouse clicks, saving a lot of time otherwise spent typing frequently-repeated blocks of text (function headers, certain XCALLs, if/else/endif blocks, etc.) Several have been pre-defined, but you may want to customize them and/or add your own. Use View > Windows > Text Clips to display the Text Clips panel:

apn1_img61

Make sure that the language at the top is set to A-Shell Basic. Then use the buttons at the bottom of the panel to add/edit/delete/import. When creating text clips, you can optionally define a shortcut as an alternate way to insert the clip (type the shortcut and hit TAB). Also, the text of the clip can contain variables:

${1}        first parameter (cursor lands here first)

${2}        second param (TAB takes you from one to the next)

${0}        place where final TAB leaves the cursor

To specify a default for any parameter, just append a colon and the text after the number within the brackets, as in this example:

apn1_img62

To use the clip, enter the shortcut (“cb”) and hit TAB:

apn1_img63

or double-click the clip in the text clip panel. The clip is inserted and the cursor goes to the first parameter:

apn1_img64

… Type a comment ...

apn1_img65

… Hit TAB again, and the cursor then lands at the position of the ${0}.

Text clips can also contain the following (hopefully self-explanatory) system variables:

${PN_Date}

${PN_CurrentColumn}

${PN_ProjectPath}

${PN_Time}

${PN_CurrentWord}

${PN_ProjectGroupPath}

${PN_Filename}

${PN_CurrentLineText}

${PN_ProjectName}

${PN_FileDirectory}

${PN_SelectedText}

${PN_ProjectGroupName}

${PN_FilenameNoExt}

${PN_CurrentProjectFile}

${PN_UseTabsYesNo}

${PN_FilePath}

${PN_CurrentProjectGroupFile}

${PN_TabSize}

${PN_CurrentLine}

 

 

 

For example,

apn1_img66

results in:

apn1_img67

Note that text clips, like most other configuration attributes, are user-specific and stored in %APPDATA%\Echo Software\PN2. In this case they are in the asb sub-folder as asb.clips and asb-xcall.clips.