Overview

Why PSPad?

· Do you work in different programming environments?
· Do you like syntax highlighting in your code?
· Do you need small tool with simple controls and the capabilities of a mighty code editor?
· Are you looking for a tool for work with plain text files?
· Do you want to save money and still have functionality of professional products?

If you have answered 'YES' to any of the above questions, then PSPad is for you.

What do you get with PSPad Freeware editor?

· Projects. Create project files to organize your work that can include multiple sub-folders and automatic file name sorting. Create projects based on all of the files in directory.
· Work on several documents at the same time. Multiple document interface (MDI) and/or tabbed document interface (TDI).
· Single document window splitting and window splitting.
· Save desktop session so you can resume your work exactly where you left off.
· Built-in FTP client so you can edit your files directly over the Internet.
· Macro recorder so you can record, save and playback commonly used sequences.
· Active scripting via MS Windows Scripting host (WSH) for automation.
· Search and replace not just in your active file, but also in all open files, all project files, or any folder.
· View file differences with color highlighting.
· Clips. Using clips you can have snippets of code at your fingertips. Create your own clips and never forget the syntax of the function call again. Clips can be interactive allowing you to generate code quickly and efficiently. Installation contains clip files for HTML, PHP, Pascal, JScript, VBScript, MySQL, MS-Dos, Perl, and many more.
· Syntax highlight. Highlighting can be set by file type. Highlighting is user-configurable.
· Create syntax highlighters for your own exotic environments
· Auto correction.
· Spell checking.
· Multiple undo/redo.
· Support for multiple code pages (ANSI, UTF-16, UTF-8, OEM, ISO)
· Full HEX editor.
· Call external programs to operate on or with your file. Different sets of programs can be defined for each file type.
· Call an external compiler. Create different compiler settings for each file type. Calls to compiler send output to log window. A configurable log parser allows you to pinpoint compile errors quickly.
· Color syntax highlighted print with print preview.
· Export with highlighting to RTF, HTML, TeX to file or clipboard.
· Column block select/Rectangular block selection.
· Bookmarks
· Line numbers.
· Reformat and compress HTML code, change case of tags.
· Integrated TiDy library for formatting and checking HTML code, conversion to CSS, XML, XHTML.
· Integrated free version of top CSS editor TopStyle Lite.
· Line sorting with the ability to sort on defined column, with the option to drop duplicates.
· ASCII chart with HTML entities
· Code explorer for C, Pascal, INI, HTML, XML, PHP and more.
· Internal web browser with web server (i.e. APACHE) using IE and Mozilla rendering engines.
· Matching bracket highlighting.


FAQ

Basic information

The Questions

A Interface

A.1 My dockable window (ASCII, Clipboard, ...) has moved from the right. How do I put it back?

A.2 Why would I want a dockable window to float?

¨

A.3 How do I find out what a particular hotkey does?

A.4 How to set file Tabs across the bottom?

A.5 Which icon is for gray checkbox in 3-way checkbox? [0] or [X]?

A.6 Under Program Settings > Files and Dirs > Save work, there are 3 settings. What is the difference?

A.7 Show Color is missing under menu HTML, like Help file says. Put in Color Dialog?

A.8 Can user set size of Project Tree? Seems too wide for me.

A.9 How do I maximize all windows after I've looked at them in restore mode?

A.10 How do I eliminate the grey thin line crossing the text area?

A.11 How do I change just one of the button icons?

A.12 How do I fix language of the graphical user interface?

B Editor

B.1 What is Swap Line?

B.2 What is Paste as HTML?

B.3 How can I delete empty lines?

B.4 How can I join lines?

B.5 Add Cr+Lf: Each time file is saved?

B.6 Could anyone explain me Reformat, and what are the differences between blank line and short line?

B.7 Undo all the way back to first edit of active file will NOT reset marker of File Modified. So it will still prompt you to save on exit.

B.8 If you undo all the way back to the file where it was not modified, shouldn't the editor not prompt you to save? Or should'nt the little red corner on the tap disapear too?

B.9 Line wrapping behaves weird. It often misplaces the cursor after inserting or deleting text in a line.

B.10 Weird undo behaviour and weird paste behavior.

B.11 I can not use the Word Wrap function, neither in the Toolbar nor via menu.

B.12 I am sick of copying a file path or web address to the clipboard just to open it. Is there a way to open the selected text?

B.13 What is the difference between Tab width and Indent width?

C Search

C.1 How to find text?

C.2 What are Regular Expressions (RegExp)?

C.3 Find/Replace vs. Find/Replace in Files? What's the difference?

C.4 Search and replace didn't work as expected.

C.5 Can i use RegExp for search/replace in multiple files or for multi-line search/replace?

D Tools

D.1 What is Clip Board Monitor?

D.2 What is Code Explorer? Mine seems broken.

D.3 How to set external programs?

D.4 How to: "Open Active File in External Program"? The icon Button should have a pull down triangle to the right of icon.

D.5 Internal web browser with Apache web server support... What does that mean?

D.6 Can I run HTML or Javascript through other browser like Mozilla Firefox beside IE to see the script result?

D.7 How can I make PSPad the default source code viewer for Firefox/Mozilla?

E Scripts

E.1 How do I use PSPad Extensions?

F Highlighter/Clips

F.1 Is there any way to setup more then 5 user highlighters?

F.2 Multihighlighter for Embedded Clips?

F.3 How to tear out a highlighter I have created?

F.4 How can I change Filter Mask in Highlighter Settings / Filter?

F.5 Is there a Glossary or Clips Library?

F.6 Is AutoComplete (Ctrl+J or Tools / AutoComplete) like a glossary?

F.7 What is "Repeat" in the HTML dialog box? (html Crtl+Space) Not in Help.

F.8 Clips are hard. Can someone create a template to generate new Clips?

F.9 What are User Variables?

G FTP

G.1 Can I upload binary files like .ZIP or .CHM help files in PSPad's FTP client?

G.2 In FTP client context menu of an active connection, what's the difference between: "Open as Text" and "Direct Edit in PSPad"?

G.3 FTP Files are stored in temporary folder (structure): TEMP\PSPad\server\ftp_path\file (Is that under PSPad directory?)

G.4 Why after save a file using ftp that has a uppercase name, it is converted to lowercase?

H General

H.1 I want to create some tutorials. What do you need?

H.2 I hate spam, and I do NOT want my email address published.

H.3 Where do I get a help file for a particular language?

H.4 Maximum Line Length?

H.5 menu File / Projects / Open Project seems the same as File / Projects / Project from Directory ... Are they the same?

I Just don't know how to...

I.1 Get column select or Alt+Drag working.

I.2 Move cursor past last character.

I.3 Set highlighter file size limit.

The Answers

A. Interface

A.1. My dockable window (ASCII, Clipboard, ...) has moved from the right. How do I put it back?

Grab the title bar of the mobile window. Drag it over the right scroll bar or right border and drop it when you see it snap in place. Any of the windows on the right are "dockable", meaning you can drag them free to float anywhere on the screen. Or you can dock them to the left or right. TIP: You can drag your FTP or Links window to the right and then even close them, but any time you restart PSPad, they will be returned to the Project Tree on the left.

Back to Questions

A.2. Why would I want a dockable window to float?

You might want to keep up, say the ASCII table, but not take away space from the editor window. So you float it. Or switch sides. As long as your Project Tree is showing, you might want your Clipboard Monitor docked in there, rather than taking up more room on the right.

Back to Questions

A.3. How do I find out what a particular hotkey does?

Examine .\PSPad\KeyMap.INI to look up a particular hotkey. Or look through Program Settings / Key Mapping.

Back to Questions

A.4. How to set file Tabs across the bottom?

Program settings / Program / [ ] File panel on top (un-check)

Back to Questions

A.5. Which icon is for gray checkbox in 3-way checkbox? [0] or [X]?

[X] is black check. [0] is gray check. [ ] is unchecked. I forgot about non-WinXP users :-(. Maybe if we change color of [0] in Help to gray it will help user.

Back to Questions

A.6. Under Program Settings > Files and Dirs > Save work, there are 3 settings. What is the difference?

Two modes. Restore all files (gray check) restores all open files from last PSPad state. Restores only files opened in PSPad: You edit some files in PSPad. Exit PSPad, run it again, files are back. Now exit PSPad, open some file from TotalCommander in PSPad, exit PSPad. Than run PSPad again. Back are files you previously edited, but not files you opened from Total Commander or with double click in Windows Explorer. See Save desktop.

Back to Questions

A.7. Show Color is missing under menu HTML, like Help file says. Put in Color Dialog?

I moved it under Tools. "Show color" works not only for HTML. And name was changed to "Color Selector" (or possibly Color Translator)

Back to Questions

A.8. Can user set size of Project Tree? Seems too wide for me.

Resize it with mouse. Simply drag right edge of project. Width is remembered.

Back to Questions

A.9. How do I maximize all windows after I've looked at them in restore mode?

Maximize any of them and they all maximize.

Back to Questions

A.10. How do I eliminate the grey thin line crossing the text area?

Settings > Program Settings > Editor - Settings > set "Position of right edge" to 0

Back to Questions

A.11. How do I change just one of the button icons?

Additional tool button icon sets are stored in the Skin (.\PSPad\Skin) folder. Using you favorite graphics editor, make whatever changes you wish and be sure to save your changes. Open PSPad and select the updated icon set from Program Settings > Program - Look > Tool button icon set. Click OK.

If you would like to edit the default skin but cannot find it in the Skin folder you may need to extract it using a resource editor.

Back to Questions

A.12. How do I fix language of the graphical user interface?

PSPad does not need a typical installation process: no registry entries etc. But it assumes a certain folder structure in the folder from which it is run. The PSPad.exe binary will run from anywhere with no auxiliary files, but only in its default language, which is Czech.

If you want PSPad in your native language and PSPad's advanced functionalities, you should have a folder structure like this:

PSPad.exe

PSPad.ini

-Lang (folder)

--English.ini

--Deutsch.ini

--Francais.ini

-Script (folder)

--JScript (folder)

---YourScript.js

--VBScript (folder)

-(etc.)

The installer will create all these folders for you. If for some reason you do not want an installer for PSPad, you can choose to download an archived version, which is basically all these folders compressed into one large file. This file will have a name that is similar to PSPad12345.cab.

You must uncompress this archive file with the option "preserve subfolders" (or similar) enabled. Good programs to get this done are IZArc (http://www.izarc.org/) or 7-Zip (http://7-zip.org/). Just uncompress PSPad with "preserve subfolders" option checked, and everything will be fine.

Back to Questions

B. Editor

B.1. What is Swap Line?

It will swap lines with the line below it. Now called, "Swap with Line Below" Right click on a line, select Special / Swap Lines.

Back to Questions

B.2. What is Paste as HTML?

It works with M$ product. E.g. if you copy to clipboard from IE, you can paste it into PSPad as HTML source, not only as plain text. You can use it as paste from Word too, if you don't mind Word's HTML jungle (dirty HTML).

Back to Questions

B.3. How can I delete empty lines?

Select Edit > Lines manipulation > Remove Blank Lines | Remove Redundant Blank Lines

Back to Questions

B.4. How can I join lines?

Select Edit > Lines manipulation > Join Lines

Back to Questions

B.5. Add Cr+Lf: Each time file is saved?

No. After file is saved, one blank line is added to the end, unless one already exists. Blank lines don't keep adding up.

Back to Questions

B.6. Could anyone explain me Reformat, and what are the differences between blank line and short line?

Reformat delete line breaks and make new format of paragraph with right edge.

paragraph=blank line: Its mean that paragraph end is blank line. All to blank line is taken as one paragraph.

paragraph=short line: Paragraph end is sort line (about half of right edge).

Back to Questions

B.7. Undo all the way back to first edit of active file will NOT reset marker of File Modified. So it will still prompt you to save on exit.

And now imagine case, when you open file, make some changes, save it. Modified status is reset. Then you undo all your changes, even those before the save. PSPad makes it possible do UNDO even after file Save. (AFNAB)

Back to Questions

B.8. If you undo all the way back to the file where it was not modified, shouldn't the editor not prompt you to save? Or should'nt the little red corner on the tap disapear too?

PSPad base editor component hasn't this support. When new version of this component will be available, I try to add this functionality.

Back to Questions

B.9. Line wrapping behaves weird. It often misplaces the cursor after inserting or deleting text in a line.

Word wrap has a bug, it is a bug in the component SynEdit and the people now working on SynEdit to resolve this issue.

Back to Questions

B.10. Weird undo behaviour and weird paste behavior.

Don't use Word Wrap function when editing is required

Back to Questions

B.11. I can not use the Word Wrap function, neither in the Toolbar nor via menu.

If you have enabled Trim Trailing spaces, Word Wrap is disabled.

Back to Questions

B.12. I am sick of copying a file path or web address to the clipboard just to open it. Is there a way to open the selected text?

Selected the text (file path, url, email) > right-click on select text > Open file appointed by selection or Click File menu > Open Special > Open file appointed by selection. You may also press and hold Ctrl key and left click to launch a URL.

Back to Questions

B.13. What is the difference between Tab width and Indent width?

Tab Width means number of spaces when you press TAB. Where Indent Width means number of spaces when you use Indent block.

Back to Questions

C. Search

C.1. How to find text?

There are several ways to find text:

Ctrl+F or Select > Find

F3 to find Next or Shift+F3 to find Previous

Shift+Ctrl+Up or Shift+Ctrl+Down to quickly find current word or selected text

Ctrl+E to do Incremental Search (see Statusbar Explained)

Back to Questions

C.2. What are Regular Expressions (RegExp)?

Very powerful addition to the Find command. I used: Caption=[A-Z]\w+ to find all lines with Caption followed by = and a Capitol Letter, followed by any letters and a space. Then F3 gave me the next. Learn them! (See Regular Expressions)

Back to Questions

C.3. Find/Replace vs. Find/Replace in Files? What's the difference?

Use Ctrl+H to Find/Replace text in active file. Alt-F is the key I assigned to Find/Replace in Files. Be careful. Use the List button to see proposed changes. Find/Replace in Files is very powerful, and thereby dangerous. Can change all occurrences in all files in a directory.

Back to Questions

C.4. Search and replace didn't work as expected.

Replace from the end of file, being sure to set direction appropriately to backwards. Its base component limitation.

RegExp for multi-line search/replace may be performed with a script.

Back to Questions

C.5. Can i use RegExp for search/replace in multiple files or for multi-line search/replace?

The base component SynEdit doesn't support this yet.

RegExp for multi-line search/replace may be performed with a script.

Back to Questions

D. Tools

D.1. What is Clip Board Monitor?

After you start it, a window will show up to the right. This window will capture all of your Copy (to clipboard) commands, such as Ctrl+C, Ctrl+X and menu Edit / Copy. Then if you want to Paste one of them, you just double click on it in the Clip Board Monitor. Once open, you can: Start/Stop monitoring, Delete all items from list, Copy text to clipboard, Paste text to your document, or delete an item from the list.

Back to Questions

D.2. What is Code Explorer? Mine seems broken.

Code explorer only works with some environments at this time. Try it with your English.INI files. You will see headings followed by items for that heading. You may need to click the plus to expand. This was buggy, not allowing you to open it, close it and open it again. Being fixed in next version.

Back to Questions

D.3. How to set external programs?

Tools / Highlighter Settings / External Applications. These can be set independently for each language in the list on the left.

Back to Questions

D.4. How to: "Open Active File in External Program"? The icon Button should have a pull down triangle to the right of icon.

Every highlighter has space to set 5 external programs and one compiler. You can run it With hotkeys (F9 ...), from menu File / Open Special / Open With or from menu File / Compile. You can also show Control Toolbar (Menu View / Toolbars) or Right Click on Toolbar you have buttons on toolbar to run it.

Back to Questions

D.5. Internal web browser with Apache web server support... What does that mean?

If you have Apache installed, set correct HT Docs directory in Program Setting / Internet. If you use Shift+Ctrl+F10 instead F10, internal browser will browse from your Apache server, not from local file. You can see PHP results, CGI scripts run, ...

Back to Questions

D.6. Can I run HTML or Javascript through other browser like Mozilla Firefox beside IE to see the script result?

Download and Install Mozilla ActiveX control. Then you will be able to use Mozilla as the internal HTML preview (first button on toolbar switches between Mozilla and IE).

You can assign any external browsers in Settings / Highlighter settings / HTML / External application.

Back to Questions

D.7. How can I make PSPad the default source code viewer for Firefox/Mozilla?

Use ViewSourceWith, available from dafizilla.sourceforge.net.

Back to Questions

E. Scripts

E.1. How do I use PSPad Extensions?

PSPad Extensions are delivered as plain text files called scripts. Scripts have to be extracted into folders according to the scripting language they are written in (*.VBS into Script\VBScript, *.JS into Script\JScript, ...). Scripts are automatically compiled when PSPad opens. (See Script Menu)

Back to Questions

F. Highlighter/Clips

F.1. Is there any way to setup more then 10 user highlighters?

No.

Back to Questions

F.2. Multihighlighter for Embedded Clips?

You can get different Clips (highlighting) when you are inside the JavaScript part of an HTML file. That is useful when you have, say, PHP or JavaScript embedded inside your HTML. Try it (Ctrl+Space) in HTML with PHP or JScript in Multihighlighter. You get a template for the specific part of code you are in. In PHP part, you get PHP template, in HTML part, you get HTML Clips. Clips can also be interactive (like most of HTML Clips are.)

Back to Questions

F.3. How to tear out a highlighter I have created?

If you mean user highlighter, go to Tools / Highlighter Settings / Filters. Click on your highlighter (one of the bold) and in list, click on blank line on top.

Back to Questions

F.4. How can I change Filter Mask in Highlighter Settings / Filter?

You can't modify the Filter Mask in Highlighter Settings / Filter for the User highlighters (bold font). Other highlighters are editable there. User highlighter Filter Mask you can edit in Tools / User highlighter

If you are looking at a User Highlighter (bold font), then you must edit the File Filter mask in: menu Tools / User Highlighter / File types, comma delimited. However, all the others can be edited in Tools / Highlighter Settings. (Why? Seems unnecessarily difficult)

Back to Questions

F.5. Is there a Glossary or Clips Library?

First check out AutoCorrect: menu Tools / Spell Settings ... and enter some values for words you want replaced when you hit a space after you write them. For example, I put in my initials "sel" and my name "Steve LeBlanc". So anytime I type sel, followed by a space, it gets changed to "Steve LeBlanc". It was designed for fixing common typos, but works great for abbreviated entries. For more complex items, use Clips and User Clips. Follow the first few letters of the command (or tag) with Ctrl+Space. Or follow the full name with Shift+Space. Clips are predefined for the major languages, like C, HTML, PHP and Perl.

Back to Questions

F.6. Is AutoComplete (Ctrl+J or Tools / AutoComplete) like a glossary?

No, it is just a fast way to enter the rest of any single word you have started to write, a word which is already in the current document. It saves me little time. But I'm a pretty good typist. Some people love it.

Back to Questions

F.7. What is "Repeat" in the HTML dialog box? (html Crtl+Space) Not in Help.

It will repeat pasting template item without leaving it. e.g. when you need to add more of the same item in the list.

Back to Questions

F.8. Clips are hard. Can someone create a template to generate new Clips?

Sure, I think. It would have to go in the ???.DEF file.

Back to Questions

F.9. What are User Variables?

User variables are used in Clips (See Context Files) They are always surrounded by %percentsigns% and you may use predefined ones or add/edit/delete your own using User variables dialog box (See Menu - Settings).

Clip variables are listed at top of context file. May are premade: HTML, Perl, PHP, INI, XML, JavaScript. If a For example, you define in User variables %PI%=3.141592654. In clip list you can write:

[pi | Insert number value pi]

%MyTestVariable%;

To insert the value of PI into your document, press Ctrl+Space and select pi. You must add or modify the clip in the language.def you use with your language/filetype.

i.e. PSPad\Context\HTML.def for html files.

You are not required to use them, you could wrote 3,1415... directly in the clip unter "[pi | Insert number value pi]", but the other way you could modify the value easly using User variables dialog box. You can also use the build-in variables in clips. i.e. %FileName%, %Company% or %Date% and so on.

Back to Questions

G. FTP

G.1. Can I upload binary files like .ZIP or .CHM help files in PSPad's FTP client?

No! PSPad only handles text files. To upload binary files, you will need a full functioning FTP client, such as ws_FTP LE or FileZilla. Even if you Open in Hex Editor, the "Save To FTP" will be grayed out. There is no Binary transfer mode available in this FTP client.

Back to Questions

G.2. In FTP client context menu of an active connection, what's the difference between: "Open as Text" and "Direct Edit in PSPad"?

Open as Text creates a local copy of the file in the Windows Temp folder. This makes for fast edits and saves. You may then Right Click the tab and select Save To FTP. Direct Edit, on the other hand, never saves a local copy. Any time you hit Save, it saves to the FTP host. Direct Edit is better for quick edits and will also prevent you from forgetting to save your changes to the FTP site. When you double click a file, you get a Direct Edit.

Back to Questions

G.3. FTP Files are stored in temporary folder (structure): TEMP\PSPad\server\ftp_path\file (Is that under PSPad directory?)

No. This is really the Windows Temporary directory. In Temp is created PSPad subdirectory and files are stored in this subdirectory. But I found a bug. The path missed part of FTP_Path, so all files was stored into TEMP\PSPad\server\file.

Back to Questions

G.4. Why after save a file using ftp that has a uppercase name, it is converted to lowercase?

You may disable the feature in FTP connection properties dialog. [ ]Change File Name to Lower Case

Back to Questions

H. General

H.1. I want to create some tutorials. What do you need?

All I need is content, preferably in HTML. I want modify English pages like the Czech - right menu. Then we can publish your tutorial on PSPad web pages.

Back to Questions

H.2. I hate spam, and I do NOT want my email address published.

I don't publish any address without owner consent.

Back to Questions

H.3. Where do I get a help file for a particular language?

You may create or find a .HLP or .CHM file for your particular computer language on the Internet. You can then configure it in Tools / Highlighter Settings / Filters tab / Help file:. But the template definition files do a pretty good job too, if you only need a syntax reminder. In an HTML document, type the word BODY and before you hit space, press Ctrl+Space. Just remember, you don't have to fill out all the fields. (Make tutorial for this???)

Back to Questions

H.4. Maximum Line Length?

Now is used only if some special cases. Now PSPad auto-sizes maximum line length. But before this number used to limit maximum line length.

Back to Questions

H.5. menu File / Projects / Open Project seems the same as File / Projects / Project from Directory ... Are they the same?

No! Project from Directory creates new project from selected directory. Being renamed to: "Create Project from Directory...""

Back to Questions

I. Just don't know how to...

I.1. Get column select or Alt+Drag working.

Real Tabs and word wrap force PSPad to guess what text you realy want to select. Do not use column select with real tabs (See Editor - settings). Do not use column select with word wrap on (See View Menu). In addition, be sure that Alt Sets Column Mode is enabled (See Editor - behaviour). It may also help to enable Scroll Past EOL.

Back to Questions

I.2. Move cursor past last character.

Enable Scroll past EOL option in Program settings > Editor - behaviour.

Back to Questions

I.3. Set highlighter file size limit.

Edit HLOnUpToSize value. (See Special settings)

Back to Questions


Licence

PSPad

Copyright © 2002-2020 Jan Fiala

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered package content versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. Individual parts of the package may not be used in other applications without author agreement.

4. This notice may not be removed or altered from any distribution.


Credits

Clips

· 8051 - Jaromir Rezek
· ActionScript - Karel Pavelka
· Ansys - Novotny L. W.
· ASX - Karel Pavelka
· AutoHotkey - beardboy, GoGoGadgetScott
· AutoIt - Petr Franta
· C++ - Karel Pavelka
· CAL - Martin Parizek
· CLARION - Nelson A. H. de Carvalho
· Cobol - Fiala
· CSS - Karel Pavelka
· ECSL - Marko Oette
· Extensible 3D - Bart
· HTML - Karel Pavelka
· IEC11131 - Petr Vetesnik
· LonWorks NeuronC - Senko
· MS JScript - Ales Daniel
· MS-Dos - David Tardon (pøeklad)
· Object Pascal - Borand
· Object Pascal - Borland (typo)
· ObjectScript - Angel Ezquerra
· Oracle - Kubo Zdeno, Milos Beno
· OtherCad - Ales Cerny, Ivan a Petr Slepickovi
· Perl - Karel Pavelka
· PHP - Krystof Slaby, Karel Pavelka, Frantisek Blaha,
· Python - Myles
· QBasic - Kamil Havlíèek
· R - Nick Drew
· RSL - Aldar
· RSS - Karel Pavelka
· SMARTY - Mazel (Kochi)
· SQLite command line interface - Arpad Horvath
· TeX - Tomas Vacek
· VB.NET - DonQuichote
· WML - Karel Pavelka
· XHTML - Karel Pavelka
· XML - Karel Pavelka

Corrections

· "Czech" English in localization file and help - Steven LeBlanc, Stuart Hemming

Dictionaries

· German - Dalibor Pernica, MrSpok
· Russian - Kokoteev Dmitry (NarKotik)

Documentation

· PSPad Bug/Wish/FAQ Review - Steve LeBlanc
· 4.5.x Update - Scott Greenberg
· Working with Text - Jason Zhang

Localization

· Brazilian-Portuguese - Goncin, Ericson L. Silva
· Catalana - Antoni Clavell
· Chinese - SiC
· Chinese Big5 - Nelson
· Croatian - Mladen Mintakoviæ
· Deutsh - Stefan Schuck, Helfer, Karel Jakl
· French - Jean-Christophe Meylan
· Galician - Xabier Cancela
· German - Karel Jakl
· Greek - Stefanos Togoulidis
· Hungarian - Leonard Nimoy
· Indonesian - Adrian JawZ
· Italian - Angelo Contardi
· Japanese - Suguru Yamamoto
· Korean - Shin Ryu
· Kurdish - PCKurd group
· Nederlands - Petyr, Amsterdam
· Norsk - Stein-Aksel Basma
· Polish - Piotr Murawski, Rafal Lampe
· Portuguese - João Alves
· Romanian - Antal Eugen
· Russian - Angie NM
· Slovak I - Jan Skokánek
· Slovak II - Jozef Kaprál
· Spanish - Hernan Fernandez
· Swedish - Hans Ericson
· Turkish - Cemal Dogan
· Ukrainian - Taras Kapuszczak

Skins

· Gnome - MrSpok

Scripting, Plug-ins

· Active script (Delphi examples, help, support) - Uwe Boeckers

Spell check dictionaries

· Catalan - Antoni Clavell
· Czech - Michal Kolesa, Lubos Nemec, Zdenek Bulin, Radek Tlapak, Tomas Bat
· English - Dalibor Pernica
· German - Dalibor Pernica
· Slovak - Dalibor Pernica
· Tlapak - Tomas Bat

User highlighters

· 8051 - Jaromir Rezek
· ABAP - Pavel Jaroa
· ADA - Stéphane (Bush Man)
· Ansys - Novotny L. W.
· Apache - Paul Mandalka
· ArchiCad - Lubos Cipra
· Asm51 - Martin Zeman
· ASN - Angelo Contardi
· ASP - Jiri Hudec
· Assembler x51 - DuckDaffy
· AutoHotkey - beardboy, GoGoGadgetScott
· C6000 - Stefanos Togoulidis
· Clipper - Kamil Vaclav
· Common Lisp - Durandal
· Counter Strike - Phil Pendlebury
· DataFlex - Federico Alcantara
· DocBook - zdroj
· Gui4Cli - Angelo Contardi
· Hakell - Paul Mandalka
· Harbour - Giuseppe Pergolesi
· Haskel98 - Václav Veselý
· Haskell - Paul Mandalka
· IEC11131 - Petr Vetesnik
· LotusScript - Mikhail Tarasevich
· LS-DYNA - Novotny L. W.
· LUA - Pawel Mrochen
· MASM32 - Klim
· MicroChip PIC assembler - F.Bina
· MicroChip PIC assembler - F.Bína
· MS JScript - Aleš Daniel
· NullSoft Install system - Paul Mandalka
· Progress - Ivo Liska
· QBasic - Kamil Havlícek
· R - Nick Drew
· Rexx - Alojz Kipila
· RSL - Aldar
· Ruby in HTML - Tim Curzon
· RWX (RenderWare Script) - Lode
· SciLab - Wensong ZHOU
· Sinumeric840D - Mariusz
· SMARTY - Pavel Kochman
· SQLLite - Árpád Horváth
· Tcl/Tk - Ludek Melichar
· TnsNames - Aleš Votocek
· TopoCAD - Christian Panel
· VB.NET - DonQuichote
· Verilog - Sergey Klepickov
· Visual LISP - GoGoGadgetScott
· WebFocus - Gonzalo
· WinBatch - Andre Pinheiro
· WML - Karel Pavelka
· X3D - Eckhard M. Jäger
· Z80 - Jiri Jaros

I want to thank all those people who participated in PSPad development - testing, bug reports, dotation, new functionality suggestions...


Contacts and info

About the program

The program is written in Borland Delphi 7

PSPad uses these components and units:

· SynEdit - syntax highlight component (https://github.com/TurboPack/SynEdit). I expanded on several functions: (e.g. wordwrap, user highlighters...)
· JCL - Jedi Code Library (http://www.delphi-jedi.org/)
· HexEditor - Markus Stephany, (http://www.mirkes.de/)
· TDiff - text differences by Angus Johnson (https://github.com/rickard67/TextDiff)
· SynSpellCheck - Jakuba Dybala with own functionality - speed optimized and myself created Czech dictionary
· Algorithm for word difference in spell check by Josef Hampl
· Synapse - work with HTTP and FTP - Lukáš Gebauer (http://www.ararat.cz/synapse/)
· Expression Evaluator - vyhodnocení výrazu - BitSoft Development (http://www.bitsoft.com)
· LVK skripts - V Karlsen - (http://www.vkarlsen.no/)

All used code and components are freeware or are used with author's consent.

All other code is my own and came from PSPad development.

PSPad is freeware. Made available free of charge.

About the author

Name: Jan Fiala

Email: support@pspad.com

Web site: http://www.pspad.com


Security and privacy

Does PSPad sends any info to internet?

Is PSpad safe?

Does PSpad collects and sends any information from your computer to internet?

If I don't mind the situation when the communication is on user's request - connection to FTP, opening a website/file from the Internet, then PSPad communicates in 2 cases:

1. checking for new version

By default the check is set to once a week period and the existence of a new full version is checked. In the program settings / Updates it is possible to disable automatic checking, change interval or to set it to check developer versions as well. The check is done by downloading a small text file from the PSPad website and comparing the running version with the version available on the website.

2. communication with Google Analytics

which is used to tell me how many users are using which version and how well exceptions are being removed. The communication is in the form of a simple http request with parameters, no third party components are used. Version, build and used localization is sent when the program starts. Information about the exception class (e.g. EACCESS VIOLATION) only is sent when an exception occurs. Visit Program Settings / Updates under the [i] button to see what information is sent. Again, it is possible to switch off the sending.


Starting PSPad

From Windows

You can start PSPad by double-clicking on the PSPad.exe file in Windows Explorer, by double-clicking on any file that is associated with PSPad (see System integration) or by dragging and dropping a file on to either the PSPad.exe file or a shortcut to it.

From the Command Line

The syntax to start PSPad from the command line is:

PSPad [/switch] "drive:\path\filename"

If the filename passed to PSPad is a PSPad project file (see Working With Projects) then PSPad will open and load the project.

For switch values see Command line parameters.

See Topics

Command line parameters

Tools Menu

Compiler examples


Command line parameters

Command Format

"drive:\path\PSPad.EXE" [/switch -switch] "file1" ["file2" ...]

or short form:

pspad file1

Open several files using wild chars

PSPad supports wild chars in file name. It allows you open you several files at once.

Examples:

PSPad Z:\Project\*.php

PSPad "c:\windows\kb*.log"

Note: wildchars can be used in file name only, not in the file path!

Available Switches

/D or -D

Open files in text difference mode (needs min. of 2 files).

/E or -E

Start without restore files.

/H or -H

Open file direct in HEX editor.

/I or -I

Path to PSPad ini files folder. You can use system variables for %USERNAME% e.t.c..

/N or -N

Force start new PSPad instance even multiinstance run is disabled

/R or -R

Open file(s) in ReadOnly mode.

/U or -U

Open source code of specified URL address.

/nnn or -nnn

Open file and jump to line in text editor or position in HEX editor.

/Snnn or -Snnn

Force highlighter nnn for file given by parameter

/F "search string" or -F "search string"

After start PSpad will run search on active file

/FR "regular expression" or -FR "regular expression"

After start PSpad will run regular expression search on active file

Warning: if file name or path contains spaces, is necessary to enclose path with double quotes!

See Topics

Starting PSPad

Tools Menu

Compiler examples


Working with File Tabs

You select a file tab by clicking on it with the left mouse button or by repeatedly pressing Ctrl+Tab until the required file is marked as the active one. You can change the order of the file tabs using drag 'n' drop with the left mouse button. In addition, tabs maybe activated by pressing Alt+number of tab (1-based index).

Right-clicking on a file tab will display a context menu (see File Tabs Context Menu).

The file tab marker indicate a number if things about the file. The following picture shows you the various styles of File Tab. Descriptions providing more information are below. The file tab look and use can be customized (see Program - look).

2 - Changed File

The file has been changed and not saved. Any of the other file types will show the red mark if it has been changed.

3- Hidden, System or Read-only File

The file on disk is marked as hidden, system or read-only.

4 - Hex Editor File

The file has been opened in the HEX editor (see File Menu).

5 - Auto Refreshed File

The file has been marked to auto-refresh from disk (see File Tabs Context Menu).

6 - Text Differences File

The results of a text differences operation (see File Tabs Context Menu).


File Tabs Context Menu

When right-clicking on a file tab, file tab context menu is displayed. The options shown work with the file over whose file tab you invoked the menu. If function you select from the menu operates on 2 files (for example 'Text Diff with this file') then the system uses the active file and the file over which you called the context menu.

59 Close (Ctrl+F4)

Closes the current or tab file. If the file has not been saved you will be prompted to save it.

Save (Ctrl+S)

Save the current file. If the file has not previously been saved then the 'File Save As' dialog will open first.

Save to FTP

Saves active file to the current folder of open FTP connection.

Save As... (F12)

Saves the current file with new name using standard Save as system dialog

Read Only

Toggles file read-only status. When set as read-only the file name on the file tab is in italics.

System context menu

Display file's system's context menu. Maybe used to delete file.

Open in new instance

Opens window in new PSPad instance. Same function is in the Window menu

File tab color...

Allows you to select file tab background color. This color has priority that color defined in the highlighter settings. If save file state is enabled, this color is remebered for future PSPad sessions.

Close All

Close all currently opened files include project without exiting the program.

Close all but current

Close all currently opened files but selected tab.

Close to left

Close file to left of selected tab.

Close to right

Close file to right of selected tab.

Vertical Split

Shows two views of the same file, to the left and right. Each can be scrolled independently.

Horizontal Split

Shows two views of the same file, one above the other. Each can be scrolled independently.

Autorefresh Window

The window is marked when auto-refresh is ON for the active file. (Refresh icon on status bar and different color in file panel). When AutoRefresh is on, the file is automatically reopened after given interval in seconds (Program Settings > Editor > Auto Refresh [s] ). Refreshing is provided only if document is active. When you click on another file tab, you are not interrupted. When the AutoRefreshed document is once again selected and active, then refreshing will resume. You are prompted for changes: "File 'x' was changed. After reopen, changes will be lost. Continue?" If you say no, the file is not reopened and your changes will not be lost. But you will be prompted again after the interval.

Sort file tabs alphabetically

Sorts file tabs in alphabecical order

Synchronize Moving

Shows two files in whole editor area and locks the file positions together so that scrolling in one window causes the other window to scroll by the same amount. Active this by right-clicking second file's tab. The first file is the currenly active tab. Please note this is disable when only one tab is open.

Text Diff with This File...

Compare contents of two text files. This function operates on the selected and the active files. Results are displayed in new window. See Text Differences.

Text Diff with File Contents on Disk

Compare active file with its disk contents. This function is only available if the file has been loaded from disk or it is a newly created file that has been saved to disk. Results are displayed in new window. See Text Differences.

Detach file from FTP

If you open file directly from FTP, PSPad remembers FTP connection for this file. If you call Save function, PSPad automatically saves file to FTP too. Detach from FTP will breaks this connection and you can work with file as with local file.

Set as Main File for Compiler

Sets file as main project file. If you run the compiler (see Compiler Settings) the file marked as Main (if set) is always sent to the compiler. That file may or may not call other files to be compiled. If you don't compile this type of file, then setting as Main serves to make that file more visible in the editor file tabs.

Add File to Project

Add file to active project folder.

Find file in project

Finds file in project

Copy Filename to Clipboard

Copies selected tab's full file path include filename and extension.

See Topics

File Menu

Statusbar Explained

Project Menu

Main Toolbar

User highlighters

Window Menu

FTP

System integration

Working With Projects

Project Context Menu

Control Toolbar

External applications

Command/Compiler Variables

Project Toolbar


Working With Projects

What are projects for?

A project is a way of managing a collection of different files that are related in some way. For example, if you were working on, say, an Internet application you may have several .html pages, a .css stylesheet or 2 and some script files. You can create a project so that all these files are accessible whilst you are working.

What you get if you use projects.

· Simplicity: You only need open one file to have access to all of the files you need for your project.
· Flexibility: Files in a project can be stored anywhere on your disk or network; you don't have to put them all in the same place. Files can be used in multiple projects.
· Convenience: File is opened by double-clicking the relevant file icon in project tree.
· Organization: Files can placed in project virtual folders and files can be automatically sorted within those folders.
· Automation: You can set main project file so it will be always run in external application and/or compiler by default if one is set (see External Applications and Compiler Settings).
· Continuity: Desktop state can be saved at end of work and restored when the project is reloaded.
· Safety: Adding or removing a file from project has no influence on the file (removing a file from a project does not delete it). Only a file reference (link) is added to or removed from the project.

The Project Tree.

After the program starts an empty project is created (unless you start the program by passing a PSPad Project file name, see Starting PSPad). A Project is activated by adding at least one file. Below is a example Project Tree.

The Project tree has a number of Icons at the top.

Create folder

Adds a new virtual folder to the project. The folder name must be unique in this project .

Remove folder

Remove folder and files it contains from project. This option is greyed out if the item selected in the project tree isn't a folder. Note: Any files removed during this operation are not deleted; only the reference to them in the Project file is removed.

Remove file from project

Removes the file from the project. This option is greyed out if the item selected in the project tree is not a file. Note: This option does not delete the file, it just removes any references to it from the Project.

Project Information

This opens a window that displays a list of all files in the project. The list shows the file name, the number of lines in the file and the full path of each file.

Project Settings

This opens a window with 3 tabs; General, External Applications and Compiler. The details for External Applications and Compiler tabs can be found in the chapters External Applications and Compiler Settings (The settings on the Project file have priority over the equivalents in Highligher Settings). The General tab a number of options:

Project Default Directory

The default directory for project files.

Default CP for File Opening

This is the same as the setting in Program Settings / Editor.

New File Format

This sets the file format for new files created whilst this project is open. The choices are DOS, Mac or Unix. Note: The Project file must be saved before this setting takes effect and it will only affect files created after the setting has been set/changed.

Cursor at End of Log File

This is the same as the setting in Program Settings / Program.

Don't open any files after project load

If checked this will cause the program to load the Project file but not open any of the individual files in the project. Otherwise, once the Project file has been loaded, any individual files that had been open when the project was last loaded will be reopened.

How do I organize my Project Tree?

There are a number of ways of organizing your Project tree.

Automatic Sorting

You can set an option in Program Settings / Program to automatically sort files and folders in your Project tree as you add them.

Sort on Demand

You can right-click on the main Project Folder or on any of the virtual folders and select 'Sort by name' to sort that folder. See Project Context Menu for more details.

Manual File manipulation

You can drag and drop files to move them around the Project tree.

How is project stored

All of the project relevant information is stored in a .PPR (PSPad project) file. This file type is automatically associated with PSPad.

Files references are stored with relative path to project file. Its important for easy project moving.

How Files are Selected in a project

Double-clicking a file on the Project tree will load the file into PSPad.

You can always right-click on a file in the project window and select 'Open as Text' or 'Open in Hex Editor' if it is not a type known to PSPad (see Project Context Menu for more details).

See Topics

File Tabs Context Menu

Project Context Menu

Project Toolbar

Sort

Project Menu

Control Toolbar

External applications

Command/Compiler Variables

Window Menu


Project Context Menu

Right-clicking on the Project tree will display a context menu. The options available will be dependant on where in the Project tree you click.

System context menu

Display file's system's context menu. Maybe used to delete file.

Open as Text

Opens the file in PSPad. If the file type is known to PSPad then the file will be syntax highlighted appropriately. If the file type is not know then the file will be treated as a text file and opened. This option is only available if you have clicked over a file.

Note: Not all files can be read as text files and whilst PSPad will open them, the contents may not appear as you might expect. You should be aware that you could prevent a program from working or lose valuable data if you change a non-text file and save it.

Open with Default Program

This option will open a file using the program it is associated with in Windows. This option is only available if you have clicked over a file.

Open Folder Files

This option will open in PSPad all of the files in a virtual folder. This option is only available if you click on a virtual folder.

Close Folder Files

This option will close any files that are in a virtual folder if they are open in PSPad. This option is only available if you click on a virtual folder.

Rename (F2)

This option will allow you to change either the project name or the name of a virtual folder. This option is not available if you have clicked over a file; to rename a file you should use the "Save As..." option and then add the newly created file to the project. See Menu - File.

Remove File from Project (Shift+Ctrl+Del)

This option removes a file from the project. The option is only available if you click on a file.

Note: The file is not deleted, it is only removed from the project.

Set File as Main for Compiler

Sets the file as main project file. If you run the compiler (see Compiler Settings) the file marked as Main is always sent to the compiler. This option is only available if you click on a file.

New Folder

Creates a new virtual folder.

Remove Folder

Deletes the virtual folder and removes any files in it from the project. This option is not available if you click on a file.

Note: The file is not deleted, it is only removed from the project.

Add Files...

Allows you to add files other than those open in PSPad. You can add multiple files using this option.

Add all open files

Add all open files to selected folder in current project.

Sort by Name

If you select this option after right-clicking on the project folder it will alphabetically sort all of the virtual folders and then sort each folders contents. If you select the option after clicking on an individual virtual folder only that folder will be sorted.

File Info

Shows file statistics.

Project Information

Shows the project information. (See Working With Projects)

Project Settings...

Shows the project settings. See Working with Projects.

See Topics

File Tabs Context Menu

Working With Projects

Project Toolbar

Project Menu

Control Toolbar

External applications

Command/Compiler Variables

Window Menu


Working with Text

Introduction

PSPad is a powerful application with dozens of tools. With all the tools at our disposal it sometimes can be difficult determining how to use all of them.

This topic will introduce some of PSPad's text manipulation tools by example.

Example

Have you ever needed to number a 1000 lines, add bullets, or add text at line begin or end?

Let us first look at the requirement. Below is an array of fruits the came from an aged PHP script and our boss needs it convert to ASP, sorted, and duplicates removed; ASAP.

Example text

$fruit[] = 'Strawberry';

$fruit[] = 'Pear';

$fruit[] = 'Peaches';

$fruit[] = 'Grape';

$fruit[] = 'Apple';

$fruit[] = 'Peaches';

$fruit[] = 'Crabapple';

The most obvious way to do this is adjust the text all manually, but consider it we very well could have hundreds of lines.

Let us see what PSPad can do to fix this mess.

1. Sort the lines in ascending order.
a. Using the mouse or keyboard, move cursor to the first line and first character.
b. Using the keyboard press F8, activating block select (see Statusbar Explained).
c. Move cursor to the last line and last character.
d. Press F8, deactivating block select.
e. Open the Sort dialog by selecting Edit menu > Sort (see Sort).
f. Set direction as Ascending, sort by as ANSI value and check Remove Duplicates. Select OK.

Result:

$fruit[] = 'Apple';

$fruit[] = 'Crabapple';

$fruit[] = 'Grape';

$fruit[] = 'Peaches';

$fruit[] = 'Pear';

$fruit[] = 'Strawberry';

2. Remove the leading dollar marks.
a. Select the first columns using the Column selection function. Holding the ALT key, dragging the cursor from line 1, column 1 to line 6, column 2.
b. Delete selection by, selecting Edit menu > Delete (see Edit Menu).

3. Remove the semicolons

If we can move all the semicolons into the same column, we can remove them by Column selection, just as we removed the dollar signs.

a. Position the right edge so that it is to the right of the longest line (see Mouse control).
b. Justify Right by selecting Format menu > Block Format > Justify Right (see Block format) or press Ctrl+Alt+Right(see Keyboard shortcuts).
c. Use Column selection and Delete. Once complete, make the text Justify left using the Block Format menu or pressing Ctrl+Alt+Left.

4. Replace [] with () and replace ' with ".
a. Select all the text.
b. Open the Replace dialog by selecting Search menu > Replace (see Search and Replace).
c. Using this dialog box you may now preform the replace.

Result:

fruit() = "Apple"

fruit() = "Crabapple"

fruit() = "Grape"

fruit() = "Peaches"

fruit() = "Pear"

fruit() = "Strawberry"

You may worry that if there are also [] and ' in the string, they will be replaced wrongly. Regular express can help us to avoid this trouble. For more information about regular express, please read the help documents about Search/Replace

5. Insert the numbering index.
a. First, select the lines, then presss ATL+I (or click Menu > Edit > Lines Manipulation > Insert Text to Lines) to call the insert dialog out.
b. Select numbering.
c. Move the index into the brackets. Press ALT key, and select the first columns.
d. Press Ctrl+x to cut it to clipboard, then put the cursor into the bracket of the first line. Press Ctrl+v to paste.

6. Remove extra blank space at the beginning of the lines.
a. Use column selection again, you can delete them easily.

PSPad provide a lot of functions to deal with the text. Some are obvious and some need your exploring. Once you are familiar with it, your work will be much more efficient.


Working with Colors

Simply way to change whole PSPad colors scheme

1. Basic color settings

Set basic colors in Settings menu > Program settings > Colors (see Colors). These colors are applied to all highlighters with these rules:

§ If previous font color is same as color of highlighter attributes, attribute color is changed to new color.
§ If previous background color is same as highlighter attribute colors, attributes background is changed to new color.
§ If highlighter attribute font color is same as new background color, attribute font color is changed to new font color.

2. Fine-tune highlighter colors

You may fine-tune each highlighter attributes color and font styles in Settings menu > Highlighter Settings > Colors.

3. Save color scheme

You may save a highlighter color scheme (see Syntax highlight). Doing so allow you to load the same scheme for any other highlighter, even custom ones. Select Settings menu > Highlighter settings > Colors, in the color scheme box enter new name or choose a prexisting name to overwrite and click the Save button. To load a color scheme, choose a prexisting name from combobox and click the Load button.

See Topics

Color Selector

Colors


HTML page - example
1. Open new HTML document. This will also load the clip definition file for HTML, including syntax highlighting.
2. Press CTRL+SPACE, choose html (or write html and press SHIFT+SPACE) - you get HTML page base structure
3. Use other clips (CTRL+SPACE) or their assigned shortcuts (chapter about clips) to write what you need.
4. Create or open other pages
5. I recommend you use clips shortcuts like CTRL+Enter, CTRL+B, CTRL+I, .... See what these hotkeys do at: Settings / Clips Hotkeys, (This is empty if there are not shortcuts assigned in the .DEF file for this file type.) For example, when you are in an HTML document, CTRL+B creates a set of bold tags <b></b> with your cursor in the middle of them. If you select your text before hitting CTRL+B, the text will be surrounded by the bold tags.
6. Mark main HTML page (index.html) as "Main page" - Ctrl+M for better visibility.
7. Press F10 anytime to see result of your work in the default application, which in this case is the built-in browser.
8. Press SHIFT+CTRL+E to see Code Explorer for better code orientation

How to effectively use program

1. after selecting a block of lines, you can increase or decrease indentation - SHIFT+CTRL+U SHIFT+CTRL+I or Tab / Shift+Tab
2. use clips (CTRL+SPACE)
3. Use hotkeys. Intead Ctrl+Space, select "B" tag, you can select your text and press Ctrl+B (in HTML document).
4. you can use UNDO and REDO at any time
5. you can simply reopen file before you save it, if you are not happy with your changes Ctrl+R
6. use bookmarks for quick orientation in code CTRL+LEFT/Right, CTRL+DOWN/Up
7. use context menu - right mouse button
8. use help. Try pressing F1 in various contexts: in the Projects window, in a dialog box, when you mouse has highlighted a pull down menu item.
9. explore and try the various menu tools. Some functions can save you a lot of work


FTP

What is FTP?

FTP (File Transfer Protocol) allows you to connect to an FTP server to send and receive files over the Internet. You might, for example, use PSPad's FTP client to upload (or send or post) your HTML files to your website.

Where is the FTP client ?

The FTP client is a tab in the Project panel. (menu View / Project Tree or Ctrl+F2) After you click the Connect FTP button (top left), a list of defined connections is displayed. You can then connect, add, remove, edit, ...

After successful connection, other buttons are enabled.

You can see connection status information on LOG panel, FTP tab.

FTP client Notes

· You can edit files from different FTP servers at once. All information about connection is remembered for each file(connection name, FTP directory, ...) Just edit and hit Save.
· After Save Function is called, file is saved back to its original location on the FTP server. If the connection isn't active at this time, PSPad will try to connect. If another connection is active, it will be disconnect.
· If you want to save a file (which was not opened from FTP) to an active FTP directory, you have 3 choices:

1. Select "Save to FTP" from File menu or

2. Pull down the triangle menu next to the Save icon (a disk) or

3. Right Click the active file tab, and select Save to FTP.

· If no FTP connection is active, the option to Save to FTP will be grayed out.

Files are stored in your Windows temp folder (structure) as Default:

TEMP\PSPad\server\ftp_path\file

You can change your FTP temp location in Program settings / Backup

How to connect SFTP server

· Download Bitwise SSH Client
· Establish an SSH connection
· Go to the tab "Services". Check "FTP-to-SFTP Bridge" enabled.
· Listen interface = 127.0.0.1
· Listen port = 21 (not sure if you need this)

Now go to your connection within PSPad. Set the server to 127.0.0.1.

Now you should be able to connect PSPad via SFTP.

FTP client allows

· connect/disconnect to FTP server
· a detailed Right Click context menu
· a browsing FTP structure
· refresh (reload) directory structure
· quick jump into root directory
· quick jump into remote (working) directory
· create directory
· delete file or empty directory
· rename file or directory
· keep connection open by sending specified command at intervals
· saves your password in encrypted form
· upload and download text files, NOT binary files, like .JPG, .ZIP or .CHM.
· quick search (file filtering) using field in the FTP panel

FTP Context Menu

In context menu of an active FTP connection, you can...

Open as Text

Creates a local copy of the file in the Windows Temp folder. This makes for fast edits and saves. You may then Right Click the file tab and "Save To FTP" if you choose. If you want to save the file, take it OUT of the Temp folder, or it may get deleted.

Direct Edit in PSPad

Never saves a local copy. Any time you hit Save, it saves to the FTP host. Direct Edit is better for quick edits. It will also prevent you from forgetting to save your changes to the FTP site. When you double click a file, you get a Direct Edit.

Other Context Menu options are self explanatory.

See Topics

File Tabs Context Menu

File Menu


FTP setting

Connection Name

User display name for connection list

When you put asterisk on the end of connection name, e.g. MyConnection*, such connection will be selected as default when you start PSPad

Server

FTP server name or address. If you need to specify nonstandard port (21), write port number after server address:

ftp.name.domain:port

User Name

User name for FTP server access. It's optional. If not entered, you will be asked for it.

Password

User password for FTP server access. It's optional. If not entered, you will be asked for it. It is stored in file PSPadFTP.INI in encrypted form.

Remote Directory

This directory will be set after the server connects.

Connection Timeout

You can set a timeout for each FTP account. This is the amount of time the FTP client should wait for a response from the server before it disconnects from the server.

Use SSL/TLS, if available

Uses TLS ciphering for FTP communication (FTPS protocol). Don't exchange with SFTP.

Note: PSPad requires OpenSSL libraries into PSPad root folder (libssl32.dll, libeay32.dll, msvcr71.dll). You can download them by clicking on the link of FTP connection settings dialog.

For SSL use Prot P (pure) instead of Prot C (clear) mode

In both settings communication is ciphered (e.g. logon information).

· PROT C (clear) - data are sent without TLS
· PROT P (private) - data are sent using TLS ciphering. More safe, but must be supported by FTP server.

For more information see the RFC

Note: If you have problem getting data from the FTP using SSL/TLS, uncheck this parameter

Passive Mode

You may need it if you connect to FTP from proxy server or behind a firewall. Always try to connect with it first.

Binary transfer mode

I suggest to activate this mode. In the text mode FTP handles files as text, can change line ends and can destroy your files, especially in case your file contains some control characters.

Compatible mode

This mode is used for old proxies and uses old FTP commands only

Old file listing

Several years ago FTP servers uses own proprietary file list format. It means each server has different format and causes problems with line parsing. There were set up standard and instead of LIST command list of files is get by MLSD command (standardized output). Not all FTP servers support it yet. PSPad detects if your FTP server support it and use old method if can't use it. If you want PSPad FTP client force to use old format, use this option.

Show hidden files

When LIST command (old format) is used, it doesn't list hidden files. This option tells to FTP server to include hidden files into list - instead of LIST, the command LIST -L is sent.

Note: LIST -L command must be supported by your FTP server. Wrong usage can cause empty file list.

Keep Connection by Sending

In defined intervals (if FTP is idle) PSPad will send chosen command to prevent server from disconnecting you. Many servers will wait 5 minutes (300 seconds) of inactivity before disconnecting you.

Use random command

Some FTP servers detects that command is sent periodically to keep connection. This options will send random commands to keep connection alive.

Change File names to lower case

UNIX systems are case sensitive and most of FTP servers runs on UNIX servers. If you use lowercase file names and you want to prevent yourself to send (accidentally) file with some upper case letters, use this option.

Cut off file extension before save to FTP

some servers don't handle file extensions. This option will cut off file extension for new files you send to FTP server.


Favourite panel

Favorite panel gives you quick access to files, folders, internet pages, tools and PSPad scripts. Items are organized in folders.

You can simply drag/drop items there, from PSPad (file tab) or from outside, e.g. from Windows file explorer.

· Files allows you to fast open your often used files
· Folder open selected item in PSPad file explorer
· WWW opens link in your default browser
· Tools has possibility of PSPad compilers. It allows you define general compiler independent of the project or highlighter settings or variation to your default compiler
· Scripts allows you to include your often used scripts (PSPad scripting)

Files and folders allows you to open file in PSpad or in default application - use context menu (right mouse button on the favorite item)

You can access favorite panel from the file menu, from the left Tool panel (if you don't dock it to the right) or using shortcut (default Shift+Ctrl+X )


Hex editor

PSPad primarily works with text files. The character with ASCII value 00h, is taken to be the end of the text file. That means you can't open a non-text file in the editor. PSPad also contains a HEX editor which will open the sort of files mentioned above.

What is a HEX Editor for?

In the Hex editor you can open any type of file and edit it byte-by-byte.

Warning: You can ruin a binary file by changing a single character if you don't know what you are doing.

How to edit any file in PSPad?

You can open a file in PSPad's Hex Editor in a number of ways:

· Use the 'File / Open in HEX Editor...' menu option;
· Drag a file in to PSPad from Windows (or from PSPad's own File Explorer) or otherwise open a file and either:
· Right-click in text area and select 'HEX Edit Mode';
· Select the 'View / HEX Edit Mode' menu option;
· Add the file to a project, right-click on the file and select 'Open in HEX Editor...'

How to edit text file in HEX editor?

With a file open, either select the 'View / HEX Edit Mode' menu option or right-click in the text edit area and select 'HEX Edit Mode'.

Once in HEX edit mode, you can change the file by typing hexadecimal codes directly in to the Hex area on screen or my tying in to the ASCII area to the right of the screen. By default, the editor switches to overwrite mode when editing in Hex mode. Changes to the file are highlighted.

You can toggle between HEX and text modes as often as you need.

What you can do in Hex editor?

· switch between overwrite and insert mode by pressing INSERT;
· goto address - Alt+G (enter the byte address you want to go to in either decimal. To enter an address in Hex prefix the number with '$' - eg. $10 takes you to the 16th byte). Note: The byte address starts at zero, not 1;
· Find and/or replace text or bytes - Ctrl+F;
· Create and goto bookmarks
· Quickly change column number with Ctrl+Mouse wheel


Code page conversion

How does PSPad convert code pages?

If you set a Code Page other than ANSI it means the file on disk is in this Code Page. So while reading file, PSPad provides conversion from this specific Code Page to ANSI, which is Windows native format.

If you want save file in a different Code Page, change the Code Page using the menu Format and save file; PSPad will convert the file contents during the Save process from ANSI to specific code page.

Most people will use ANSI (no conversion), OEM, ISO-8859-2, UTF-8 or UNICODE. Code pages have meaning for Czech and Slovak users only.

Autodetect CP

This options tries detect correct code page. Detection is based on specific chars counting. Code page contains characters what are not contained in other code page and number of characters can determine correct code page.

Don't use this function! It has meaning for Czech or Slovak users only. In other environments, it will not work.

Example:

Take an ANSI file and save it as UNICODE

1. Set ANSI in menu Format.

2. Open file.

3. Change code page to UNICODE.

4. Save file.

File is converted during save process to UNICODE.


Statusbar Explained

The statusbar is used to display relevant information about the file you are working on. In some cases this information is imparted using icons. This chapter explains what each of the items means.

Cursor Position and File Size (1)

This panel displays information about the current cursor position and the file size. The first character is the line number the cursor is on, the 2nd is its column position. The 3rd number, in round brackets, is the total number of lines in the file. The 4th, in square brackets is the total number of characters in the file. Left clicking on this panel will display the Goto Line window (see Search Menu).

For reasons of efficiency, if the file exceeds 1000 lines this part of the statusbar changes format.

When in this format, the first number is the line the cursor is on, the second the column. The final number is the number of lines in the file.

In this format the first number is the current line number, the 2nd is the current cursor position and the last, the number of characters in the selection.

Note: The number of characters selected will include 2 characters (LF and CR) for each line boundary crossed.

Unsaved Changes (2)

This panel contains either nothing or a picture of a disk. If the disk is shown then the file has been altered since the last save or has not been saved at all.

Note: Making a change to a file then undoing the change using Edit / Undo will not reset the unsaved changes marker.

Selection Type (3)

This panel indicates the Selection Type currently in force. You can change the selection type by clicking on the icon (see Selection Type). Left clicking on this panel will change the selection type.

Block Select or Autorefresh (4)

This panel indicates whether or not you are using the F8 block select function or a indication that Autorefresh is enable (see File Tabs Context Menu).

Synchronize moving (5)

This panel indicates that synchronize moving is enable (see File Tabs Context Menu).

Character Under (or just after) Cursor (6)

If the file is not empty, this panel will show details of the character that the cursor is on. Left clicking on this panel (if character is a printable character) will display the ASCII Table window (see Tools Menu). The panel shows up to three values:

· Character itself (if it is a printable character).
· Character's ASCII value in decimal.
· Character's ASCII value in hexadecimal.

Highlighter in Use (7)

This panel displays the name of the highlighter in use where applicable. Left clicking on this panel will display the Change Syntax window (see View Menu).

File Format (8)

This panel shows the format of the file which, describes what characters are used to mark the end of line (see Format Menu). Double-clicking this panel changes the file format.

Code Page (9)

This panel shows the code page currently in use (see Format Menu).

See Topics

Editor - behaviour

File Tabs Context Menu

File Menu

Project Menu

Main Toolbar

User highlighters


Macro

What is a macro?

Macro is a series of editor commands. You are able to record these commands and then replay them later.

How do they work?

Begin recording by ether pressing record from the toolbar, Tools menu or using keybord shortcut (Ctrl+F5). Once in record mode, all text work is recorded. Cursor is set as the to recorder picture.

Enter your text and keyboard commands.

Press stop recording (CTRL+F5 again) and the macro dialog appears, where you may choose a macro name. Your macro is now ready for use.

Macros are saved as .PME (PSPad macro record) files. They are is saved in the .\PSPad\Macro folder, which is created when you make your first macro.

You are able to open macros from disk, edit and save them.

Warning: You are not prompted when you save a macro by the same name as another. It simply overwrites the previous macro.

The following default hotkeys are available for your macros: F5, F6, Alt+F6, Ctrl+Alt+F6. But if you want to assign them to your macros, you will need to go into the Macro Manager (Shift+Ctrl+F5) after you have named your macro (see Macro Manager).

For a list of commands see Macro commands.

Limits

· Macro does not record mouse actions. Do block selections with Shift+Cursors.
· Macro does not work with find, replace and other functions.
· Macro length is unlimited (memory).

If you create a macro that selects text or uses arrows while you are in Word Wrap mode, it may act differently when you later execute the macro with Word Wrap off.

Macro editing

Choose menu Tools / Macro / Macro Manager / Edit macro, you will see macro content. You can use special highlighter and clips (Ctrl+Space).

Inclued with PSPad is user highlighter for macro file. For its use, you will need to manual added it (see Syntax highlight).

Recommended color settings for macro editing are as follows:

· Comments - Black, Normal Font
· Identifiers - Red, Normal Font (invalid commands will be colored in red)
· Keywords - blue, Normal Font

See Topics

Context Files

Tools Menu


Macro Manager

MakroRecord (Ctrl+F5)

MakroPlay

Macro Manager (Shift+Ctrl+F5)

Play

Play x-times

You can choose macro and specify number of times it is played.

Delete

Edit

Opens currently selected macro into new editor (see Macro commands).

Assign Shortcut

Assign a keyboard shortcut to the currently selected macro.

See Topics

Macro commands

Keyboard shortcuts

Mouse control

Keyboard commands


Macro commands

File Format

Each command requires a separate line. After character writing command, ecChar places desired character in {} curly braces. For example, the command ecChar{Hello} will output at current cursor position the word "Hello".

List of Commands

Command | Description
ecLeft | Move cursor left one char.
ecRight | Move cursor right one char.
ecUp | Move cursor up one line.
ecDown | Move cursor down one line.
ecWordLeft | Move cursor left one word.
ecWordRight | Move cursor right one word.
ecLineStart | Move cursor to beginning of line.
ecLineEnd | Move cursor to end of line.
ecPageUp | Move cursor up one page.
ecPageDown | Move cursor down one page.
ecPageLeft | Move cursor right one page.
ecPageRight | Move cursor left one page.
ecPageTop | Move cursor to top of page.
ecPageBottom | Move cursor to bottom of page.
ecEditorTop | Move cursor to absolute beginning.
ecEditorBottom | Move cursor to absolute end.
ecGotoXY | Move cursor to specific coordinates.
ecNextLineStart | Move cursor to next line begining.
ecSelLeft | ecLeft + ecSelection
ecSelRight | ecRight + ecSelection
ecSelUp | ecUp + ecSelection
ecSelDown | ecDown + ecSelection
ecSelWordLeft | ecWordLeft + ecSelection
ecSelWordRight | ecWordRight + ecSelection
ecSelLineStart | ecLineStart + ecSelection
ecSelLineEnd | ecLineEnd + ecSelection
ecSelPageUp | ecPageUp + ecSelection
ecSelPageDown | ecPageDown + ecSelection
ecSelPageLeft | ecPageLeft + ecSelection
ecSelPageRight | ecPageRight + ecSelection
ecSelPageTop | ecPageTop + ecSelection
ecSelPageBottom | ecPageBottom + ecSelection
ecSelEditorTop | ecEditorTop + ecSelection
ecSelEditorBottom | ecEditorBottom + ecSelection
ecSelectAll | Select entire content of editor, cursor to end.
ecCopy | Copy selection to clipboard.
ecScrollUp | Scroll up one line leaving cursor position unchanged.
ecScrollDown | Scroll down one line leaving cursor position unchanged.
ecScrollLeft | Scroll left one char leaving cursor position unchanged.
ecScrollRight | Scroll right one char leaving cursor position unchanged.
ecInsertMode | Set insert mode.
ecOverwriteMode | Set overwrite mode.
ecToggleMode | Toggle ins/ovr mode.
ecNormalSelect | Normal selection mode.
ecColumnSelect | Column selection mode.
ecLineSelect | Line selection mode.
ecMatchBracket | Go to matching bracket.
ecGotoMarker0 | Goto marker 0.
ecGotoMarker1 | Goto marker 1.
ecGotoMarker2 | Goto marker 2.
ecGotoMarker3 | Goto marker 3.
ecGotoMarker4 | Goto marker 4.
ecGotoMarker5 | Goto marker 5.
ecGotoMarker6 | Goto marker 6.
ecGotoMarker7 | Goto marker 7.
ecGotoMarker8 | Goto marker 8.
ecGotoMarker9 | Goto marker 9.
ecSetMarker0 | Set marker, 0.
ecSetMarker1 | Set marker, 1.
ecSetMarker2 | Set marker, 2.
ecSetMarker3 | Set marker, 3.
ecSetMarker4 | Set marker, 4.
ecSetMarker5 | Set marker, 5.
ecSetMarker6 | Set marker, 6.
ecSetMarker7 | Set marker, 7.
ecSetMarker8 | Set marker, 8.
ecSetMarker9 | Set marker, 9.
ecDeleteLastChar | Delete last char (i.e. backspace key).
ecDeleteChar | Delete char at cursor (i.e. delete key).
ecDeleteWord | Delete from cursor to end of word.
ecDeleteLastWord | Delete from cursor to start of word.
ecDeleteBOL | Delete from cursor to beginning of line.
ecDeleteEOL | Delete from cursor to end of line.
ecDeleteLine | Delete current line.
ecClearAll | Delete everything.
ecLineBreak | Break line at current position, move caret to new line.
ecInsertLine | Break line at current position, leave caret.
ecImeStr | Insert character(s) from IME.
ecUndo | Perform undo if available.
ecRedo | Perform redo if available.
ecCut | Cut selection to clipboard.
ecPaste | Paste clipboard to current position.
ecBlockIndent | Indent selection.
ecBlockUnindent | Unindent selection.
ecTab | Tab key.
ecShiftTab | Shift+Tab key.
ecUpperCase | Convert to uppercase. Apply to the current or previous word.
ecLowerCase | Convert to lowercase. Apply to the current or previous word.
ecToggleCase | Toggle case. Apply to the current or previous word.
ecTitleCase | Convert to title case. Apply to the current or previous word.
ecUpperCaseBlock | Convert to uppercase. Apply to current selection, or current char if no selection is made.
ecLowerCaseBlock | Convert to lowercase. Apply to current selection, or current char if no selection is made.
ecToggleCaseBlock | Toggle case. Apply to current selection, or current char if no selection is made.

See Topics

Macro Manager

Keyboard shortcuts

Mouse control

Keyboard commands


Keyboard shortcuts

Here you will find a complete list of the default keyboard shortcuts. For information on how to change the default see Key mapping.

Sections

Settings | Edit
File | Window
Format | Search
Show | HTML
Help | Tools
Insert | Template
Makro | Bookmark
Project | TextDiff

Settings

Shortcut | Command | Description
Shift+Ctrl+Up/Down | Whole Words Only |

Edit

Shortcut | Command | Description
F8 | Block Selection |
Ctrl+C | Copy | Copy selected text to clipboard
Ctrl+X | Cut | Cut selected text to clipboard
Ctrl+V | Paste | Insert clipboard text to cursor position
Shift+Ctrl+V | Paste Without Cursor Change |
Shift+Ctrl+Z | Redo | Redo Last Undo
Ctrl+A | Select All | Mark all text as selected
Shift+Ctrl+' | Select String |
Ctrl+Z | Undo | Undo last change
Shift+Ctrl+M | SelMatchBracket |
Ctrl+' | SelString2 |
Ctrl+Ins | CopyEx |
Shift+Del | CutEx |
Shift+Ins | PasteEx |

File

Shortcut | Command | Description
Ctrl+F4 | Close | Close active file
Ctrl+F9 | Compile | Run external compiler to compile file
Ctrl+Alt+F4 | Exit | Exit PSPad
Esc | Exit with ESC |
Ctrl+N | New file... | Create new file
Ctrl+O | Open... | Open Selected File(s)
Ctrl+D | Open Active File with New Name... |
CTRL+ALT+Z | Restore last closed file | Restore last closed file and all previously closed one by one
Shift+Ctrl+O | Open in HEX Editor... |
Ctrl+P | Print | Print open file
Alt+P | Print Preview | Print preview
Ctrl+R | Reopen Active File | Reopen active file & Discard Changes
Ctrl+S | Save | Save file
Shift+Ctrl+S | Save All | Save changes of all open files
F12 | Save As... | Save open file as file
Ctrl+Alt+S | Save Without changing File Date |
F9 | Run1 |
Alt+F9 | Run2 |
Shift+F9 | Run3 |

Window

Shortcut | Command | Description
Ctrl+L | Show / Hide LOG window |
Ctrl+Tab | Next Window | Goto next file
Shift+Ctrl+Tab | Previous Window | Goto previous file
Alt+L | Jump to Editor / LOG |
Alt+1 | FileTab1 |
Alt+2 | FileTab2 |
Alt+3 | FileTab3 |
Alt+4 | FileTab4 |
Alt+5 | FileTab5 |
Alt+6 | FileTab6 |
Alt+7 | FileTab7 |
Alt+8 | FileTab8 |
Alt+9 | FileTab9 |

Format

Shortcut | Command | Description
Ctrl+Alt+Left | Justify Left |
Ctrl+Alt+Right | Justify Right |
Ctrl+Alt+T | Capitalize | Capitalize char case
Shift+Ctrl+A | Add/Remove Comment |
Shift+Ctrl+I | Indent Block | Indent block
Ctrl+Alt+L | To Lower Case | Change chars to lower case
Ctrl+K | Reformat (paragraph=blank line) | Reformat block of text with right edge settings
Shift+Ctrl+K | Reformat (paragraph=short line) | Reformat block of text with right edge settings
Shift+Ctrl+U | UnIndent Block | UnIndent block
Ctrl+Alt+U | To Upper Case | Change chars to upper case

Search

Shortcut | Command | Description
Ctrl+F | Find... | Text search
F3 | Find Next | Search text for next occurrence
Shift+F3 | Find Previous | Find previous occurrence
Shift+Ctrl+Up | Previous Occurrence of Current Word |
Shift+Ctrl+Down | Next Occurrence of Current Word |
Ctrl+G | Goto Line... | Jump to selected line
Ctrl+E | Incremental Search | Incremental Search
Ctrl+M | Matching Bracket | Find matching bracket (cursor before bracket)
Ctrl+H | Replace... | Replace text with other text

Show

Shortcut | Command | Description
Shift+Ctrl+E | Code Explorer window |
F2 | Show/hide panel |
Ctrl+W | Word Wrap Lines | Switch on or off lines wrapping

HTML

Shortcut | Command | Description
Alt+C | Color Selector window | Color Selector window
F10 | HTML Page Preview | Show HTML page in internal browser
Shift+Ctrl+T | Select TAG |
Ctrl+F10 | HTMLCheck |
Shift+Ctrl+F10 | WebPrev |

Help

Shortcut | Command | Description
Alt+F1 | Help for Language |

Tools

Shortcut | Command | Description
Alt+A | Char Table | Open ASCII and Symbol table
Ctrl+J | Auto Completion |
Alt+M | Clipboard Monitor window |
Ctrl+Space | Show Clips |
Alt+I | Insert Text into Lines... |
Alt+Q | Repeat last command |
F7 | Spell Check |
Ctrl+F7 | Spell Settings... |
Shift+Space | ClipRun |

Insert

Shortcut | Command | Description
Alt+D | Insert Date Time | Insert date & time

Template

Shortcut | Command | Description
Ctrl+Alt+Space | Create Clip from Block | Create new Clip from selected text

Makro

Shortcut | Command | Description
Shift+Ctrl+F5 | Macro Manager |
Ctrl+F5 | MakroRecord |
F5 | Makro1Play |
F6 | Makro2Play |
Alt+F6 | Makro3Play |
Ctrl+Alt+F6 | Makro4Play |

Bookmark

Shortcut | Command | Description
Alt+Right | Delete Bookmark |
Alt+Down | Next Bookmark |
Shift+Ctrl+B | Bookmark List | Bookmark list
Alt+Up | Previous Bookmark |
Alt+Left | Set/Delete Bookmark |

Project

Shortcut | Command | Description
Ctrl+F2 | Tool Panel | Show / Hide tool panel
Shift+Ctrl+Del | Remove File from Project | Remove file from project
F2 | Rename |

TextDiff

Shortcut | Command | Description
Shift+Ctrl+G | View Source |

See Topics

Mouse control

Key mapping

Keyboard commands

Macro Manager

Macro commands


Mouse control

Shortcut | Command
Left Click | Position cursor. Move right edge using ruler.
Right Click | Display context menu.
Middle Click | Display clip list. Closes file using file tab.
Left Click, hold & drag | To select normal block. Rearange file tabs. Add file to project for file tab. Add file path to editor for project panel. Add object to editor from code explorer.
Left Click Selected Text, hold & drag | Move selected text.
Double Left Click | Select word. On tab panel brings up new file dialog box. On file tab, closes file.
Alt+Left Click, hold & drag | To select column block.
Shift+Left Click | Select block from cursor position. On file tab, closes file.
Ctrl+Left Click Selected Text, hold & drag | Copy selected text.
Ctrl+Scroll Wheel | Zoom editor. Scroll up zooms in. Scroll down zooms out.
Ctrl+Drop file into editor | Inserts file name(s).
Ctrl+Left mouse on left gutter | Creates bookmark.
Ctrl+Right Click, hold | Move to scroll window.
Ctrl+Double Left Click | Select text inside quotes.

See Topics

Keyboard shortcuts

Key mapping

Keyboard commands

Macro Manager

Macro commands


Files and folders

Files and folders location is relative to PSPad.EXE. Some folders are created as needed.

PSPad doesn't need installation. To work you need only PSPad.EXE. If you use PSPad in MultiUser mode (WinNT), some configuration and user files are stored in user profile directory (usually .\Document and settings\User\Application data\PSPad)

Files and directory structure

Main Folder

PSPad.exe Editor executable file. This is all you need.

PSPad.chm Application help file.

PSPad.ini Application settings. In MultiUser mode, it is stored in user profile.

PSPad_MU.ini Common settings for all users

Licence.txt Application licence.

ASCII.ini list of HTML entits and control chars for ASCII chart. (See Tools Menu)

Google.ini Configuration file for Google interface.

pspShellx64.dll explorer context menu extension for x64 systems

pspShell32.dll explorer context menu extension for x32 systems

PSPadStarter.exe this file is associated in registry instead of the "big" PSPad. It speeds up file opening with double click

Notepad.exe Replacement for standard Notepad.EXE. It's only a PSPad starter.

Notepad.txt Notepad.EXE description

Online.ini Links for Online help and Online tools (menu Help)

phpCB.exe PHP beautifier

PhpCBCFG.ini configuration file with PHP beautifier profiles

TiDy.exe command line tool for HTML code check and format.

TiDyCFG.ini TiDy configuration file (section are displayed in menu HTML). (See HTML TiDy)

WWWTools.ini HTML preview commands definitions

libeay32.dll OpenSSL optional files for FTP ciphering (TSL/SSL)

libssl32.dll ditto

msvcr71.dll ditto

Colors (subfolder)

Color schemes (.INI files)

Context (subfolder)

Files with clips (.DEF files). If you open file with some syntax highlighting, corespondent clip file is opened automatically.

BAT.def

HTML.def

:

VBScript.def

Convert (subfolder)

User converter files (.INI files)

Lang (subfolder)

Files with PSPad localization (.INI files) and flag files (.BMP files)

Plugins (subfolder)

PSPad File handling plugin (.DLL files)

Script (subfolder)

Flies for active scripting. Sorted by script language in to subdirectories. Must contain only script files!

Skin (subfolder)

Toolbar button icon sets (.BMP files). File is organized as strip of individual icons. Background color (transparent) must be same for all icons and it's defined by pixel on position 1,1

Spell (subfolder)

Dictionaries for spell checker (.DIC files). Here you find UserDictionary (if no multiuser PSPad chosen).

Lorem*.txt

Files for Lorem Ipsum generator.

Syntax (subfolder)

User highlighter definitions (.INI files)

Template (subfolder)

File / New / User Template offers skeletons for ASP, PHP, HTML, XML, XSLT...

Common settings for all users.

PSPad_err.log LOG file with detailed error info

AutoCorr.txt list of Autocorect entries.

PSCache.bin contains file state of previously opened file. In MultiUser mode is stored in user profile. You can delete it if you want.

Recent.ini Recent and workspace files. In MultiUser mode, it is stored in user profile.

Search.ini Search settings. In MultiUser mode, it is stored in user profile.

KeyMap.ini configuration file with current shortcut mapping (see program settings / KeyMap)

Variable.ini configuration file with user variable definitions (see settings menu / User variables)

Macro (subfolder)

Stored recorded macros (.PME files)

Spell (subfolder)

Here you find UserDictionaries (data added to spell check dictionaries by users)

See Topics

HTML Menu

HTML TiDy


Template Files

Template files allow you to create boilerplates for various file types. For example, if you were working on a particular web project you might have just 2 or 3 page layouts that you use where only the content is different. In this case it would save a great deal of effort if you could create a new file with all of the markup done so you only had to enter the actual content.

PSPad allows you to have any number of different template files for any file type.

How do I create a template?

Simply open a new file and save it in the /Templates directory with the correct file extension. You can save your template with any (legal) name you like but if you create a template with the name 'default' then each time you create a new file based on that file type a copy of your template will be used.

Example - Creating a default template for JavaScript files:

Create a new text file.

Enter the following text:

/* ******************************************* */

/* File Name: */

/* Author: */

/* Description: */

/* ******************************************* */

Save the file as default.js in the /Templates directory (there may be one in there already so rename it before saving your own).

Now, select the File / New menu option and choose 'New File' and 'JavaScript' from the dialog box. The system will create a file called something like 'New1.js' and the file will contain the text that you entered in to the template.

How do I use a template other than the default one?

Each file type with at least one defined template is included on the tree view that is displayed when you select the File / New menu option and click on the Use Template' radio button (see below).

Simply double-click on the template you require and it will be loaded.

Remember: The name you save your template file with will be what is displayed in the dialog box show above, so try and give your files meaningful names.

At the bottom of the dialog, you will see a checkbox marked 'File name same as Template name'. Normally PSPad creates file with a name like 'New1' with the relevant extension. If you check this box then the file name will be the same as the template name, so, for example, if you checked the box and then double clicked on the 2nd entry in the HTML template list, your file will be called glossary.html.

See Topics

Interactive Clips


Context Files

Context files contain information used for 2 important PSPad features; Show Clips (Ctrl+Space) and Auto Completion (Ctrl+J).

Context files are stored in the /Context sub-directory of you main PSPad folder with a .DEF file extension. The format of these files is described below

Context File Format

The context file has 3 main sections; clip definitions, clip macro definitions, and keywords used for auto-completion.

Clips are templates or pieces of boilerplate code that can be placed at the cursor position in your file. Some of these clips can operate on selected text in a file (See Clips).

The clip macro definitions referred to here are used in 'interactive clip' definitions. These interactive clips make it possible to have blocks of code generated from templates but unlike standard clips, the user can supply values to influence the output (See Interactive Clips).

Auto-completion is a mechanism designed to speed code entry. Auto-completion, when called, will display a popup list of words matching that which you have entered. This list will be made up initially from words listed in the [Keywords] section of the .DEF file. The system will also include words from the file you are working on so that, as you type, things like variable names, etc are added to the list.

There are a number of context files supplied with PSPad. They have the same name as the highlighters they are used with.

Some of the context files supplied include:

· SP.def
· Bat.def (MS-Dos batch files)
· CPP.def (C++)
· CSS.def (Cascaded style sheets)
· FoxPro.def
· HTML.def
· Java.def
· JavaScript.def (JavaScript)
· Pascal.def
· Perl.def
· PHP.def
· VBScript.def (Visual Basic script)
· XML.def

See Topics

Macro

Tools Menu

Program variables


Clips

What are clips?

Every clip consists of a name, a description and some content. The name and description is displayed in the clip list that pops up when you call it with the shortcut Ctrl-Space. The selected clip's content is inserted at the cursor position. The content of a clip can be an unlimited number of lines and the structure of the clip in the definition is kept when it is inserted into your file. The clip definitions are not fixed and you can edit the existing definitions or add your own.

Note: The .DEF files are usually reinstalled with each new version of PSPad so if you edit them you should ensure that you have copies before installing any upgrades.

How to call a Clip

Pressing Ctrl-Space will produce the entire list of clips in the file. You can scroll up and down the list to find the entry you want and the press Enter or click on it with the mouse to select it. You can also start to type the name of the clip entry you want and the list will scroll to the closest match. If you enter the name of the clip you require, or part of it, before pressing Ctrl- Space the list will open at the closest match. You can also assign a keyboard shortcut or "Hotkey" to a particular clip (see Settings Menu for details). Clips with a keyboard shortcut are also listed under the Settings menu > Clips Hotkeys. If you type the full clip name then pressing Shift+Space will enter the clip's content directly into the file without displaying the clip list.

Clip file format

The clip definition format is very simple: [name |x description]*shortcut

· [...] - Required characters.
· name - This is the name of the clip that will appear in the clip list and will appear in a bold font.
· | - This is a required character that separates the clip name from the description.
· X - This (optional) character sets the colour that the clip entry will appear as in the list. Choose one of:

M - Maroon

R - Red

N - Navy

B - Blue

P - Purple

F - Fuchsia

G - Green

D - Dark gray

· * - This character is optional and is only required if a shortcut or hotkey is to be defined for the clip.
· Shortcut - This entry is only required if a shortcut or hotkey is defined. If multiple keys are required for the hotkey then they should be key1+key2. (See Keyboard commands)

The clip content starts on the line immediately after the definition and continues until the start of the next definition or the end of the file.

Variables

In the PSPad Menu settings / User variables you can find lot of variables which can be used in code clips. You can include current date and time, computer or user name e.g. to comments. There is possible to insert current file in different formats. If it isn't enough, you can define your own variables with static content.

Example: This clip example will create comment with lot of automated information:

[comment|extended comment]

/**************************************************

created: %DateTime%

user: %UserName%

computer: %ComputerName%

by: %PSPad%

**************************************************/

Special characters

| - cursor placement

§ - selected text placement

The content is entered into your file exactly as it is entered here. There are 2 special characters that you can use in your content; | and § (ALT+167). When your clip is used the cursor will be placed at the position occupied by the | character. If you include this character more than once in your clip content then only the first position will be used. If you have any text highlighted in your file when you call the clip and the clip's content includes the § character then that character will replace the selected text. You can use the § character multiple times; each occurrence will be replaced with the selected text in your file.

There is possibility to redefine special characters to any other chars:

[Clip settings]

CursorChar=|

SelectionChar=§

Comments

; - (semicolon) comment in the clip definition. This line is ignored

;; - (2 semicolons). This construction is used in case you need to put (one) semicolon into result code.

Note: You cannot have a line in your clip content that starts with the open square bracket, [ character as this marks the beginning of the next clip definition.

Special sections

[Tree content]

Prepared for future usage - separate window with list of clips tree.

Section name starts from the begin of line.

Individual clips are indented by one space.

[KeyWords]

This section contains list of names what are offered in autocompletion list (Ctrl+J). You can put there e.g. list of system functions (see the PHP clip file)

Example:

[a |link]*Ctrl+Alt+A

<a href="|" title="§">§</a>

Original text (select text "Link name" and then call the clip "a"):

This text will contains link with Link name.

Result:

This text will contains link with <a href="|" title='Link name'>Link name</a>

As you can see, cursor is on the place where you will write URL address and selection was used on two places in clip


Interactive Clips

This chapter assumes you've read and understood the chapter on Clips.

What are Interactive Clips?

Clips insert text in to your file. Standard clips insert fixed text defined by the clip content. Interactive clips allow you to modify the content of the clip definition before it is inserted into your file using clip macros. You do this by defining your clip macros to use various Windows controls such as text boxes, combo boxes and checkboxes.

How do they work?

The basis of interactive clips is the control definition in the section [Macro definition] at the top of the .DEF file. This section contains all of the common definitions for all of the clips in this particular .DEF file. The clips macros are all stored at the top of the file so that they can be used in many clip definitions.

Note: When an interactive clip is called if no value is entered for a particular macro and that macro has no default value then nothing from that macro will be inserted in to your file; if you need an empty value for a particular macro you must enter a space.

Clip Macro Format:

The clip macro format is as follows

%control%=@x caption,text,default,options,delimiter,dialog_type

%control% The name used in the clip body. The name must contain only alphanumeric characters - no spaces or punctuation characters.

@x Type of control can be one of:

@-- = Separator

@C = Combo box

@D = Date dialog

@E = Text box

@F = Font selection dialog

@K = Checkbox

@L = Colour picker dialog

@O = File Open dialog

@P = Picture selection dialog

@S = Directory selection dialog

@T = Topstyle

See below for further details.

caption This text will appear as a label for the control in the dialog.

text Optional fixed text that will be inserted into your file immediately the value you enter in to the control.

default The default value. This value will be used if you don't enter a value of your own in to the control. (optional)

options Depends on the control used, see below (optional).

delimiter These optional Characters will be inserted around value entered into the control (optional). Note: If you use
a value for 'text' (see above) this value will not be bracketed by the delimiters.

dialog_type Only used when @x = @O (optional). One of:

A = Absolute path and slash type, or

R = Relative path and slash type

If this value is blank then and the file being edited is an HTML file then the path returned by the control will be relative to the file's path and the path delimiters will be slashes (/). Otherwise the path returned will be absolute and will use backslashes (\).

If you need to include a comma in the value supplied, say, as 'default' or 'options' you need to enclude the comma in quotes.

You don't need to include the optional items although you do need to include the correct number of separating commas if you want to include one of the latter optional items without supplying a value for an earlier one. Special chars or values with spaces would be entered inside double quotes.

Control types:

@-- = Separator

This produces separator line only

@C = Combo box

This produces a list of values from which the you can select one. The list is entered as a semicolon-separated list of values for the options parameter. If the values contain spaces then they must be enclosed in double quotes.

Examples:

%combo1%=@C Centering type:,CENTER=,left,left;right;center,"

%RGB%=@C RGB color:,RGB=,,"255,255,255";"#FFFFFF";"FF;FF;FF";"FF FF FF","

@D = Date dialog

This produces a control that allows you to enter a date. The control also allows you to call up a calendar to use to select the date required.

Example:

%date1%=@D "Enter date:",Date=

@E = Text box

This is a normal edit textbox to enter general value. If your supply no control type in the clip macro definition, @E is assumed.

@F = Font selection dialog

This produces a combo box containing a list of all fonts installed on the system.

Example:

%fonts%=@F Font face:,font-face=,,,"

@K = Checkbox

This produces a simple checkbox control. If the value of Default is not blank then the control is initial checked.

Examples:

%check%=@K No shade,NoShade

%check%=@K Remember,REMEMBER,,,!!!

@L = Colour picker dialog

This produces the standard Windows colour picker dialog.

@O = File Open dialog

This produces the standard Windows File Open dialog. The options parameter can contain file filters.

Examples:

%file%=@O Reference:,HREF=,,Html files (*.htm;*.html)|*.htm;*.html,"

result: HREF="project/files/soubor.htm"

%file%=@O File:,,,PAS files (*.pas)|*.pas,',A\

result: 'c:\temp\soubor.pas'

%file%=@O File:,,,C files (*.c)|*.pas,,R\\

result: project\\source\\soubor.c

@P = Picture selection dialog

This produces the standard Windows Picture Open dialog.

@S = Directory selection dialog

This produces the standard Windows Directory Select dialog.

@T = Topstyle

This invokes the TopStyle CSS editor. Note: You must have previously installed TopStyle for this to work.

Using clip macros.

You use the clip macros you have defined by simply inserting the clip macro name, bracketed by percent signs (eg %mymacro%) in the clip definition. You can use the same control name several times throughout a clip body. When you do the control appears only once in the dialog when the clip is called but the value entered is inserted to the every occurrence of control in clip body.

When a clip is called that uses a clip macro, the dialog that is displayed has 3 buttons: OK, Repeat and Cancel. The function of the OK and Cancel buttons sis self-explanatory. The Repeat button functions a little like the OK button except that is does not dismiss the dialog. Instead the clip text is entered in to your document and the macro 'resets' itself so that you enter another set of values.

Example 1:

[Macro definition]

%file%=@O Reference:,HREF=,,Html files (*.htm;*.html)|*.htm;*.html,"

...

[ahref | simple reference <a href=...>...</a>]

<a %file%>|</a>

When the clip is called you will see a file open dialog. Once a file is selected the inserted text will look something like:

<a HREF="choosen file.htm"></a>

and cursor will be positioned then the "|" character appears in the clip definition.

Example 2:

[Macro definition]

%proc%=@E Procedure name:

%autor%=@E Author name:

...

[proc | procedure base]

// Procedure: %proc%

// Author: %autor%

procedure %proc%;

begin

|

end; {procedure %proc%}

When the clip is called you will see a dialog with two text boxes. Once values for 'Procedure name' and 'Author name' are entered the result will look something like:

// Procedure: ShowDialog

// Author: Jan Fiala

procedure ShowDialog;

begin

end; {procedure ShowDialog}

Note how the clip macro %proc% has been used more than once in the clip macro definition.

Example 3:

[Macro definition]

%Number%=@E, Enter Number ," ,",,,

...

[number | number with comma]

%number%

After calling the clip and pressing the Repeat button a number of times a series of numbers and commas will be inserted like this:

,123, 456, 12, 5

See Topics

Template Files

Program - look

Macro Toolbar


File locking

What is file locking for?

Some file locking mechanism is useful if several people works on the same project - they sharing same sources. You can use any robust CVS (concurrent version system), but for small projects or in some cases light solution is better.

Form of locking mechanism in PSPad

1. lock using R/O attribute
2. lock using special file

Condition

All users must have same locking mechanism set

Lock using R/O attribute

When you open file, PSPad will automatically sets R/O attribute for this file.

When file is open by another user, PSPad informs him, that file is edited by another user and lets open file for reading only without possibility to edit it.

When file is closed by user who open it, PSpad will remove R/O attribute

This is the most simple method. It's easy to solve states - reset R/O attribute on file.

Smart file locking with LCK file

When file is open, PSPad creates new file with same name and extension and ads .LCK extension.

When another user opens file, he get information, who is currently editing the file - the lock file contains computer name and user name.

PSPad allows open file for reading to another user when file is locked.

LCK File is automatically deleted if file is closed.

Advantages of LCK file method:

· when PSPad crashes, user can simply start and continue in work - PSPad knows who locked file
· file is updated with each file save
· PSPad allows second user edit file after some time of last update of LCK file (e.g. internet blackout)
· you can easy solve problematic state by deleting LCK file manually


Save desktop

What does it mean?

This means that PSPad will remember which files are open when you close the program. Then it reopen them all when the program is restarted. Also the by enabling Remember File State, cursor position, highlighter, and bookmarks are saved each file you have opened.

How do you enable desktop saving?

For details about how to enable or disable desktop saving see Files and dirs.

Philosophy (How does it works?)

If desktop saving is disabled then no record is kept of which files are open when the program exists. When PSPad restarts it opens in the default state using the option "Auto Open New File after Start" (see Program - behaviour).

If you set desktop saving to be on all the time then starting PSPad by say, double clicking on a file in Windows Explorer and then exiting PSPad again will cause the system to reopen that file when you next start PSPad.

The third option for desktop saving means that only files opened directly in PSPad, rather than by, say, double clicking in Windows Explorer, or dragging and dropping a file on to the PSPad shortcut, are remembered. What this means in practice is that you can have a project open, close PSPad, then later open PSPad via Windows Explorer without having your remembered desktop overwritten.

See Topics

Files and dirs


File Menu

New file... (Ctrl-N)

Create a new file. When selected, this option will display a dialog box that lists all the registered file types (see Customizing PSPad - Highlighter Settings'). You can choose from 3 options at the top of the form:

§ New File
§ Use Template
§ Recent Files

New File

This option will open a new file of the selected type. Ordinarily this will be a blank file. However, if a file named default.???' (where ??? is the relevant file extension) exists in the \template sub-directory then that file will be used as the basis for the new file.

Use Template

This option will display a list of defined templates. These templates are stored in the \templates sub-directory. More than one template for each file type may exist and you can create your own. Once a template is selected it will be used as the basis for the new file.

There is a checkbox at the bottom of this window; 'File name same as Template Name'. When this option is unset, the newly created file will be called 'NewXX.???' (XX is a number and ??? is the appropriate file extension). When the option is set the file table will be whatever the description of the template was. For example the

template 'Simple HTML' will create a file called 'Simple HTML.html'.

Recent Files

The option will display a Most Recently Used (MRU) file list. Selecting one of the displayed files will open that file. In this respect, the function is 'open file' rather than 'new file'

Note: You can also invoke this dialog by double-clicking anywhere in the file name tabs toolbar.

Open ...(Ctrl-O)

Opens selected file as text

Open in HEX editor (Shift-Ctrl-O)

Opens selected file directly in HEX editor. You may open any file in the HEX editor, even binaries.

Warning: You can ruin an .EXE or .DLL file with one bad character if you don't know what you are doing!

Close File (Ctrl-F4)

Closes the current file. If the file has not been saved you will be prompted to save it.

Close All

Close all files include project

Compile (Ctrl-F9)

Call the defined compiler. Enabled only if a compiler is set in highlighter settings or in Project Settings.

Open with Program

You can open active file in an external application. Programs are set in Highlighter settings individually for each environment.

Note: The first 3 defined applications are assigned the shortcut keys F9, Alt-F9 and Shift-F9 respectively.

Sessions...

Session allows you save currently open files as named session. You can anytime restore your files back at once by opening session. There is no limit for number of sessions.

Open Special

See Open Special.

Connect to FTP

See FTP panel

Open favourite

See Favourite panel

Save (Ctrl-S)

Save the current file. If the file has not previously been saved then the 'File Save As' dialog will open first.

Save As... (F12)

Saves the current file with new name.

Move As...

Saves the current file to new location. The file is deleted from the old location.

Save All (Shift-Ctrl-S)

Saves all changed files. If a file has not previously been saved the 'File Save As' dialog will open first.

Save to FTP

Saves active file to the open FTP connection.

Detach file from FTP

If you open file directly from FTP, PSPad remembers FTP connection for this file. If you call Save function, PSPad automatically saves file to FTP too. Detach from FTP will breaks this connection and you can work with file as with local file.

Save Block As...

Saves the selected text as a file.

Export

See Export.

File Info

Shows file statistics.

o General Display word, line and character counts, file path and size, maximum line length date and time of file creation and last save.
o Characters View a count and frequency distribution of each character in the file.
o Words View a count and frequency distribution of each word in the file.

Read-only

Toggles file read-only status. When set as read-only the file name on the file tab is in italics.

Print (Ctrl-P)

Print the current file.

Print Preview (Alt-P)

View a print preview of the current page

Page Setup...

Set up page margins, control printing of page header, etc.

Printer Settings

Set printer settings.

Exit (Alt-F4)

Exit program

See Topics

Project Menu

Main Toolbar

File Tabs Context Menu

Statusbar Explained

User highlighters

View Menu

FTP

Export


Open Special

Reopen Active File (Ctrl-R)

Reopen active file, discarding any unsaved changes made to it.

Open R/O Copy

Opens a new copy of active file as Read Only. Title in file tab is in Italics.

Open Active File with New Name (Ctrl-D)

Opens active file again with name you enter. It combines functions "Save as" and "Open"

Open file from Internet

Opens file specified by URL address directly from internet (http://....).

Note: You can also open a file from Internet in an active FTP session, using either "Direct Edit in PSPad" or "Open as Text".

Open selected file in default application

Opens file whose file name specified by the selected text. If file is URL address, file is open in default web browser. If you press CTRL key when calling this function the source code from web is displayed in PSPad.

Restore last closed file (Ctrl+Alt+Z)

This function restores last closed file(s) one by one

Clear recent file list

This function clears all recent files include recent projects

Remove nonexisting recent files

This function will check all files in recent list one by one and check if file exists. Nonexisting files are removed from the recent file list.

There may be a number of files listed in the the line in this menu. This is the Most Recently Used (MRU) list. Clicking on any item in the MRU list will openingh.


Export

As e-mail content

The current file is copied in to the body of a new mail message.

As e-mail attachment

The current file is saved as a file and the file is included in a new mail message as an attachment.

Save using plug-in...

Save the current file with file using file type plug-in. Name of file isn't changed.

Export...

Save the current file, complete with syntax highlighting, as either RTF, HTML, XHTML or TeX file.

Export to clipboard as RTF

Save selected text. complete with syntax highlighting, in RTF format to the clipboard.

Export to clipboard as HTML

Save selected text. complete with syntax highlighting, in HTML format to the clipboard.

Export to clipboard as TeX

Save selected text. complete with syntax highlighting, in TeX format to the clipboard.

See Topics

File type plug-ins

File Menu


Project Menu

New Project...

Creates new project. If you have a project open you will be prompted, if necessary, to save the Project file. If you have any files from the project open you will also be asked if you want them to be closed before the new project is created.

There is no 'Close Project' option. If you explicitly want to close a project then select the 'New Project' option. The new project is not 'active' until at lease on file has been added to it.

Create Project from Directory...

This option allows you to select a directory on your disk (or from a network drive). Once you have made a selection PSPad will:

1. Name the project using the selected directory name.
2. Create virtual folders in the Project tree named for any sub-directories found off the selected directory.
3. Add each file found in the directory structure on disk to the relevant folder in the Project tree.

Add all open files

Add all open files to selected folder in current project.

Open Project...

Opens existing project and restores the project's state.

Save Project

Saves the Project file.

Save As... (F12)

Saves the current file with new name.

Open Folder Files

This option will open in PSPad all of the files in a virtual folder. This option is only available if you click on a virtual folder.

Close Folder Files

This option will close any files that are in a virtual folder if they are open in PSPad. This option is only available if you click on a virtual folder.

Set File as Main for Compiler

Sets the file as main project file. If you run the compiler (see Compiler Settings) the file marked as Main is always sent to the compiler. This option is only available if you click on a file.

Find file in project

This function will find and highlight current file in project structure

Project Information

Shows the project information. (See Working With Projects)

17 Project Settings...

Shows the project settings. See Working with Projects.

The end of the menu will contain a Most Recently Used list of Project files; double-clicking on any one of them will open that Project file.

See Topics

File Menu

Main Toolbar

File Tabs Context Menu

Statusbar Explained

User highlighters

Working With Projects

Project Context Menu

Control Toolbar

External applications

Command/Compiler Variables

Window Menu

Program - behaviour


Edit Menu

Undo (Ctrl+Z)

This option undoes the last action. The number of actions you can undo is limited by Max UNDO Operations setting (see Editor - settings).

Redo (Shift+Ctrl+Z)

This option reapplies any actions undone using the Undo option.

Cut (Ctrl+X)

Cuts the selected text and places it in the Windows clip board. The action taken if no text is selected is controlled by Extended Cut and Copy (See Editor - behaviour). This option is not available if no text is selected and 'Extended Cut and Copy' is not checked.

Copy (Ctrl+C)

This option undoes the last action. The number of actions you can undo is limited by Max UNDO Operations setting (see Editor - settings).

Paste (Ctrl+V)

Places any text in the Windows Clipboard in to the file at the cursor position.

Paste Special

See Special Paste.

Delete

Deletes the selected text. This option is not available if no text is selected.

Lines Manipulation

See Lines Manipulation.

Special conversion

See Special Conversion.

Insert Date Time (Alt+D)

Inserts the current system Time and Date based on the currently selected option (see Date Dialog).

Date Time Dialog...

See Date Dialog.

Insert GUID

This option generates a GUID (Global Unique IDentifier) and inserts it at the cursor position.

Select All (Ctrl+A)

Selects all the text in the file.

Select inside brackets (Shift+Ctrl+M)

Select String (Shift+Ctrl+')

This option only works if the cursor is somewhere within a quoted string and will cause the whole of the string, complete with the enclosing quotes, to be selected.

Note: You can nest quotes, but the inner quote character must be different to the outer ones.

A related option is called using Ctrl+'. This option does the same as 'Select String' above but does not include the quotation marks in the selection.

Select TAG (Shift+Ctrl+T)

This function only works if the cursor is somewhere inside an opening tag and is only available when editing files associated with the HTML and XML highlighters. The option will cause all of the text from the beginning of the opening tag to the end of the closing tag to be selected. This will work when tags with the same name are nested.

Select Inside Bookmarks

This function selected text inside nearest bookmarks

Sort...

See Sort.

Selection Type

See Selection Type.

Note: If file is in Read/Only mode, text changing function are disabled


Special Paste

Paste as HTML

If you copy formatted text from some MS product IE or Word, for example - you may paste this into a document along with all the HTML code generated by the source program.

Paste without Cursor Change (Ctrl+Shit+V)

Normally when you paste text in to a file the cursor is moved to the end of the inserted text. If you use this option rather than the normal paste option, the cursor will remain in the place it was before the paste operation

Insert from File

This option allows you to choose a file the contents of which are inserted in to your file at the cursor position.

See Topics

Edit Toolbar

HTML Toolbar

Program - behaviour


Lines Manipulation

Duplicate Line

A copy of the current line is placed on the line immediately below it.

Swap with Line Bellow

Current line is swapped with the one below it. If some text is selected, this function swap all lines from block to reverse order.

Swap with Line Above

Current line is swapped with the one above it. If some text is selected, this function swap all lines from block to reverse order.

Swap lines in block

Exchanges order of lines in selected block

Join Lines

Replaces line ends with spaces and creates one long line from selection

Split lines

Splits line is opposite to the Join line function. It splits long line into individual lines and as the separator takes space or tab character

Insert Text into Lines... (Alt+I)

See Insert Text Into Lines.

Remove Email Quoting

This option removed the ">" characters that mark quoted lines in email messages. This option will operate on the entire file unless there is highlighted text.

Remove Redundant Spaces...

This option will give you the option of removing leading and/or trailing spaces from the text as well as "compressing" any spaces within a line to a single space. This option will operate on the entire file unless there is highlighted text.

Remove Blank Lines

This option will remove any completely blank lines in either the highlighted text or the entire file.

Remove Redundant Blank Lines

This option will "compress" multiple blank lines in the selected text, or entire file, to a single blank line.

Remove Duplicate lines

This function removes duplicated lines from selection and creates the unique list of lines


Insert Text Into Lines

This dialog box will preform the following operations:

· Insert text at beginning and/or end of a line.
· Insert text at a specified cursor position.
· Insert line numbering.
· Insert bullets.

At lines Begin

This causes text to be entered at left margin not before first character. This means there will be spaces/tabs between inserted text and first character on the line if line is indented. The item marked 1 in the image is where the text to be inserted is entered. This is a drop down list of any entries that have been made in this dialog in this session of PSPad.

At lines End

This causes text to be entered immediately after last character on the line.

Skip whitespace on the begin

This option when checked with insert begin text in front of the first non-whitespace character.

Before Character Number

This causes text to be inserted at column named in the text box. If a line is too short to have a column at the named position then text is added to end of the line. The item marked 2 in the image is an indication of the current cursor position. If the Before Character Number option is selected you can click on this figure to automatically set it as the column position in which text will be entered.

Numbering

This option allows you to insert numbering at the start of every line in the file or every selected line.

The values marked 3 in the picture above show you how your numbering will look when applied.

The value entered in the box marked 4 in the picture is used as the starting value.

The value entered in the box marked 5 in the picture determines how many characters will be used for the numbering. The numbers are left-padded with zeros.

The character(s) entered in the boxed marked 6 above are used to separate the numbering characters from the text on the line.

Bullets

This option inserts bullet marks at the front of each line.

Note: You should switch Word Wrap off before using any of these functions.


Special Conversion

Decimal -> Hexadecimal

Convert selected text from decimal and hexadecimal. The functions will only work if the selected text contains a valid string in the source base. That is, trying to convert the string "99" from decimal to hex will work (63) but trying to convert the string "cat" won't. Similarly the string "ACE" would convert from hex to decimal (2766) but "AXE" will not. The function will only work on one "word" at a time so the string "112 113 114" would have to be converted in 3 parts.

Hexadecimal -> Decimal

Convert selected text from decimal and hexadecimal.

ANSI -> URL

Convert selected text to encode/decode characters that are not normally allowed in URLs to a form that is acceptable. For example SPACE is converted to %20. If no text is highlighted then these functions will operate on the entire file.

Note: encoding multi line files will cause the system to include the string %0D%0A to represent each line break.

Further information about the format of URLs can be found here.

ANSI -> Quoted Printable

This functions operate very much line the ANSI->URL functions above but the encoding style is different. For example SPACE is not converted and line break is encoded as =0D=0A. There are a number of internet sites with more information on this subject. Try google to find out more.

ANSI -> Base64

Encoded selected text with base64. Base64-encoded data takes about 33% more space than the original data.

URL -> ANSI

Decodes any %## encoding in selected text.

Quoted Printable -> ANSI

This functions operate very much line the URL->ANSI functions above but the decoding style is different.

Base64 -> ANSI

Decodes Base64-encoded selected text.

Remove Accent from chars

Converts accented characters to their non-accented equivalents.

Add Accent Marks

This option is primarily for use by those dictionaries with accented words. If you highlight a word that has been entered without any accented characters but does have them in the dictionary selecting this option will change the word accordingly.

Convert Tabs to Spaces

Converts tab characters (09h) to spaces. The number of spaces is set by the "Tab Width". See Editor - settings.

See Topics

Editor - behaviour

Tools

Specification


Date Dialog

Selecting a date format

You can simply double-click on one of the formats shown in the list and have the current date/time inserted in to your file in that format. Alternatively you can highlight an entry in the list and press ENTER or click on the OK button.

Add

To add a format of your own to the list enter a format picture in the text box at the bottom of the dialog box and press the Add button. The format picture is made up of the following values:

Date

d, dd The day of the month without/with a leading zero.

ddd The 3-letter abbreviated day name.

dddd The full day name.

ddddd The date in the Windows 'Short Date' format.

dddddd The date in the Windows 'Long Date' format.

m, mm The month number without/with a leading zero.

mmm The 3-letter abbreviated month name.

mmmm The full month name.

yy, yyy The year without/with the century.

c Displays the date according the Windows 'Short Date' format followed by the time in the Windows 'Long Time' format.

Time

h, hh Hours past midnight without/with a leading zero.

n,nn Minutes past the hour without/with a leading zero.

s, ss Seconds past the minute without/with a leading zero.

t Displays the time according to the Windows 'Short Time' format.

tt Displays the time according to the Windows 'Long Time' format.

am/pm When used after a time format will display the 'h' component in 12-hour clock format and show 'am' for hours before noon and 'pm' for hours after noon. AM/PM can be used instead to force the display to upper case.

Note: The Windows 'Long Date', 'Short Date', 'Long Time' and 'Short Time' formats are set in the Windows Control panel.

There is also a 'special' format: RFC. This format enters the date/time in to the file with the following format:

ddd, d mmmm yyyy hh:nn:ss z

Where 'z' is the timezone. Note that the format value 'z' above is not enterable in user formats.

To include a literal string include it in single or double quotes. So, for example to Alt+D insert something like:

Last Updated on 2004-01-14 17:00

You would enter a date format like this:

'Last Updated on' yyyy-mm-dd t

Replace

To replace an existing format, click one on it, change the format picture and press the Replace button.

Delete

To delete a format, click one on the item to be deleted and press the Delete button.


Sort

This dialog allows you to control how sorting is performed. Tip: Sort works on the entire document unless some text is selected, and then it only sorts selected text.

Direction

Ascending / Descending

Set sort order

Case Sensitive

When checked, the sort is case sensitive.

Remove Duplicates

When checked, as well as sorting the file duplicate lines are deleted.

Sort By

Ansi Value

Sort using character set rules.

ASCII Value

Sort using character's ASCII value.

Selected locale

PSPad will use selected locale to sort lines as strings

Numeric Value

Sort treating the characters as numbers.

Unless using Numeric Value you may not get the sorting you expect when lines start with a number. Experiment to find the most suitable Sort By option for you needs.

Advanced

Specify Column

Normally sorting compares the characters of the entire line. Checking this option allows you to limit the values the sort operates on.

Column Begin / Column End

Sets the column positions between which the sort compares to determine the line position.

See Topics

Working With Projects


Selection Type

This menu allows determine the current selection type.

Select text by clicking and dragging with the left mouse button held down or moving the cursor with the shift key held down. The status bar will display an icon indicating the current selection type (see Statusbar Explained).

What are the different selection types?

Normal Selection

This is the "standard" type of selection found in may Windows applications.

Column Selection

This selection type allows vertical blocks of text to be selected. The option ALT Sets column mode allows the selection type to be switched to Column Mode when selecting with the mouse by simply holding down the ALT key (see Editor - behaviour).

Line Selection

This selection type allows only complete lines to be selected.

Block Selection (F8)

This selection type is activated using the F8 key. When first activating block selection, the cursor position is saved as the starting selection point. While activated the cursor may be move by any means to a new location. Once deactivated by pressing the F8 key again, a normal selection is made from the starting point to the current cursor point. This is useful when selected a large amount of text that may span may pages.

See Topics

View Menu

Look Toolbar

Editor - behaviour


Search Menu

If file is in Read/Only mode, text changing function are disabled

Find... (Ctrl+F)

Opens the Find dialog. See Search and Replace.

Replace... (Ctrl+H)

Opens the Replace dialog. See Search and Replace.

Find Next (F3)

Uses the previously entered search criteria to find the next occurrence, ie. one closer to the end of the file. This option is not available if a search has not been carried out.

Find Previous (Shift+F3)

Uses the previously entered search criteria to find the previous occurrence, ie. one closer to the start of the file. This option is not available if a search has not been carried out.

Incremental Search (Ctrl+E)

This option allows you to see the results of what you are searching for immediately. After calling this function an edit field (with yellow background) appears on status bar. What you type is immediately searched for in the editor from cursor position to end of file. Any matched text will be highlighted (see below). This function will only find the next occurrence of the word you are typing.

Next Occurrence of Current Word (Ctrl+Shift+Down)

Search for the next occurrence of the word under the cursor. If not text is selected (ie the cursor is just 'in' the word) then the first press of the shortcut selects the word and the 2nd and subsequent presses find next occurrence of it. This option is further controlled by the Settings / Program Settings / Editor / Whole Words for Find at Cursor setting.

Previous Occurrence of Current Word (Ctrl+Shift+Up)

Search for the previous occurrence of the word under the cursor. If not text is selected (ie the cursor is just 'in' the word) then the first press of the shortcut selects the word and the 2nd and subsequent presses find previous occurrence of it. This option is further controlled by the Settings / Program Settings / Editor / Whole Words for Find at Cursor setting.

Goto Line (Alt+G)

This option produces the dialog below and allows you to move the cursor to the position detailed.

Matching Bracket (Ctrl+M)

Search for matching bracket. If the cursor is places immediately before or after any of the bracket characters and then this option is called the cursor will be moved to the point immediately before the matching bracket.

The bracket characters are (), [], {}, and <>.

Search/Replace in Files (Alt+F)

See Search and Replace in Files.

Find by Lines...

Allows you copy lines from current document given by list of line numbers into new file

Google Search...

See Google Search.

Create Bookmark (Ctrl+Shift+0 ... Ctrl+Shift+9 / Alt+Left/Right)

This option opens a list of available book marks. When an unallocated one is selected the current line is bookmarked. If you click on an allocated bookmark it is deallocated. The shortcut Alt+Left allocates the next available bookmark to the current line. Alt+Right deallocates a bookmark if one is set for the current line.

Goto Bookmark (Ctrl+0 ... Ctrl+9 / Alt+Up/Down)

This function moves the cursor to the bookmarked spot in the file if an allocated bookmark is selected. The keystroke Alt+Down will take you to the next bookmarked point in the file, Alt+Up will take you to the first bookmarked point in the file before the cursor position.

Delete bookmark

Delete all bookmarks

This function deletes a current bookmark or all bookmarks in the current file

Set Bookmarks by selection

Sets bookmark on the selection begin and end

See Topics

Search and Replace

Regular Expressions

Main Toolbar

Editor - behaviour

Google Search

HTML Toolbar


Search and Replace

The dialogs for Find and for Replace are very similar, so this page will just discuss the Replace dialog and point out the changes where necessary.

Find

There are 2 controls here; one in which you enter your search criteria and a button that provides popup help on regular expressions. When you call up the Find dialog the Find box will be prefilled with the word under the cursor. You can type over the entry if you are looking for another word. There is also a dropdown list of phrases previously searched for.

The button brings up the popup help shown below.

For details on using regular expressions in your Find and Replace queries, see Regular Expressions.

Replace (Replace dialog only)

There are 2 controls here; one in which you enter the replace string and a button that provides popup help on the regular expressions you can use when replacing text. When you call up the Replace dialog, the Replace box will be filled with the last string you entered in it. If this is the first time you have called the Replace dialog since starting PSPad then the Replace box will be empty. You can type over any text in box. There is also a dropdown list of strings previously used.

The button brings up the popup help window shown below.

Options

Case Sensitive

When this option is set the search is done case sensitively. That is to say, for example, that 'Dog', 'DOG' and 'dog' are all treated as different words whereas they are not if the option is not set.

Whole Words Only

When this option is set the system will only find complete words matching the search criteria. So, for example, if 'cat' is the search string the system will not match occurrences of words like 'category' or 'concatenate'.

Prompt Each Replace (Replace dialog only)

Replace usually replaces all matching text in one go. When this option is set PSPad will prompt for confirmation before each change.

Regular Expressions

See Regular Expressions.

Direction

The direction to search.

Note: This option is ignored if searching in selected text.

Forward

Search from the cursor position to the end of the file.

Backward

Search from the cursor position to the beginning of the file.

Entire Scope

Search the entire file. In effect, this option moves the cursor to the and searches forward to the end of the file.

Scope

Global

Search the entire file.

Selected Text

Search just the selected text

Copy

This option copies the lines that contain the search text to a new file called 'Search Results'. See the image below for an example.

Note: The Copy option will create multiple copies of a line in the Search Results file if the search value is matched more than once on a line.

Add Line Numbers

If this option is set then the 'Search Results' file created using the Copy button will have lines numbers prepended to each line. These numbers represent the line in the original file.

Count

The option causes PSPad to present a dialog showing the number of matches there are in the current file of the search criteria.

List

List works like copy except it shows the results in the LOG pane rather than as a new file.

See Topics

Search Menu

Regular Expressions

Main Toolbar

Editor - behaviour

Edit Toolbar

Project Toolbar


Search and Replace in Files

Find in files only works with files on disk. If you have edited a file you will find your changes will not be seen by Find in Files routine unless those files are saved before calling it.

Search/Replace

Text to Find

The text to search for.

Replace With

If checked allows a value to be included to replace the any matches of the search condition.

Whole Words Only

When this option is set the system will only find complete words matching the search criteria. So, for example, if 'cat' is the search string the system will not match occurrences of words like 'category' or 'concatenate'.

Case Sensitive

When this option is set the search is done case sensitively. That is to say, for example, that 'Dog', 'DOG' and 'dog' are all treated as different words whereas they are not if the option is not set.

Prompt Each Replace

Replace usually replaces all matching text in one go. When this option is set PSPad will prompt for confirmation before each change. This option is only available if 'Replace With' (above) is checked.

Files Code Page

Sets the 'Text to Find' value to the selected code page for matching with the file contents.

Search Scope

Project Tree

Search all files in the current Project Tree.

Open Files

Search only the currently open files?

Selected Directory

Search all the files in the selected directory. There is a button next to the text entry area that allows you to navigate you file system to select the directory required.

File Masks

This option allows you to limit the files searched when setting 'Selected Directory' as the search scope. The filer is a list of semicolon (;) separated file masks. Example masks include:

*.* (All files)

*.js (Javascript files)

ab*.* (all files beginning 'ab')

Include Sub-directories

When checked the search will include all sub-directories below the selected directory. This option is only available if the search scope is 'Selected Directory'

Search Result

The search result are displayed under the 'Search in Files Results' LOG window.

Click on a file bar to expand it and list the line numbers that match the search criteria or, if the bar is already expanded, to close it.

In an expanded file bar, double-click on a line to load the file in to PSPad and have the cursor move to the selected line.

There is a toolbar on the left hand side of the LOG window when viewing the Find in Files results

Expand All

This expands all the file bars in the results window.

Collapse All

This collapses all of the file bars in the LOG window.

Open All

This opens all of the files listed in the results window in PSPad.

Open results in new document

This creates a new file with a report of all the matches found. See below for an example.

Note:

Search in Files works only with files on disk. So I recommend you save all open files before searching / replacing if those files are in search scope.

Find and read 2 times before you run Replace! Changes cannot be undone!

There is no option for Regular Expressions in Search / Replace in Files.


Google Search

This option will submit a query to Google.

Note: You must have a functioning internet connection for this option to work correctly.

Simple Search

Enter a phrase or keyword to search for.

Advanced Search

All Words

Google will only return pages that contain all of the words typed in this box.

Exact Phrase

Google will only return pages that contain the exact phrase typed here. If you have text highlighted in you file when calling up the google search it will be copied in to this box.

Any Word

Google will return any pages that contain any of the words typed in this box.

Except Words

This box is used to limit the pages that might be selected by one of the above options and causes Google to discard any pages that include the words included here. This option, if used on its own, will not return any pages.

Search Server Only

You can search one of a number of servers selected from this dropdown list rather than searching the google server's

Results on a page

This option allows you to set the number of pages listed on each page.

See Topics

Search Menu

HTML Toolbar


Regular Expressions

What are regular expressions ?

Regular Expressions are a widely-used method of specifying patterns of text to search for. Special metacharacters allow you to specify, for instance, that a particular string you are looking for occurs at the beginning or end of a line, or contains n recurrences of a certain character.

Regular expressions may look ugly to novices, but are actually a very simple, handy and powerful tool. (well, usually simple ;) )

Simple Matches

Any single character matches itself, unless it is a metacharacter with a special meaning described below.

A series of characters matches that series of characters in the target string, so the pattern "bluh" would match "bluh'' in the target string. Quite simple, eh ?

You can cause characters that normally function as metacharacters or escape sequences to be interpreted literally by 'escaping' them. Do this by preceding them with a backslash "\". For instance: metacharacter "^" match beginning of string, but "\^" match character "^", "\\" match "\" and so on.

Examples:

foobar matches string 'foobar'

\^FooBarPtr matches '^FooBarPtr'

Escape Sequences

Characters may be specified using a escape sequences syntax much like that used in C and Perl: "\n'' matches a newline, "\t'' a tab, etc. More generally, \xnn, where nn is a string of hexadecimal digits, matches the character whose ASCII value is nn. If You need wide (Unicode) character code, you can use '\x{nnnn}', where 'nnnn' is one or more hexadecimal (base 16) digits (1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). Hex digit letters may be in upper or lower case.

\xnn char with hex code nn

\x{nnnn} char with hex code nnnn (one byte for plain text and two bytes for Unicode)

\t tab (HT/TAB), same as \x09

\n newline (NL), same as \x0a

\r car.return (CR), same as \x0d

\f form feed (FF), same as \x0c

\a alarm (bell) (BEL), same as \x07

\e escape (ESC), same as \x1b

Examples:

foo\x20bar matches 'foo bar' (note space in the middle)

\tfoobar matches 'foobar' predefined by tab

Character Classes

You can specify a character class, by enclosing a list of characters in [], which will match any one character from the list. If the first character after the "['' is "^'', the class matches any character not in the list.

Examples:

foob[aeiou]r finds strings 'foobar', 'foober' etc. but not 'foobbr', 'foobcr' etc.

foob[^aeiou]r find strings 'foobbr', 'foobcr' etc. but not 'foobar', 'foober' etc.

Within a list, the "-'' character is used to specify a range, so that a-z represents all characters between "a'' and "z'', inclusive.

If You want "-'' itself to be a member of a class, put it at the start or end of the list, or escape it with a backslash. If You want ']' you may place it at the start of list or escape it with a backslash.

Examples:

[-az] matches 'a', 'z' and '-'

[az-] matches 'a', 'z' and '-'

[a\-z] matches 'a', 'z' and '-'

[a-z] matches all twenty six small characters from 'a' to 'z'

[\n-\x0D] matches any of ASCII #10(Lf),#11,#12(Ff),#13(Cr).

[\d-t] matches any digit, '-' or 't'.

[]-a] matches any char from ']'..'a'.

Metacharacters

Metacharacters are special characters which are the essence of Regular Expressions. There are different types of metacharacters, described below.

Metacharacters - Line Separators

^ start of line

$ end of line

\A start of text

\Z end of text

. any character in line

Examples:

^foobar matches string 'foobar' only if it's at the beginning of line

foobar$ matches string 'foobar' only if it's at the end of line

^foobar$ matches string 'foobar' only if it's the only string in line

foob.r matches strings like 'foobar', 'foobbr', 'foob1r' and so on

The "^" metacharacter by default is only guaranteed to match at the beginning of the input string/text, the "$" metacharacter only at the end. Embedded line separators will not be matched by "^'' or "$''. You may, however, wish to treat a string as a multi-line buffer, such that the "^'' will match after any line separator within the string, and "$'' will match before any line separator. You can do this by switching On the modifier /m.

The \A and \Z are just like "^'' and "$'', except that they won't match multiple times when the modifier /m is used, while "^'' and "$'' will match at every internal line separator.

Metacharacters - Predefined Classes

\w an alphanumeric character (including "_")

\W a nonalphanumeric

\d a numeric character

\D a non-numeric

\s any space (same as [ \t\n\r\f])

\S a non space

You may use \w, \d and \s within custom character classes.

Examples:

foob\dr matches strings like 'foob1r', ''foob6r' and so on but not 'foobar', 'foobbr' and so on

foob[\w\s]r matches strings like 'foobar', 'foob r', 'foobbr' and so on but not 'foob1r', 'foob=r' and so on

TRegExpr uses properties SpaceChars and WordChars to define character classes \w, \W, \s, \S, so You can easily redefine it.

Metacharacters - Word Boundaries

\b Match a word boundary

\B Match a non-(word boundary)

A word boundary (\b) is a spot between two characters that has a \w on one side of it and a \W on the other side of it (in either order), counting the imaginary characters off the beginning and end of the string as matching a \W.

Metacharacters - Iterators

Any item of a regular expression may be followed by another type of metacharacters - iterators. Using this metacharacters You can specify number of occurrences of previous character, metacharacter or subexpression.

* zero or more ("greedy"), similar to {0,}

+ one or more ("greedy"), similar to {1,}

? zero or one ("greedy"), similar to {0,1}

{n} exactly n times ("greedy")

{n,} at least n times ("greedy")

{n,m} at least n but not more than m times ("greedy")

*? zero or more ("non-greedy"), similar to {0,}?

+? one or more ("non-greedy"), similar to {1,}?

?? zero or one ("non-greedy"), similar to {0,1}?

{n}? exactly n times ("non-greedy")

{n,}? at least n times ("non-greedy")

{n,m}? at least n but not more than m times ("non-greedy")

So, digits in curly brackets of the form {n,m}, specify the minimum number of times to match the item n and the maximum m. The form {n} is equivalent to {n,n} and matches exactly n times. The form {n,} matches n or more times. There is no limit to the size of n or m, but large numbers will chew up more memory and slow down r.e. execution.

If a curly bracket occurs in any other context, it is treated as a regular character.

Examples:

foob.*r matches strings like 'foobar', 'foobalkjdflkj9r' and 'foobr'

foob.+r matches strings like 'foobar', 'foobalkjdflkj9r' but not 'foobr'

foob.?r matches strings like 'foobar', 'foobbr' and 'foobr' but not 'foobalkj9r'

fooba{2}r matches the string 'foobaar'

fooba{2,}r matches strings like 'foobaar', 'foobaaar', 'foobaaaar' etc.

fooba{2,3}r matches strings like 'foobaar', or 'foobaaar' but not 'foobaaaar'

A little explanation about "greediness". "Greedy" takes as many as possible, "non-greedy" takes as few as possible. For example, 'b+' and 'b*' applied to string 'abbbbc' return 'bbbb', 'b+?' returns 'b', 'b*?' returns empty string, 'b{2,3}?' returns 'bb', 'b{2,3}' returns 'bbb'.

Metacharacters - Alternatives

You can specify a series of alternatives for a pattern using "|'' to separate them, so that fee|fie|foe will match any of "fee'', "fie'', or "foe'' in the target string (as would f(e|i|o)e). The first alternative includes everything from the last pattern delimiter ("('', "['', or the beginning of the pattern) up to the first "|'', and the last alternative contains everything from the last "|'' to the next pattern delimiter. For this reason, it's common practice to include alternatives in parentheses, to minimize confusion about where they start and end.

Alternatives are tried from left to right, so the first alternative found for which the entire expression matches, is the one that is chosen. This means that alternatives are not necessarily greedy. For example: when matching foo|foot against "barefoot'', only the "foo'' part will match, as that is the first alternative tried, and it successfully matches the target string. (This might not seem important, but it is important when you are capturing matched text using parentheses.)

Also remember that "|'' is interpreted as a literal within square brackets, so if You write [fee|fie|foe] You're really only matching [feio|].

Examples:

foo(bar|foo) matches strings 'foobar' or 'foofoo'.

Metacharacters - Subexpressions

The bracketing construct ( ... ) may also be used to define r.e. subexpressions (after parsing, you can find subexpression positions, lengths and actual values in MatchPos, MatchLen and Match properties of TRegExpr, and substitute it in clip strings by TRegExpr.Substitute).

Subexpressions are numbered based on the left to right order of their opening parenthesis. First subexpression has number '1' (whole r.e. match has number '0' - You can substitute it in TRegExpr.Substitute as '$0' or '$&').

Examples:

(foobar){8,10} matches strings which contain 8, 9 or 10 instances of the 'foobar'

foob([0-9]|a+)r matches 'foob0r', 'foob1r' , 'foobar', 'foobaar', 'foobaar' etc.

(abc(def)ghi(123))xzy matches abcdefghi123xyz (the only match),

Then backreferences:

\1 = abcdefghi123,

\2 = def,

\3 = 123,

\0 = abcdefghi123xyz (the whole match)

We could find the same string using metacharacter Iterators with: (\w{3}([d-f]{3})...(\d*))xyz and the backreferences would have the same values. And yet the pattern would also match: '123fdd@#$4444xyz', 'bbbeeeabc1234567xyz', 'ddddddaaaxyz'

Metacharacters - Backreferences

Metacharacters \1 through \9 are interpreted as backreferences in the Find text box. When used outside of the regular expression, such as in the Replace field, metacharacters $1 through $9 are interpreted as backreferences to the last find.

\<n> matches previously matched subexpression #<n>.

Find Examples:

(.)\1+ matches 'aaaa' and 'cc'.

(.+)\1+ also match 'abab' and '123123'

(['"]?)(\d+)\1 matches '"13" (in double quotes), or '4' (in single quotes) or 77 (without quotes) etc

Replace Examples:

Date format change from dd.mm.yyyy to yyyy-mm-dd. This will turn the European date style 26.8.1994 or 26/8/1994 into 1994-8-26.

Search: ([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})

Replace: $3-$2-$1

TIP: Make sure you check the box for "Regular Expression". And I always check, "Prompt Each Replace" to avoid unintended replacements. Make sure your hit "List" or "Count" before you hit "Replace". You want to make sure you get all the strings you had in mind.

For explanation we used help text on regular expressions by Andrey V. Sorokin (http://anso.virtualave.net)

Note: This site uses lots of popups!

Regular Expression Tutorials

The following is a list of a few sites that contain tutorials on both regular expressions in general and their use in specific languages:

http://www.regular-expressions.info/ (General Tutorial)

Regular Expression HOWTO (For Python)

Regular expressions in UNIX (Spring 1995)

Perl Regular Expression Tutorial

See Topics

Search Menu

Search and Replace

Main Toolbar


View Menu

Toolbars

See Toolbars.

Tool Panel (Ctrl+F2)

Toggles the tool panel on and off.

Spell Check

Toggles the spell checker on and off. When first switched on it will cause PSPad to scan the entire file and mark mis-spelled words; this may take some time. When this option is active, the spell button will be underlined in red (see Look Toolbar).

Active Line

Toggles current line highlighting. When this option is activated a tick will appear in the menu next to the Active Line item (see Colors).

Syntax

Toggles syntax highlighting on and off. This option is disabled if the current file does not have an highlighter associated with it.

Line Numbers

Toggles line numbering (see Look Toolbar). Whether or not the left-hand gutter disappears when this option is switched off is controlled by the Autohide Gutter option (see Program - look).

Word Wrap Lines (Ctrl+W)

Toggles word wrap on and off (see Look Toolbar). The performance of this option and its availability are effect by its options (see Editor - behaviour).

Special Chars

Toggles on and off the option to display "special" characters as visible ones. Special characters include spaces, tabes and carriage returns.

Ruler

Toggles the ruler at the top of the file edit window on and off. Click on ruler will set right edge position for current file. You can quick set Right edge position with shortcut, if you will assign it in Program settings / KeyMap / Show for Set right edge to cursor position

Hex Edit MODE

Switches between Hex and normal edit modes.

Show OEM chars

This switches between the DOS/IBM and Windows extended character set. This is used to display characters 128 through 255. The DOS/IBM extended character set (known as OEM) contains the line draw characters found in a number of text files. Note: that this only affects the display and not how the file is saved.

Stay on Top

Toggles PSPad's ability to be the topmost window on the desktop.

Change Syntax...

Display a dialog to change the highlighter used for the active document. For a new file that is not yet saved it changes file type (extension). Only selected highlighter's are allowed (see Syntax highlight). This also allows control the selected SQL dialect i.e. MSSQL or MySQL.

See Topics

Look Toolbar

File Menu

Tools Menu

Program - look

Program - behaviour

Toolbars

Selection Type

Editor - behaviour


Toolbars

This menu allows you to control which toolbars are displayed.

Show/hide panel (F2)

Toggles the toolbar panel off and on. Use this, along with Tool Panel on the View Menu, to give you more editor screen space (see View Menu).

Project

Toggle the Project Toolbar on and off (See Project Toolbar).

Main

Toggle the Main Toolbar on and off (see Main Toolbar).

Edit

Toggle the Edit Toolbar on and off (see Edit Toolbar).

Look

Toggle the Look Toolbar on and off (see Look Toolbar).

Control

Toggle the Control Toolbar on and off (see Control Toolbar).

HTML

Toggle the HTML Toolbar on and off (see HTML Toolbar).

Macro

Toggle the Macro Toolbar on and off (see Macro Toolbar).

Show All

This shows all of the toolbars.

Hide All

This hides all of the toolbars.

See Topics

View Menu


Project Toolbar

For more information on projects see Working With Projects and Project Menu.

Show/Hide Tool Panel (Ctrl+F2)

This toggles the toobar panel off and on. Use this, along with Tool Panel on the View Menu, to give you more editor screen space.

New Project

Create a new project with an option to close an existing one. For further details see Project Menu.

Open Project (Ctrl+Shift+P)

Open an existing project. Clicking on the arrow presents a menu with options to open a project or create a project from a folder. In addition, the menu will include a list of most recently accessed project files. For further details see Project Menu.

Save Project

Save the current project. For further details see Project Menu

Show/Hide LOG panel

This toggles the LOG panel on and off.

Sessions

This functionality allows you save current desktop (open files) and restore it anytime using named session.

See Topics

File Tabs Context Menu

Working With Projects

Project Context Menu

Search and Replace


Main Toolbar

New

Create a new file. Clicking on the button will create a file of the same type as the active file is there is one. If there is no active file then a .TXT file will be created. If you click on the arrow you will be offered a list of active file types to select the new file from.

Open

Open an existing file. If you click on the arrow you will be presented with a menu similar to File / Open Special.

Save

Save the current file. This option is only available if there is an active file with unsaved changed. If you click on the arrow you will be presented with a menu containing the save, move and export options from the File menu.

SaveAll

Save all of the currently open files.

Find

Opens the Find dialog. See Search and Replace for more information.

Replace

Opens the Replace dialog. See Search and Replace for more information.

Find In Files

Opens the Find In Files dialog. See Search and Replace in Files for more information.

Find Matching Bracket

Search for matching bracket. If the cursor is places immediately before or after any of the bracket characters and then this option is called the cursor will be moved to the point immediately before the matching bracket.

The bracket characters are (), [], {}, and <>.

View Bookmark List

When selected, this option will produce a list of active bookmarks in the file; double-clicking on an item in the list will move the cursor to the relevant place in the file. This option is not available if there are no bookmarks defined in the active file.

Print Preview

Generate a print preview of the active file.

Print

Print the active file

See Topics

File Menu

Project Menu

File Tabs Context Menu

Statusbar Explained

User highlighters

Search Menu

Search and Replace

Editor - behaviour

Regular Expressions


Edit Toolbar

Undo

This option undoes the last action. The number of actions you can undo is limited by the setting in Settings / Program Settings / Editor / Max UNDO Operations.

Redo

This option reapplies any actions undone using the Undo option.

Copy (Ctrl+C)

Copy selected text. For more details see Edit Menu.

Cut (Ctrl+X)

Cut selected text. For more details see Edit Menu.

Paste (Ctrl+V)

Paste the contents of the clipboard in to the file at the cursor position. For more details see Edit Menu.

Delete (DEL)

Delete selected text. For more details see Edit Menu.

See Topics

Search and Replace

Special Paste


Look Toolbar

Wordwrap (Ctrl+W)

Toggle word wrap on and off. See View Menu for more details.

Show Special Characters

Toggle special character viewing on and off. See View Menu for more details.

Show Syntax

Toggle syntax highlighing on and off. See View Menu for more details.

Change Syntax

Change syntax / File Type. See View Menu for more details.

Line Numbering

Toggle line numbering on and off. See View Menu for more details.

Read Only

Mark the file read-only in PSPad. See File Tabs Context Menu for more details.

View Spelling Errors

Toggle spelling error indication on and off. See View Menu for more details.

Stay on Top

Togggle on and off PSPad's ability to remain as the top most window on the desk top. See View Menu for more details.

See Topics

Selection Type

View Menu

Editor - behaviour


Control Toolbar

Run an External Program (F9, Shift+F9, Alt+Shift+F9)

Run the file in one of the defined "External Applications". See Highlighter Settings / External Applications for more information

Compile (Ctrl+F9)

Run the file through the compiler. See Highlighter Settings / Compiler Settings for more information.

Command Line

Run a command. See Running a Command.

See Topics

File Tabs Context Menu

Working With Projects

Project Context Menu

Project Menu

External applications

Command/Compiler Variables

Window Menu


HTML Toolbar

All of the functions on this toolbar, except where otherwise stated, are disabled when editing anything other than HTML or XML files.

Reformat HTML (Ctrl+T)

This option reformats the HTML file to make the code easier to read. The functionality of the HTML code itself is unchanged.

Compress HTML

This option conpresses the HTML file by removing unnecessary spaces and concatenates lines up to the maximum line length set in Program Settings / HTML / Tools maximum Compressed Line Length. The functionality of the HTML code itself is unchanged.

Open Colour Selector (Alt+C)

This option opens the colour selector dialog. See Tools Menu / Colour Selector for more details. This option is available for all file types.

HTML to Text

This option removes all HTML tags from the file and creates a new text file that it populates with the result. The original file is unchanged.

HTML Tags to Uppercase

This option converts all of the tags in the document to uppercase. This option operates on the entire file, regardless of whether or not text is selected.

HTML Tags to Lowercase

This option converts all of the tags in the document to lowercase. This option operates on the entire file, regardless of whether or not text is selected.

Open File in Internal Browser (F10)

This option displays the file in PSPad's own internal browser. This browser is useful for displaying simple pages but will not necessarily execute pages as if they were installed on a server.

Open in TopStyle

Opens TopStyle and displays the selected text. This option is only useful for editing CSS Stylesheets.

Google Search

Perform an internet search using Google. See Search Menu / Google Search for more details. This option is available for all file types.

See Topics

Special Paste

Tools

Search Menu

Google Search

HTML Menu


Macros Toolbar

Macros are used to record a number of file navigation and editing functions so that they can be repeated later. More information on Macros can be found in Working with PSPad / Macros. A list of the supported actions for macros can be found at Working with PSPad / Macros / Macro Commands.

Record (Ctrl+F5)

This option toggles macro recording on and off. Note that when PSPad is recording a macro the button changes to and the cursor changes to .

Play (F5, F6, Alt+F6, Ctrl+Alt+F6)

This option opens a menu that allows you to select either one of the up to 4 macros configured to run with a hotkey. It also allows you to open the Macro Manager.

See Topics

Interactive Clips


Format Menu

Font...

Changes font for regular editor or HEX editor (independently). You cannot set the general font style to Bold or Italic because that would clash with Syntax

Highlighters, which use those features.

Char Case Change

Changes the case of the selected text (see Case change).

Block Format

Apply indent, line, and justify formats to selected text (see Block format).

Code Case Change...

Apply char case change for specific parts of source code using selected highlighter attribute (keyword, comments, ...).

Add/Remove Comment (Shift+Ctrl+A)

Add/remove comment char (string) to the begin of each line, based on selected syntax. Works only for highlithers that support line comments.

Reformat JSON

This function reformats JSON string to readable form

DOS (CR+LF)

The end-of-line delimiter for text files on DOS/Windows systems is a carriage return followed by a line feed (CR+LF).

UNIX (LF)

The end-of-line delimiter for text files on Unix systems is a line feed character (LF).

MAC (CR)

The end-of-line delimiter for text files on Mac OS systems is a carriage return (CR).

Note: If file is in Read/Only mode, text changing function are disabled

File formats

End-Of-Line

The first 32 entrys in the ASCII code table is used for (non-printing) control character.

Number 10 (decimal) means a LF (Linefeed, go one line down)

Number 13 (decimal) means a CR (carriage return , go to Pos1)

The various operation systems use various line end chars.

Dependent on what OS you want to use that file, you have to use the right option:

· DOS
· UNIX
· MAC

Note: If you open such files in PSPad, PSPad use the right file format for you (see Format menu and status line).

On other hand, if you open e.g. an UNIX file in Notepad, you see a long line with little boxes. Not easy to read. You can convert such files by open them in PSPad, select the File format you want to convert, and save that file again.

ANSI

Windows native code page. No CP conversion. ISO 6937/2 (nearly like the from ISO extended 8 bit ASCII table 8859-1 white chars for western europe, aka ISO-Latin-1)

Related to code page Win-1252

For normal Windows use for western europe, Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, Irish, Italian, Norwegian, Portuguese, Spanish and Swedish.

OEM

From IBM extended 8 bit ASCII table.

Related to code page DOS-850 Multilingual Latin 1 and DOS-437 US.

Use for files to be writen or read unter DOS in western europe.

OEM chars are used e.g. in some .NFO .DIZ file to display "pictures" using OEM semigrafic chars. This feature enables you see correct Graphic.

Kamenicky

From IBM extended 8 bit ASCII table.

Related to code page DOS-895. Use for files to be writen or read unter DOS in eastern europe.

ISO 8895-2

Related to code page WIN-1250 \ DOS-852.

For normal Windows use for eastern europe, Albanian, Czech, English, German, Hungarian, Polish, Rumanian, (Serbo-)Croatian, Slovak, Slovene and Swedish.

UNICODE

(This means UTF-16 (Unicode transformation format) or UCS-2)

New ISO standard 10646 who contain all the varios code pages above and much more.

UNICODE use 16 bit to encode the file, so the file is 2 times bigger than ANSI or ISO 8895-x plus 2 Byte BOM (Byte Order Mark) "FF FE" (seen in ANSI as ÿþ ) for ident such UNICODE files.

UNICODE is use for special chars like them in Cyrillic, Arabic, Greek, Nordic, Far East. Windows NT supports UNICODE, but you may have not the right fonts to see such spechial chars.

UTF-8

This is a flexible form from UNICODE.

UTF-8 encoded chars, that normal has to use 16 bit, in 8 bit code.

If there only ASCII standard chars in your file, this file got the same size as ASCII + 3 Byte BOM for ident, "EF BB BF" (seen in ANSI as ï»¿).

If there are special characters, the will be converted in an 8 bit format and the file increase for that.

(e.g. Ä is encodet in UTF-8 as &#196; using standard ASCII chars.)

UTF-8 is used for special chars but to be compatible with other 8 bit char sets.

Note: You must have the right font and code page to display some characters correct.

See Topics

Case change

Block format


Case change

To Upper Case (Ctrl+Alt+U)

Convert selected text to upper case.

To Lower Case (Ctrl+Alt+L)

Convert selected text to lower case.

Capitalize (Ctrl+Alt+T)

Convert the first letter of all words in the selected text to upper case and the remaining letters to lower case.

Invert Case

Inverts the case of all selected text.

Sentensize

Convert the first letter of all sentence's in the selected text to upper case and the remaining letters to lower case.

See Topics

Format Menu

Block format


Block format

Indent Block (Shift+Ctrl+I)

Increase block indentation. Works only when block of lines is selected.

UnIndent Block (Shift+Ctrl+U)

Decrease block indentation. Works only when block of lines is selected.

Reformat (paragraph=blank line) (Ctrl+K)

Reformat text with right edge mark. After reformat, all redundant line breaks and redundant spaces are removed. Selected block is reformatted. With no selection, the actual paragraph is reformatted. Paragraph separator is empty line.

For example: if you want to reformat text to 40 chars width, click on ruler (position 40) to set right edge mark and pres Ctrl+K. Now each line is 40 chars or less.

Note: Enabled only when WordWrap is OFF!

Reformat (paragraph=short line) (Shift+Ctrl+K)

Reformat text with right edge mark. After reformat, all redundant line breaks and redundant spaces are removed. Selected block is reformatted. With no selection, the actual paragraph is reformatted. Paragraph separator is sort line (about half of right edge).

Note: Enabled only when WordWrap is OFF!

Justify Left (Ctrl+Alt+Left)

Whole text or selected block will be justified to left.

Justify Right (Ctrl+Alt+Right)

Whole text or selected block will be justified to right.

Justify Center

Whole text or selected block will be justified to center.

Block Align

Whole text or selected block will be right and left justified. Both sides square.

See Topics

Format Menu

Case change


Menu Encoding

PSpad from version 5 contains over 130 code pages and allows you open files using selected encoding and convert files between encoding.

This menu contains selected encoding which has sense for you. Content of this menu and order of items is customizable (see bellow)

Star icon - this icon shows default code page for new files. You can set it in the Program settings / Files and dirs or quickly set it clicking on item in Encoding menu with CTRL key.

Autodetect CP - this option allows PSPad internal code page autodetection. This function cover most of ANSI pages, include Cyrillic, Chinese, Japanese, ... But it doesn't work 100%, especially in case when source code contains special chars e.t.c.

Batch encoding conversion - function which allows you change code page for all files in folder include subfolders if needed.

Unicode normalization - accented unicode chars can be presented as one char with accent or as basic char followed by accent char. This is called Unicode char normalization. This menu has two items:

· Canonical Composition - joins chars into composed form (NFC)
· Canonical Decomposition - split chars into decomposed form (NFD)

Modify... - allows you change menu content and order of menu items.

Selected items will appear in menu (check box before items)

Order of items can be changed using arrow buttons or using mouse (drag/drop)

Default - this button will reset setting to default content and order

Settings is stored in CodePage.ini file


Batch Encoding convertor

This tool helps you change code page for many files in second. Original files are untouched, result of conversion is stored in parallel folder with .OUT extension with same structure. It allows you check output and simple copy content to original location.

Folder - source folder for conversion, include subfolders if needed

File Masks - file masks to convert. You can specify several masks at once, delimited by colon or semicolon

Source Encoding - encoding of existing files - you can use CP autodetection.

Target Encoding - files will be encoded into this encoding


Tools Menu

Show Clips (Ctrl+Space)

Display list of code clips corresponding to selected highlighter (see Context Files). PSPad takes the current word as a clip name and shows you corresponding clips.

Run clip (Shift+Space)

PSPad will take current word under cursor and if clip with same name is found, it will inserts it directly

Auto Completion (Ctrl+J)

Very usable function. Write several chars and press Ctrl+J. If only one word is found to match, it is automatically finished. In other cases, it lists words from which you can select. Use Down & Enter to select.

Word list comes only from text previously written in the active document.

Repeat last command (Alt+Q)

This function repeats any any previous program action.

Spell Check

Toggles the spell checker on and off. When first switched on it will cause PSPad to scan the entire file and mark mis-spelled words; this may take some time. When this option is active, the spell button will be underlined in red (see Look Toolbar).

Macro

Toggle the Macro Toolbar on and off (see Macro Toolbar).

Create Clip from Block (Ctrl+Alt+Space)

Wizard for creation new clip. Select block and pres hotkey. Dialog is shown, you write clip name, description, hotkey (optional) and new clip is ready to use.

Text Differences

PSPad allows you compare contents of two text files and displays color highlighted differences in new window (see Text Differences).

Code Explorer window (Shift+Ctrl+E)

A window that helps to quickly orient you to your code. Try it with an HTML, XML or C file. The code explorer looks for specific text patterns to detect functions, include files and macro definitions based on the currently selected syntax.

You may search for items in the code explorer by selecting it, then type the first few letters of your query. When a match is found the query is displayed in the status bar. By dragging the top of the code explorer, it may be integrated with the tool panel, undocked, or docked to right hand side. Code explorer will collapse all, expand all, sort, refresh, or copy item to clipboard by using the bottom on top of windows.

§ Folder icons are groups
§ Block icons are constructors, constants, labels, or data
§ Shape icons are classes or body elements
§ File icons are include files

§ Flash icons are functions, methods, subroutines, calls, or properties
· aqua for the constructor function
· fuchsia for the main function
· red for a protected functions
· green if the function is void or unknown
· yellow in all other cases

§ HTML elements include
· Links
· Images
· Tables
· Rows
· Cells

ASCII Table View (Alt+A)

ASCII chart allows you insert active char to active document. In table you will see char, decimal and hexadecimal value, html entities. You can print ASCII chart too.

Color Selector window (Alt+C)

Opens color selection dialog for HTML color selection with possibility to insert selected color into text. You can choose from safe colors palette, 16 colors palette, gray palette, color name palette and standard color dialog.

Color Translator...

Translates any form of a color to the other forms: HTML Color Code, Color Name, Percent Notation, RGB Notation. Shows resulting color. Selected text before dialog calling if parsed in dialog.

EyeDropper

A color spy. Simply point to the color and it will paste the HTML value of color it to current document. Once activated, PSPad window is minimized until command is complete. Pressing the escape key will cancel operation.

Clipboard Monitor window (Alt+M)

If active, catch all clipboard manipulation and contents is displayed in special window. In this window you can pause monitor catching, work with clipboard history, delete it, ...

Command Line

Allows command line execution (see Running a Command).

Hash generator (MD5,SHA1,...)

Calculate hash for file or string and/or compare with existing hash.

Lorem Ipsum generator

This function is useful, if you write pages and you need some text to see results. You sets parameters (number of paragraphs, length of paragraph) and Lorem Ipsum generates "nonsens" text.

Calculate Block

Having selected a block of numbers, this function will give: Sum, Min, Max, Average, & Count of all the numbers.

Numeric Base Translator...

This tool helps convert numbers between any numeric bases from binary to hexadecimal. And as bonus, you can convert Roman numbers and convert milliseconds to datetime.

Expression Evaluator

This tool performs evaluates numerical expression. Results may by pasted into current document at selected position. Selected text before dialog calling will initialize the expression. (See Expression evaluator)

User Convertors...

For use with external files you can create user defined convertors (see User convertors).

Run Last used convertor

When converting more then one block of text, use this function. You canon assign shortcut and simply convert files with one key click.

Open System Files

This function opens Autoexec, Config, System.INI a Win.INI including syntax highlight.

See Topics

View Menu

Macro

Context Files

Text Differences

Text difference

Starting PSPad

Command line parameters


Color Selector

What does the Color Selector do?

The color selector is designed to include the correct HTML color code or color name in to your file for the color you select. When you move your cursor over one of the small color swatches that color is reflected in the larger swatch at the bottom of the Color Selector along with that color's HTML code and, where appropriate, the color's name.

There are 5 palettes you can select from:

Safe Colors

This palette is limited to the 216, so called, 'Netscape' colors.

16-color Palette

This palette is limited to the 16 colors supported by older computers.

Gray Scale

This palette contains the 256 grey shades between black and white.

Named Colors

This palette is limited to the original 140 colors that have standard HTML names. A full list of the names can be found here.

HSB palete

Gradient paletes

Note: You can any color store into 8 positions and use it anytime (colors are remembered).

See Topics

Working with Color

Colors


Spell check

PSPad allows you spell check your document. Spell check is independent of installation MS Office and other packages. Dictionaries are ready for download from PSPad pages.

How it works?

With first use, dictionary is loaded. It can take several seconds, so be patient. Then text is checked and unknown words are marked. Unknown words you add to dictionary are added into user dictionary. For spell check settings and dictionary selection see Spell check options.

Spell check works in two modes

Mark unknown words

After activation unknown words are underlined. It's used for quick orientation.

Spell check with word correction

Starting from cursor position, text is processed. Unknown words are displayed in a dialog. You may get a list of suggested spellings. You can choose from these actions:

· skip
· always skip
· add to dictionary
· change
· change and add to dictionary

Add diacritic (accent marks)

Text is processed and into words are added diacritical signs. Only for Czech and Slovak users.

See Topics

Settings Menu

Spell check options


Expression evaluator

Evaluator is a mathematical function parser. It allows you to calculate a value given an expression in string form. The following

operators and functions are supported:

  +       Addition

  -       Substraction

  *       Multiplication

  /       Division

  ^       Exponential (only positive numbers for the base)

  (       Open parenthesis

  )       Close parenthesis

  MOD      MOD operator.  Integers only (if used with floating

           point numbers, it will round the values to integers)

  ABS      (Range: -1e4932..1e4932)

  ATAN     (Range: -1e4932..1e4932)

  COS      (Range: -1e18..1e18)

  EXP      (Range: -11356..11356)

  LN       (Range: 0..1e4932)

  ROUND    (Range: -1e9..1e9)

  SIN      (Range: -1e18..1e18)

  SQRT     (Range: 0..1e4932)

  SQR      (Range: -1e2446..1e2446)

  TRUNC    (Range: -1e9..1e9)


User convertors

What are they?

Convertor is used to automate char or string bidirectional conversion.

Location of Convertor Files

In subdirectory .\Convert. Convertor definition files are simple text files with INI files structure. In this dir you find the file Template.IN_ - a convertor base template. Convertors can be called from menu Tools / User Convertors...

Convertor syntax

;semicolon is comment - optional, is ignored

;section names are bold - mandatory

[Description]

;convertor description - will be displayed in menu

ForwardName=UNICODE chars to HTML entity (WML)

BackwardName=HTML entity (WML) to UNICODE chars

;set of char case ignore. 1 = yes, 0 = no

ForwardIgnoreCase=0

BackWardIgnoreCase=0

;sets whether conversion will be processed with char table or replacing string by string

;CharTab=0 - conversion list will be used, CharTab=1 - char table will be used

CharTab=0

;list of strings in [conversion] is encoded in UTF-8. (0/1)

UTF8List=0

;section for replace string by string. Strings are delimited by | char (pipe or bar)

[Conversion]

Š|&#x0160;

Œ|&#x015A;

|&#x0164;

;list of char, which will be removed during conversion

[Remove chars]

10

12

;char conversion table. Numbers are char ASCII values. Write only chars you want to convert.

[Table]

134=64

135=12

Conversion char table or string replace?

It depends of convertor meaning. If you want do code page conversion or replace tabs with spaces, use char table. It will be more precise and faster. Otherwise, use string replace.

How conversion char table works

Convertor works with selected block of text or whole document. This text (selected or whole doc) is processed char by char and chars are replaced by corresponding char from conversion table.

How string replace works

Convertor works with selected block of text or whole document. All strings defined in [Conversion] section are applied to the text. It's like a Search/Replace function. For long text, this can take some time.

String conversion possible problems

Circlur definition:

[Conversion]

B|A

A|B

In this case, first all "B" chars replaced with "A" and in next all "A" are replaced with "B" - The result is nothing changes.

[Conversion]

hallo|hi

halloween|party

First, all occurrences of hallo are replaced with hi. After first replace, the word halloween will be word hiween and second step replaces nothing. There are no more halloween words left.

All you need to correct it is to change the position in conversion definition to:

[Conversion]

halloween|party

hallo|hi


Text Differences

Two ways to get second file for a Text Diff

Open any file - File1

1. From menu Tools / Text Differences, select Text Diff with This File. A File Open dialog box will come up. Select file - File2

2. Context menu: Right click over the file TAB of another open file. Select Text Diff with This File. This file will become File2

After comparing, a new Text Diff window is opened with compare results. This window is spit into two parts with locked scrolling. File1 is on the left, File2 is on the right. In both files are lines corresponding to common parts of text. Extra lines are added to both as needed to reflect the differences. This results are read only.

You can find three kinds of differences:

· lines with different content
· lines missing in File2
· lines missing in File1

Moving in results

previous difference Shift+Ctrl+Up

next difference Shift+Ctrl+Down

See Topics

Tools Menu

Text difference


Running a Command

The text box allows you enter a command line to Run. There is a dropdown option to recall previous command lines and a button that allows you to find a file whose path will be used as the command line.

Command

Specifies the command and arguments.

Run under MS-Dos command interpreter

Normally, your command is run silently in the background and so you cannot provide input to or receive output form the program that runs (that said, if the command is a call to a windows program that will open and run as you would normally expect). If you check this option, the command will run in a Command Line box so that you can interact with the command to be run.

Default directory

Specifies the folder that contains the original item or some related files. Sometimes, programs need to use files from other locations. You might need to specify the folder where these files are located so that the program can find them.

Capture Program Output Window

All of the output generated in the running of the command will be captured and displayed in the LOG screen if this option is set. This option is only available if 'Run under MS-DOS...', above, is selected.

Hide Output window

Hide external program Output Window


Script Menu

Recompile scripts

Recompile scripts. Only requered if changes have been made to script(s) since PSPad was opened.

Display list of loaded scripts and allows execution. These menu items are created by the Init subroutines in individual scripts. (See Script User's Guide)

See Topics

Script User's Guide

Script Language Reference

PSPad Actions


HTML Menu

HTML Page Preview F10

Show / Hide preview of HTML page in internal browser. If preview window stays open in background, it will be refreshed at intervals specified in program settings / editor / Auto Refresh [s].

You can use Mozilla in internal browser too. all whar tou need is download (for free) and install Mozilla ActiveX control. Then you can switch in internal browser between IE and Mozilla with first button.

HTML Preview from HTDocs (web server) Shift+Ctrl+F10

Can be used to preview your page through your web server. Path to server directory is specified in program settings / internet.

Part of file path is replaced by http://server/

Default settings for Apache server is C:\Apache\HTDocs. If you call normal HTML preview (F10), the file is displayed in the internal browser.

file://localhost/c:/apache/htdocs/soubor.htm. If you use webserver preview, file is displayed in the internal browser http://localhost/soubor.htm.

Reformat HTML code

Reformats HTML code for pretty print. Scripts, comments and special tags (pre, ...) are not changed.

Compress HTML code

From HTML code redundant spaces, line breaks, ... are removed. Line breaks are inserted approximately after 200 chars.

Result is smallest and worse code for reading. Makes it hard to steal your HTML.

Change char case of HTML tags (Lower case tags are standard in XHTML)

Tags to upper case

Tags to lowercase

It's subset of Code format function applied only to TAGs code elements. You can use the Code format function to change char case of any code element

Reformat into structured CSS

This functions reformat inline CSS into readable formated form

Result form depends of Tools settings in Program settings

Reformat into Inline CSS

This function is opposite to previous function. From structured CSS form inline formis generated.

Conversions

Sets of several useful HTML language based conversions

Import from RTF

From any RTF document formated HTML code is generated. PSpad tries to keep formating, colors e.t.c.

Import from CSV

This function generates HTML table format from any CSV file

Check HTML code

This function uses HTML TiDy to make a basic check of your code. Problems are listed in the LOG window. This function doesn't modify your source code

TiDy

see the HTML TiDy chapter

PHP code beautifier

this function calls phpCB.exe command line tool with parameters on the background. You can easily define your own format


HTML TiDy

What is TiDy ?

TiDy is library for checking, formatting, cleaning HTML code. This library is found in all the better editors that work with HTML code. TiDy is fully integrated into PSPad. All you need is file TiDy.exe in the same directory as PSPad.EXE. With the configuration file TiDyCFG.INI, you can modify the menu for TiDy in PSPad. Each section in this file is one item in PSPad Menu (dynamically created).

You need to restart PSPad after you add or delete section in TiDy config file. TiDy syntax you can find at TiDy quick reference pages

Check HTML Code (Ctrl+F10)

Checks and analyzes HTML code and displays errors in LOG window

TiDy clean document - wrap

TiDy clean document - nowrap

TiDy clean document - nowrap, noindent

Cleans and corrects HTML code, include removing parts from MS tools

Clean MS Word 2000 document

Cleans the mess, added to HTML by Word

Upgrade to CSS

Upgrades HTML to CSS

Convert to XML

Converts HTML document to XML

Convert to XHTML

Converts HTML document to XHTML

XML reformat

TiDy can be used as pretty fast XML documents reformat tools

PSPad allows you to define shortcuts for profiles in format:

[profile name*shortcut]

Example:

[HTML reformat*Shift+Ctrl+F11]

See Topics

Files and folders

HTML Menu


Settings Menu

Program Settings...

Opens dialog box where you can customize PSPad editor (see Program - look).

Highlighters Settings...

In this dialog box you can customize colors for individual environment, assign external files, compilers, ... (See Syntax highlight)

User Highlighter...

Shows dialog box where you can easy define your own highlighter (see User highlighters).

Save main window position

Saves the current windows position to unsure next application intense will equal the current position (see Program - behaviour).

Edit Clip Definition File

Shows a list of possible clips. After you choose, the clip file is opened for editing.

Clips Hotkeys

For each clip you can assign a shortcut for quick access. This lists the existing shortcuts for the active clip definition file. Only enabled if at least one shortcut exist.

User Variables...

List of static variables for use in clips. You can use predefined or add/edit/delete new variables.

Spell Settings... (Ctrl+F7)

Options for spell check and auto correction (see Spell check options).

See Topics

· Spell check
· Spell check options


Language

Sets language for PSPad user interface.

It is not necessary to restart PSPad if this setting is changed, however, the selected language file must exist in .\Lang subdirectory.

Each language contains plain text file with localization (*.INI) and flag picture in BMP format 17x15px. INI and BMP have same name.


Program - part 1

File Tabs - Panel on Top

File panel position top / bottom

File Tabs - allow Multiline Tabs

When checked the file tabs may occupy several rows in the File Panel.

File Tabs - don't show file extensions

When checked the file names will be shown without file name extensions on file panel.

File Tabs - double click closes file

Double click on file tab close file.

File Tab visibility

· Always - file tab is always visible even for one file
· Never - file tabs are never visible
· For 2 and more files - file tabs are visible in case when 2 or more files are open

File Tabs style

You can choose style of file tabs from Tabs/Buttons/Flat buttons.

File Tab caption format

Set format of file tab numbers. If you don't want to have numbered (%n%) file tabs, set format to %name%. Use %d:nn (nn = number of chars) to limit number of characters on each file tab. i.e. %n%) %name% %d:16

Tab switching

Standard - go through files in order as they are

Last 2 files - Ctrl+Tab switches between last used 2 tabs

Last used order - PSPad will remeber order of file tabs you clicked on and use it for file switching using Ctrl+Tab

You can choose style of file tabs from Tabs/Buttons/Flat buttons.

Tool bar icon set

Menu icon set

Set the current icon set. Icon set are in the folder .\Skin.

Icon set is BMP file - strip of individual icons. PSPad from version 4.5.9 automatically changes size of menu and toolbar according to icon size. One icon is square, with 16x16px as standard size or 24x24px as increased size.

PSPad automatically loads and offers icons from .\Skin subfolder.

Show Icons in Menu

When checked the relevant icons will appear next to options in various menus throughout the system. When unchecked only the text of the menu items will be shown. This option is useful for voice reading support used by visually handicapped people.

System icons in File explorer

Uses the system icon in the file explorer. This option can cause problems on operating systems with east Asia support and slows down speed of File explorer drawing.

Show system and hidden files in File explorer

PSPad will show system and hidden files in it's file explorer.

Use extended keys of multimedia keyboard

PSPad will use multimedia keys like Prev/Next for tab switch, Close for close, Browser refresh for reload file file e.t.c.

Use extended mouse buttons

PSPad will use additional mouse buttons Prev/Next for tab switching

See Topics

· Interactive Clips
· View Menu
· Program - behaviour


Program - behaviour

Program - part 2

ESC to Exit Program

When checked, pressing the ESC key will cause the program to Close. Note: If there is no active file then Esc will always close the program.

Show Splash Screen

When checked, the splash screen shows during program start.

Force restore to primary display

After start PSPad will be restored on first screen. This option is useful if you use 2 monitors at work and laptop screen at home

Autosave main window position

It will automatically remember PSPad main window size and position when you exit program.

Ident.bytes in UTF-8 coding

Files with UNICODE or UTF-8 coding has special leading bytes for format identification. For some programs are these bytes are redundant (PHP, Java). You can turn off writing of leading bytes.

R/O mode changes file attribute

When checked, switching R/O mode in PSPad has changes the file read-only attribute. Ordinarily, when PSPad opens a file in R/O mode, it is only Read Only in the editor, and the file attribute is left unchanged.

Czech ANSI <--> OEM Conversion

Provided internal code page conversion instead of system functions. Note: Only has meaning for Czech countries.

Highlight URL address if no Highlighter

PSPad has capability to highlight URL address if no highlighter is used or highlight syntax is switched off. You can Ctrl+Click on highlighted URL to open it in internet browser.

Status bar function require double click instead of single click

PSPad statusbar is active. It means if you click on statusbar, you can change block selection, change highlighter e.t.c. This option setts single or double click for statusbar action.

Cycle through bookmark

When you reach last bookmark, PSPad will brings you to the first one if this option is active.

Follow compilation progress in LOG (slower)

Cursor placement after LOG is displayed.

Split Horizontal for Synchronize

When checked the synchronized moving is done with vertically tiled windows (i.e. There is a horizontal split).

Note: When windows are synchronized, you see a chain link icon in the status bar.

Click on it to "Unsychronize" the windows or simply give the Synchronize command again to toggle it off.

Project - Auto Sort Files alphabetically

When checked, if a new file added into then Project the files in Project tree will be sorted.

Code clips - sorted Interactive Clip Vars

By default all fields in interactive clips are unsorted and displayed in the order written. In special cases, you need show fields in interactive clips in an order other than written in the clip. So you can use this option and give variables fitting names: %1edit%, %2edit%, ... This causes them to sort as you desire.

Split horizontal for synchronize

When you use synchronize function from File Tab context menu, PSPad will split windows vertically as default. This option changes it to split windows horizontally.

Color Syntax Print

When checked, printed output is syntax highlighted as it is on the screen.

See Topics

Project Menu

Special Paste

View Menu

Program - look


Editor - behaviour

Editor - part 1

Scroll past EOL and EOF

Allow you place cursor after end of line. Any characters you type after you place your cursor after end of line will be preceded with space characters.

Trim Trailing Spaces

When selected trailing spaces will be automatically trimmed from end of line.

Auto hide Left Gutter

When set the left margin gutter will be hidden when line numbering is switched off.

ALT sets Column Mode

When checked, if you select text whilst holding down the ALT key then the system will use the column selection method otherwise the normal selection method is used.

RightClick Doesn't Move Cursor

After a right mouse button click the cursor is usually set to the place you clicked .You can disable this by checking this option.

Middle mouse - Clip List

When checked, after a middle mouse button click Clip list is displayed (if available).

Auto Indent Mode

When checked, this option will cause the cursor to start the new line with a left indent equivalent to that of the previous line. Otherwise each line will start at the left margin.

Extended HOME key

The Home key moves the cursor to a point immediately before the first non-whitespace character on the line. Pressing Home a second time moves the cursor to the left margin.

Extended END key

The End key moves the cursor to a point immediately after the last non-whitespace character on the line. Pressing End a second time moves the cursor to the last character on the line. This has no effect when Trim Trailing Spaces is enable.

Extended Cut and Copy

When checked, if no text is selected the Cut and Copy functions will operate on the entire line.

Whole Words Only (Shift+Ctrl+Up/Down)

This option sets the mode for searching next / previous occurrence of current word. When checked this option will search for the previous/next occurrence of the highlighted text as a whole word. When unchecked the option will also find the highlighted text as substrings. When no text is selected, then whatever word the cursor is touching is highlighted as a whole word, regardless of this setting.

Highlight Matching Brackets

When checked matching brackets are automatically highlighted if cursor is next to bracket. Color of highlight can be set in: Program Settings > Colors > Brackets. (See Colors)

Completion of chars ( { [ < " '

After writing opening character the program will automatically write closing, matching character. Brackets are completed when the character immediately after the opening bracket isn't word. Quotes are not completed if there is an alphanumeric character immediately before or after the quote.

Note: This does not work during macro recording!

Smart chars completion

Doesn't complete char if already exists

Wrap (soft) with Right Edge

When Word Wrap is on and this option is checked text will be wrapped at right edge mark, not window width. You may change the Right Edge at any time by clicking on the Ruler to dynamically resize the wrap. This is a soft wrap and does not change line length. When not checked, Word Wrap wraps text to the window and changes as you resize the window.

Add Cr+Lf to EOF

Insure 1 blank line at end of file

Vertical line on cursor position

Shows vertical line which automatically follows cursor position. It's useful in column oriented languages.

See Topics

Editor - settings

Special Conversion

Tools

Specification

Selection Type

View Menu

Look Toolbar

Main Toolbar

Search Menu

Search and Replace

Statusbar Explained


Editor - settings

Editor - part 2

Real Tabs

Switches between tabs [char(09h)] or required number of spaces [char(20h) when Tab is pressed. Tab Width will determine how much space appears in the editor for each Tab, regardless of this setting.

Smart Tabs

When checked, each TAB press will cause the cursor to follow words from previous line. When the cursor moves past the end of the previous line then TAB adds the normal amount of space, determined by the Tab Width setting.

Group UNDO

Undoing all last changes with same character. E.g. insert char.

Max UNDO operations

Maximum number of UNDO steps. In some special cases, the default value 1024 my not be sufficient (find/replace in long files...)

Tab Width

You can define your own highlighters. If you use one of the bolded highlighters (bold in highlighter list), list of user definition is enabled, last five (5). Now you can clicking on items in list assign highlighter definition to one of three user highlighter position.

In this case are filter name and file masks taken from user highlighter definition. See User highlighters.

Indent Width

Set default indent width. Indent Width means number of spaces when you use Indent block.

Auto Refresh [s]

Refreshing interval for HTML browser as well as files marked as Auto Refreshed (see Window Menu).

Max Line Length

You can set maximum line length. Default value is 1024 chars.

Note: This is rarely used and may be eliminated in future version.

Position of Right Edge

Position of right edge marker. You can simply change the position of the marker by clicking on the ruler. This will dynamically rewrap the screen if Word Wrap is turned on. This setting only applies if 'Wrap (soft) with Right Edge' is checked and 'Word Wrap' is turned on.

You can quickly set right edge position by click on Ruler or with shortcut, if you will assign it in Program settings / KeyMap / Show for Set right edge to cursor position

Mouse Wheel scroll Lines

Number of lines to scroll for mouse wheel.

Search Results

Specifies cursor position after operations like find, goto line, etc. If set to default, position will not be changed.

Insert Mode Cursor

This sets the cursor type when the editor is in 'insert' mode. Set from one of Vertical Line, Block, Half-block and Horizontal Line.

Overwrite Mode Cursor

This sets the cursor type when the editor is in 'overwrite' mode. Set from one of Vertical Line, Block, Half-block and Horizontal Line.

Autocomplete delay

Number of milliseconds delay when Autocompletion (Ctrl+J) is fired. Zero means this functionality is switched off.

Spacebar confirms autocomplete text

When active, space bar confirms selected item in autocomplete window.

See Topics

Editor - behaviour

Tools


Confirmation

Ask if OK to wrap search when text not found

Whether confirmation is required to resume search at top of file.

Search in files - summary

Whether to display search summary after performing search in files.

Close all - confirmation

Whether confirmation is required to close the currently open project. See File Menu - Close All.

Confirm close PSPad with open files

Confirmation dialog when you try to close PSPad and some files are open (no modified)

Close open files before open new project

Automatically close all open files when New project action is called

FTP - overwrite existing file confirmation

Whether confirmation is required when overwriting existing file using ftp.

Delete all marks confirmation

Confirmation dialog when you decide to delete all book marks


Files and dirs

Save Recent Files List

Switches on / off recent files saving. If unchecked, recent files history is not remembered after the program exits.

Store for files from local drives only

In Recent file list and Save Work will be stored files from local drive only.

Clear History

This button will clear the MRU file list.

Remember File State

The state of all open files is in the file PSCache.BIN will be stored state of all opened files. If you open this file next time, you will found it in state you close it - cursor position, bookmarks, highlighters, read only state...

Remember Last Filter

When checked causes the system to remember the file type filter last used when opening a file.

Save work / desktop

Drives PSPad behavior when you start application - restore files what was opened when you close PSPad

· Don't restore files - PSPad will starts clear - no previously opened files are open
· In PSPad opened files only - PSPad will restore files you open in PSPad, no files sent from e.g. explorer to PSPad.
· All opened files - PSPad will restore all files what are

If you want to have another possibilities and keep several sets, look at PSPad projects or Sessions capability

Empty file after start

· Show New file dialog
· Open default empty file (see option bellow)
· Don't open file

New Default

You can set default file type for new document if no file is open.

Note: If there is an active document then the type of then new document will be the same as the active document.

Always this type

New file will be always of selected type

New file format

Set default EOL value for new files.

Default CP for files opening

Set to "menu format settings" or other for CP value.

Ignore files (file masks delimited by semicolon)

Set list of file masks. Matches files will be ignored by PSPad (except File explorer).

Remember Last Directory

When checked causes the system remember the last used directory in Open dialog. Project settings has priority over this setting!

Same As Active Document

Sets the Open Dialog to the directory of the active document.

Designate Directory

Specifies default directory when using Open dialog. Project settings has priority!

See Topics

Save desktop


Backup

Backup Copy of Files

If checked the program will create file backups adding tilde char into extension. If file has name MyFile.TXT, backup file will be MyFile.~TXT. Backup system works differently if backup directory option is used, see below.

Folder for File Backup:

If filled, file name is not changed, but file is copied into specific directory including original directory structure.

Example:

original file: C:\Projects\Delphi\PSPad\PSPad.DPR

backup directory: D:\Backups

backup as: D:\Backups\C\Projects\Delphi\PSPad\PSPad.DPR

Autosave [min]

When set (ie value is not zero) then PSPad will automatically save changed files.

Backup dir for FTP files

Folder where local copy of files from FTP is stored. PSPad will create structure in this directory starting with FTP name. When no directory is specified, TEMP folder is used.

Path where PSPad config file is stored. This path is active, when you click on it, Windows explorer is open in this path

Backup configuration

Restore configuration

Couple of buttons which allows you quickly backup/restore your PSPad configuration. It will create CAB archive with date stamp in file name.

You can use it e.g. when you want to move PSPad to another computer.


Colors

Font Color / Background

Changing these colors influence all highlighters by setting them all with the same color of font or background. So, be careful and test it out.

Selected Back / Selected Font

Background and font colors of selected text.

Current Line

Background color of current line.

Right Edge

Color of right edge marker. If you want to hide it, set the same color as background.

Gutter

Background and foreground color for left gutter.

Link/Visited link

Color of URL link and visited URL link

Spell Check

Color for underline mark when Spell Checker is enabled.

LOG parser

If you fill Log parser string in compiler settings then after clicking in LOG window, this will be background color for corresponding line in the editor.

Brackets

Color for matching bracket highlighting.


System integration

Multi User Environment

PSPad is able to work in multiuser environment such as Windows NT, Win2k, WinXP,etc. In this environment normal users may not be able to write or create files in "Program Files" directory. If this option checked, config and other user dependant files are stored in user profile directory.

Open TXT files

When checked this sets the association for .TXT files to PSPad. otherwise .TXT files are associated with notepad. Note: If Windows notepad.exe is replaced with the version of notepad.exe supplied with PSPad then this option is, effectively, ignored.

Register in System context menu

When Checked you can open any file in PSPad or PSPad HEX editor by clicking right mouse button on it and selecting corresponding item in context menu. You have 2 possibilities: registry and DLL library. I suggest you to use DLL library and only in case there are some problems to use Registry integration.

DLL Context menu handler

PSPad will use DLL library for the Windows Explorer context menu handling instead of registry. It's preferred way, it allows you more than the registry integration and it's much faster.

Link on the DeskTop

Adds or removes desktop shortcut for PSPad editor.

Link in the START menu

Adds or removes Start menu shortcut for PSPad editor.

Link in Send To menu

Adds or removes Send To item for PSPad editor in Windows Explorer context menus.

Integrated scripting support (WSH)

Enable/Disable PSPad scripting support. (See Script User's Guide)

Minimize to Tray Icon on Exit

Program is minimized to tray on exit. Start from tray is near immediate. You can control it over icon in tray. This behavior will change in next version.

Only One Program Instance

Allows you open either one or several instances of PSPad. When enabled, any new files sent to PSPad will be opened in the currently running instance, in a new file tab. You can force open new instance with /N as PSPad command line parameter

Register in IE as HTML Viewer

When checked, sets PSPad as default HTML viewer for MS Internet Explorer.

Internal HTML browser mode

This option set IE compatibility for PSPad internal HTML browser

See Topics

File Tabs Context Menu


Registered file types

You can register PSPad for direct opening (double click) chosen file types. For example, Adding .pl will load perl scripts into PSPad when you double click on them (be careful about doing this, as you might want to have these files run in PERL by default). Adding the association will also give perl scripts the PSPad file icon. When you delete a registered file type from the list, it is returned to whatever it was associated with before it leaves the file icon as a PSPad file.


Multihighlighter

PSPad is able to highlight scripts (VBScript, JavaScript, PHP, TCL/Tk) and some other types (CSS, XML for example) inside HTML code. This is done using a special highlighter called the HTML Multi-Highlighter. Uses the settings on this page to determine how it works.

HTML MultiHighlighter

Enable Multi-Highlighter

When checked this option enables the multi-highlighter. This means that the

For <%...%> use

This option allows you to set the language type (and hence the highlighting) that is used between the <% %> usually associated with inline code on ASP pages.

MultiHighlighter Base

This allows you to choose either HTML or XHTML as the basis for the multihighlighter.

Open in Multi-Highlighter

Each file type checked here will open in the HTML Mulit Highlighter rather than it's own. Choose from PHP, JavaScript, VBScript, TCL/TK, XML or CSS.

Multi-Highlighter Section

Section Colour same as Highlighter

When checked, section tags (<style>, <script>, etc) are the same colour as the highlighter that is used to set there contents, otherwise the font and background colours are as set below.

Font Colour / Background

These will be used for highlighting begin and end part of sections in Multi-Highlighter (scripts, CSS, ...)

See Topics

HTML Menu

Script User's Guide


Tools

HTML - Compressed Line Length

This sets the maximum line length for when the option HTML / Compress HTML Code is used.

HTML - Text to HTML - Lines as paragraphs

When checked this option will braked each line of text with <p></p> tags when the HTML / Conversion / Text to HTML option is used. Otherwise the end of each line has a <br> tag appended to it.

CSS - Always real Tabs in CCS reformat

When checked this option will cause the system to indent CSS definitions with real tabs regardless of the setting of the 'Real Tabs' option in Settings / Program Settings / Editor.

CSS - Insert color in format RGB()

Instead of common form #RRBBGG, PSPad will insert color in form of RGB(r,g,b)

CSS - empty lines after section

PSPad will insert empty lines after each section if you will use CSS reformat function

Sort Code explorer results alphabetically

Content of the Code explorer will be alphabetically sorted

Refresh Code explorer content after file save

When you save file, content of the Code explorer will be automatically refreshed

Search - fill in search field with selected/current text

Search string will be automatically filled with current word under cursor or selected text in case of selection is one line only

Replace - fill in replace field with clipboard

Replace field will be filled with content of clipboard

Search in Files - remember Replace setting

Search/Replace in files dialog - replace check box and replace field content will be kept during PSPad session

Join lines - space as separator

Join line function will insert space as separator when you join lines

File locking

see the File locking

See Topics

HTML Toolbar

Special Conversion

Editor - behaviour

Specification

Editor - settings


Text difference

Text Diff File Compare

Ignore Char Case

Character case will be ignored during compare

Ignore Highlighter Colors

Font styles (bold & italics) will be kept in Text difference result window, but syntax highlighting is suppressed.

Ignore Blank Space

Lines with different number of spaces or tabs only wouldn't be marked as changed

Added / Deleted / Modified.

Here you may change background colour of text difference results for the various modifications.

External TextDiff tool

PSPad allows you use any external text/file diff tool which supports command line. In case you will set external tool, handling in PSPad is same as for internal TextDiff, but external tool is called.

To send both files use %File1% and %File2% variables as parameters. If file path contains spaces, there is necessary to put both parameters into double quotes: "%File1%" "%File2%"

Suggested external tools:

Meld

KDiff

WinMerge

DiffMerge

See Topics

· Tools Menu
· Text Differences


Internet

Proxy server

Use proxy server

When checked forces the use of a proxy server when viewing HTML pages. The options below can only be accessed when this option is checked.

Get proxy server settings from MS Internet Explorer

When checked this option will cause the proxy server settings to be taken from your MS Internet Explorer settings. This option is not available if 'Use proxy server' is not set.

Address

Proxy server IP address .

Port

Proxy server port address. For MS proxy usually 8080, Winroute, WinProxy use 3128, another common value is 80.

User name / Password

Values required to access to proxy server if necessary.

e-Mail

Choose email client you will use in PSPad editor. Independent of default client in system.


Web server

Settings required when you want preview web pages in your local Web Server (e.g. Apache)

Server

Name of computer with web server. If web server is on your computer, use localhost

Document Root

Default directory of local web server documents (value c:\apache\htdocs is default for freeware Apache web server).


HEX editor

Hexadecimal offsett / decimal offset

You can select if you want address lines in HEX editor by hexadecimal or decimal numbers

Numbers of columns

Numbers of columns displayed in HEX editor

Bytes per columns

Number of bytes displayed in one column

Note: you can set this values direct in HEX editor with MouseWheel or Ctrl+MouseWheel


Key mapping

PSPad allows you to redefine shortcuts. Key mappings are stored in text file KeyMap.INI, placed in same directory as PSPad.exe or user profile directory, if Multiuser environment is activated. You can edit this file manually too.

How do I used it:

· Double click (or Right Arrow) on the file menu or category you want to change;
· Double click (or press Enter) the line in tree with action name you want to set the shortcuts for;

Press new hotkey in dialog window. Press Esc or Cancel to discard the change you just made or press OK to assign the new shortcut;

Settings are only written after you press main OK button in settings dialog! To discard all changes made to all keys, press Cancel in Settings dialog or press 'Undo Changes'.

If shortcut is assigned to another action, when you press OK, you get a confirmation box asking if you want to overwrite the old setting. Select 'No' cancel the change. After confirmation, the old assignment is deleted and the key stoke is assigned to the new action.

Clear All

Clears all shortcuts

Undo changes

All changes are returned back to the program's last actual state

Default

Deletes file Keymap.INI, so after a restart, default key mapping is restored

Save to file

Saves actual key mapping into file his name you choose

Load from file

Load key maping from file you select

See Topics

· Keyboard shortcuts
· Mouse control
· Keyboard commands


Special settings

In Program settings, there are several advanced options. This options are not accessible in Program settings dialog, but only through direct edit of PSPad.INI or via the Direct edit button.

Most of parameters are switches with 1 or 0 (True or False) value.

AutoDetectBinary=[0|1|2]

Dectect and open binary files in his Hex editor. 0: OFF, 1: ON, 2: ON with confirmation

CaseSensitiveAutoComplete=[0|1|2]

Determine case sensitivity for Autocomplete:

0 - case insensitive

1 - case sensitive

2 (default) - case sensitivity depends of highlighter

CheckDeleted=[0|1]

When PSPad window is restored or selected, PSPad checks if there is no file change made by another program. This active option will warn user that file he edits was deleted.

CheckDocChanges=[0|1]

switch on/off document detection made by another program

CodeExplorerLimit=nnnnnnn

File won't be parsed automatically by Code explorer if it's file size overcomes number of bytes

ContinueComment=[0|1]

In some languages (Java, C++) are used document comments. PSPad will automatically continue with a comment you started.

CtrScrollIfSelected=[0|1]

If text is selected, Ctrl+Up/Down jump to start/end of selection or scroll document.

DontChangeFileAttribs=[0|1]

Disables any file attribute manipulation, this overwrites "Program Settings".

DragImgAlt=[0|1]

DragImgTitle=[0|1]

DragImageClass=[0|1]

Has influence of content IMG element after drag image into text.

ExtraLineSpacing=n

This parameter has influence of space between lines. Suggested values are -1..3

F1HelpInEditor=[0|1]

Disable F1 help shortcut, allowing F1 assignment to another command.

ForceSaveWork=[0|1]

Setting variable to 1 will save open and recent files after each change instead of program close

GutterClickInclLF=[0|1]

Clicking gutter selects entire line including CrLf.

HighlightCurrentFileTab=[1|0]

Switches ON/OFF highlighting of the current file tab with different background color if Windows themes are disabled

HLOnUpToSize=nnnnnnn

Set number of bytes. If you open file and length of file exceed value, syntax highlight stay off - decrease time need for open file.

LeftToPreviousLine=[0|1]

If you are on line start and press Left button, cursor moves to end of previous line.

MainFileInPreview=[0|1]

Switch if internal HTML preview shows MainFile or actual file.

MarkCurrentFileTab=[0|1]

Switches ON/OFF caption underline of the current file tab.

MaxRecentFiles=nn

Maximum number of recent files.

MaxRecentHistory=nn

Maximum number of history items (search dialogs, Command Line, ...).

MaxWrapSize=nnnnnnn

Maximal file size limit for file to be open in WordWrap mode in bytes. Default value is 200000

MultiHLOnUpToSize=nnnnnnn

Set number of bytes. If you open file and length of file exceed value, PSPad won't use HTML multihighlighter (in case HTML multihighlighter should be used) but will use simple highlighter (e.g. PHP)

OldMainIcon=[0|1]

Set old PSPad program icon.

OldSpecialChars=[0|1]

This option force PSPad to use old characters for invisible chars (space, line end, tab). Set this option if you have problems with standard chars.

OpenAllReadOnly=[0|1]

Opens all files as Read only - corresponding to set R/O in PSPad.

OpenFileSizeLimit=nnnnnnn

PSPad will warn you before file open when file size overcome number of bytes

RightDockWidth=nnnnn

Width of the right area where panels can be docked in pixels

SafeSaveFile=[0|1]

Usage for synchronized folders, shared folders from virtual machines e.t.c. File is created into TEMP folder and coppied to target location. It means target is changed at once in one step.

SessionCloseFiles=[0|1]

Restore session automatically closes all open files first

ShowHint=[0|1]

Disable program hints.

SortScriptMenu=[1|0]

Settings to 0 will prevent script menu alphabetical sort.

TextClipsIfHLOff=[0|1]

After Ctrl+Space will show Clip library corresponding to highlighter or plain TXT file clip library.

TransparencyLevel=[0..255]

Changes application transparency level. Higher number means higher transparency.

UnicodeComposition=[0|1]

Provides automatical Unicode canonical char composition after file is load. Note that it sgnificantly slow down file open process.


Colors

PSPad uses user highlighter settings. In menu Tools / Highlighter Settings, you have several tabs where you can set colors and font attributes, file filters, external applications and compiler, even a LOG code parser.

Complex color palette

You can read and save complex PSPad color palettes and simply change the look of whole program.

· reading - choose some palette from combo box and press Load button
· saving - write palette name and press Save button

HTML Multi-Highlighter

This highlighter is used for complex highlighting of another code inside HTML code, such as PHP or JavaScript.

Base highlighting comes from HTML highlighter.

Parts of code detection

· <script> </script> JavaScript
· <script...javascript...> </script> JavaScript
· <% %> VisualBasic script
· <script...vbscript...> </script> VisualBasic Script
· <script...tcl...> </script> TCL/TK
· <? ?> PHP
· <script...php...> </script> PHP
· <style...> </style> CSS

See Topics

Working with Color

Color Selector


Specification

Filter Name

Name is displayed in filter list in open and save dialog.

Help File / URL address

Enter path to help file, local or URL address. Allows the variable %word% as part of the path, where %word% shall be replaces with the current word. You can use form of %lword% or %uword% - same as %word% changed to lower case or upper case. Once path is set, you may press Alt+F1 to display associated help for actual word (e.g. if you edit HTML code and cursor is on the "body" word, after Alt+F1 help for HTML syntax is opened and you will see context for "body" keyword). In Multi-Highlighter, the called help depends on the part of code you are in.

File Masks

With this setting, you choose which highlighter will be active when you open this file type. In Filter Name of HTML Document, you find File Masks of *.htm and *.html. That means any files you open in PSPad with those extensions will use this highlighter.

Tab Width

You can define your own highlighters. If you use one of the bolded highlighters (bold in highlighter list), list of user definition is enabled, last five (5). Now you can clicking on items in list assign highlighter definition to one of three user highlighter position.

In this case are filter name and file masks taken from user highlighter definition. See User highlighters.

Real tabs

You can specify if highlighter will use spaces or real tabs. Checkbox is 3-state! Grayed state (default) means global Program settings will be used.

Extended Indent Chars

Some program languages (PHP, C,...) uses indentation for code writing:

xxx {

xxx {

xxx

xxx

}

}

You can define chars for extended indentation.

Conditions:

· Char must be last char on line.
· In program settings must be checked "autoindent" options.

Documentary comments

You can specify string (e.g. @ToDo) marking comments what you want to see in Code explorer. Rest of the line behind the string will be displayed in Code explorer.

Note, that if you use user highlighter, you need to set Documentary comment string in user highlighter.

See Topics

§ Special Conversion
§ Editor - behaviour
§ Tools


External applications

For each highlighter (ie, for each file type or 'environment') you can set up to 5 external applications. Shortcut keys are automatically defined for the first 3. These are F9, Alt-F9 and Shift-F9 respectively.

Application List

This is the list of defined External applications for this file type. You can change the order in which they appear using the buttons on the right hand side of the list. To delete or modify an entry in the list highlight it and use the relevant button under list. To add an entry to the list you must supply a name and a path to an application before you can press the 'Add' button.

Name:

This value will be displayed when you select 'File|Open with Program ...' or press the External Applications button on the tool bar.

Application:

Program name including path and parameters. The command line can include a number of variables. Right mouse click will display a menu used to insert variables. See the entry on Compiler and External Program Variables for more information.

LOG file:

If a path to a LOG is specified the external program is executed and any output is captured and sent to the LOG file. Once execution of the program is complete the LOG file is displayed. This means that if a LOG file is specified PSPad will be unavailable for use until the External Program execution is complete. If no LOG file is specified control returns to PSPad immediately. You can use variables in the LOG file entry.

See Topics

File Tabs Context Menu

Working With Projects

Project Context Menu

Project Menu

Control Toolbar

Command/Compiler Variables

Window Menu


Compiler Settings

In some cases you need not only open document in external application, but run in external application, wait for application exit and than show some result (LOG). For this purpose is in PSPad compiler.

Compiler settings you find in menu Tools / Highlighter settings / Compiler tab settings.

You can run it from toolbar projcompile or use shortcut Ctrl+F9

What is given as param to compiler

Sorted as priority:

· main project file
· main file, if project doesn't exists
· active document

Compiler

Full path and program name to compiler without double quotes

Params

You can set compiler params, file name, ...

List of param variables is on bottom of this form. You can use context menu to insert param

LOG file

In this file is usually compilation results. PSPad shows you this file in LOG window on the bottom part of editor.

PSPad will automatically search for first line containing error after compiler run. You can navigate next/previous error with buttons on the Log window left side or use standard Find next/previous actions (F3/Shift+F3). Condition: Log window is focused.

Run After Compilation

You can run compiler result (result code, or something else) after compilation.

Save All Files Before Compilation

If checked, all modified files will be saved before compilation

Catch Program Output Window

Catches standard command line compiler output and display it in LOG window

LOG parser

If you set it, you are able by clicking in LOG window, open (or switch into) source file and set position to line (column) if included in LOG content.

Variables and masks:

* any text

%F filename

%L line number

%C column number

Example:

LOG:

[Error] uHLSett.pas(346): Undeclared identifier: 'ik'

[Fatal Error] PSPad.dpr(58): Could not compile used unit 'uHLSett.pas'

parser:

*] %F(%L)

Example explanation:

Because line begin in LOG isn't explicit, you need find common parts: ]space and on the begin put *.

Behind is filename %F than ( and line number, so we put %L. Closing bracked isn't necessary,but look nice :-)

For compiler settings examples see compiler examples chapter.


Compiler examples

For compiler setting details see stand-alone chapter

Green text is to be replace by real values based on your compiler settings.

Assembler 8051

Assembler x86 with TurboAssembler

AutoIT3

Borland C++ Builder

GNU/Cygwin gcc/make

Java SDK

Kix32 - Debug

Kix32 - Run

LaTeX

LaTeX to PDF

MS-Dos Batch language

MS_SQL

ORACLE

PHP

Perl

Turbo pascal

VisualBasic Script

XMLlint - XML document check

Assembler 8051

Compiler: drive:\path\cass51.bat

Parameters: drive:\path\asm51 %Dir% %Name% %Ext%

Content of auxiliary file cass51.bat:

@Echo Off

cd %1

copy %2%3%4 %1%3%4

cass51 %3%4

del %3%4

copy %3.* %2%3.*

del %3.*

Assembler x86 with TurboAssembler

Compiler: drive:\path\Tasm.bat

Parameters: drive:\path\tasm\%Dir%%Name%

Run After Compilation: %Dir%%Name%

Content of auxiliary file Tasm.bat:

@ECHO OFF

REM %1 = filepath

REM %2 = FileName without extension

REM Better do add path to directory with tasm.exe and tlink.exe to system %PATH% variable

CD %1

IF EXIST %2.exe DEL %2.exe

tasm %2.asm

tlink %2.obj

DEL %2.obj

DEL %2.map

AutoIT3

Compiler: drive:\path\Aut2Exe.exe

Parameters: /in %File%

Run After Compilation: %Dir%%Name%.exe

Borland C++ Builder

Compiler: drive:\path\bcc32.exe

Parameters: %Name%%Ext%

LOG File: %Name%.LOG

Run After Compilation: %Name%.exe

[X] Capture Program Output Window

LOG parser: * * %F %L:

GNU/Cygwin gcc/make

Compiler: cmd.exe

Parameters: /C "set PATH=%PATH%;C:\Cygwin\bin\; & make"

Default Directory: C:\Cygwin\home

[X] Capture Program Output Window

[X] Hide Output window

LOG parser: %F:%L:*

Java SDK

Compiler: drive:\path\javac.exe

Parameters: %Name%.java

LOG File: %Name%.log

Run After Compilation: cmd /k Java %Name%

[X] Capture Program Output Window

LOG parser: F:%L

Kix32 - Debug

Compiler: drive:\path\Kix32.exe "%File%" /d

Kix32 - Run

Compiler: drive:\path\Kix32.exe "%File%"

LaTeX

Compiler: drive:\path\CSLatex.bat

Parameters: %Name%.tex

LOG File: %Name%.log

Run After Compilation: windvi %Name%.dvi

Content of auxiliary file CSLatex.bat (distribution of TeXLive is supposed):

@echo off

kpsewhich cslatex.fmt > nul

if errorlevel 1 goto genformat

if errorlevel 0 goto okay

:genformat

fmtutil --byfmt cslatex

:okay

latex -translate-file=cp1250cs %1 %2 %3 %4 %5 %6 %7 %8 %9

LaTeX to PDF

Compiler: drive:\path\PDFLatex.bat

Parameters: %Name%.tex

LOG File: %Name%.log

Run After Compilation: path_to_Acrobat_Reader\AcroRd32 %Name%.pdf

Content of auxiliary file PDFLatex.bat (distribution of TeXLive is supposed):

@echo off

kpsewhich pdfcslatex.fmt > nul

if errorlevel 1 goto genformat

if errorlevel 0 goto okay

:genformat

fmtutil --byfmt pdfcslatex

:okay

pdftex -translate-file=cp1250cs %1 %2 %3 %4 %5 %6 %7 %8 %9

MS-Dos Batch language

Compiler: drive:\path\system32\cmd.exe

Parameters: /K "%File%"

LOG File: drive:\path\%Name%.log

Note: External application example.

MS_SQL

Compiler: drive:\path\osql

Parameters: -S server_name -U login_name -P password -d database_name -n -w1000 -i"%File%" -o"%Dir%%Name%.log"

LOG File: %Dir%%Name%.log

ORACLE

Compiler: drive:\path\PLUS80.EXE

Parameters: -s user/password@db @ drive:\path\RunSQL "%Dir%%Name%.Log" "%File%"

LOG File: %Dir%%Name%.Log

Content of auxiliary file RunSQL.SQL:

spool &1

set term off

@&2

spool off

exit

Note: Don't forget to finish command by " ; " char!

PHP

Compiler: drive:\path\php.exe

Parameters: "%File%"

[X] Capture Program Output Window

LOG parser: *on line %L

Perl

Compiler: drive:\path\perl.exe

Parameters: "%File%"

[X] Capture Program Output Window

LOG parser: *on line %L

Turbo pascal

Compiler: drive:\path\tpc.bat

Parameters: %Dir% %Name%

Run After Compilation: %Dir%%Name%

Content of auxiliary file tpc.bat:

@ECHO OFF

CD %1

IF EXIST %2.exe DEL %2.exe

tpc %2 -uD:\Programy\PASCAL\tpu -m

VisualBasic Script

Compiler: drive:\path\system32\wscript.exe

Parameters: "%File%"

LOG File: drive:\path\%Name%.log

Note: External application example.

XMLlint - XML document check

Compiler: drive:\path\xmllint.exe

Parameters: --valid %File%

[X] Capture Program Output Window

LOG parser: file:///%D%F:%L:

Note: You need Windows binaries of LibXML package (GPL licence) from LibXML page

Download latest archives of LibXML, IConv and ZLib. Content of the bin folders copy into your folder.

See Topics

Starting PSPad

Command line parameters

Window Menu


Command/Compiler Variables

How they work

When configuring External Commands or Compilers it is possible to use a number of variables in the application settings path and the LOG file path. These are described below.

%File%

Full path name, including drive specifier, of current file.

Example: C:\MyProg.exe "%File%"

Becomes: C:\MyProg.exe "C:\Documents and Settings\user\This File.txt"

Note: The quotation marks around the variable name are required if the path name includes spaces.

%Dir%

Full path, including drive specifier, of directory in which current file is saved.

Example: C:\MyProg.exe -o "%Dir%"

Becomes: C:\MyProg.exe -o "C:\Documents and Settings\user\"

Note: The quotation marks around the variable name are required if path name includes spaces. Also note that the %Dir% variable includes the trailing slash (\).

%DosFile%

Short path name, including drive specifier, of current file.

Example: C:\MyProg.exe "%DosFile%"

Becomes: C:\MyProg.exe "C:\DOCUME~1\user\MYDOCU~1\ThisFi~1.txt"

Note: The quotation marks around the variable name are required if the path name includes spaces.

%DosDir%

Full short< path, including drive specifier, of directory in which current file is saved.

Example: C:\MyProg.exe -o "%DosDir%" ...

Becomes: C:\MyProg.exe -o "C:\DOCUME~1\user\MYDOCU~1\"

Note: The quotation marks around the variable name are required if the path name includes spaces. Also note that the %Dir% variable includes the trailing slash (\).

%Name%

Name, without extension, of current file.

Example: C:\MyProg.exe "%Name%"

Becomes: C:\MyProg.exe "This File"

Note: The quotation marks around the variable name are required if file name includes spaces.

%Ext%

Extension of current file name.

Example: C:\MyProg.exe -e %Ext%

Becomes: C:\MyProg.exe -e .txt

Note: Extension includes preceding perid (.).

%ProjectName%

Current project name without path

Example: C:\MyProg.exe -p "%Project%"

Becomes: C:\MyProg.exe -p "New Project"

%ProjectDir%

Current project file path without project name

Example: C:\MyProg.exe -p "%ProjectDir%"

Becomes: C:\MyProg.exe -p "c:\project file path"

%ProjectMainFile%

Project Main file if set, otherwise current file

%PSPath%

PSPad application path.

Example: C:\MyProg.exe -p "%PSPath%"

Becomes: C:\MyProg.exe -p "C:\Program Files\PSPad\"

Note: Path includes trailing slash (/).

%URLFile%

Full path name, including drive specifier, of current file preceded by "file://localhost/"

Example: C:\MyProg.exe "%URLFile%"

Becomes: C:\MyProg.exe "file://localhost/C:/Documents and Settings/user/This File.txt"

Note: The quotation marks around the variable name are required if the path name includes spaces.

%HttpFile%

Full path name, including drive specifier, of current file preceded by "http://localhost/"

Example: C:\MyProg.exe "%HttpFile%"

Becomes: C:\MyProg.exe "http://localhost/C:/Documents and Settings/user/This File.txt"

Note: The quotation marks around the variable name are required if the path name includes spaces.

%PHPFile%

If start of path of current file matches value of setting in "Settings > Program Settings > Internet > Document Root" then the variable will be replaced with the value "http://localhost/" + the path relative to Document Root. Otherwise variable equates to %File%.

Example: C:\MyProg.exe "%PHPFile%"

Becomes: C:\MyProg.exe "http://localhost/MySite/text.htm"

Note: Assume the Document Root is set to "C:\Inetpub\wwwroot" and the current file path is "C:\Inetpub\wwwroot\test.htm"

Note: The quotation marks around the variable name are required if the path name includes spaces.

%SelText%

Currently selected text.

%Input%

Prompt user to enter value.

Note: If "Cancel" is pressed when prompt is displayed, command will not be run. To run command with no value, delete any text in prompt's input box and press "OK"

%Word%

Word at current cursor position.

%Line%

Line number of current cursor position.

%AppData%

Path where applications store data by default.

%HomePath%

Path to the user's home directory.

Example: C:\MyProg.exe -p "%HomePath%"

Becomes: C:\MyProg.exe -p "\Documents and Settings\UserName"

Note: Path excludes drive (C:) and trailing slash (/).

%Temp%

Default temporary directory used by applications for current user.

Example: C:\MyProg.exe -p "%Temp%"

Becomes: C:\MyProg.exe -p "C:\DOCUME~1\UserName\LOCALS~1\Temp"

Note: Path is short and usualy excludes trailing slash (/).

%UserProfile%

Path of profile for current user.

Example: C:\MyProg.exe -p "%UserProfile%"

Becomes: C:\MyProg.exe -p "C:\Documents and Settings\UserName"

Note: Path excludes trailing slash (/).

%WinDir%

Path of operating system directory.

Example: C:\MyProg.exe -p "%WinDir%"

Becomes: C:\MyProg.exe -p "C:\WINDOWS"

Note: Path excludes trailing slash (/).

See Topics

File Tabs Context Menu

Working With Projects

Project Context Menu

Project Menu

Control Toolbar

External applications

Window Menu


Spell check options

Details about using the spell check can be found here.

Dictionary

You may choose one of the installed dictionaries. You may need to download a dictionary (See Spell check).

Show As

Style of word underlining, options include MS word or Corel WordPerfect.

Show as MS Word

Show as Corel WordPerfect

Ignore One-char Words

Ignore Words with Numbers

Auto Correct

How it works?

Auto Correct works with a list of word pairs. Word on left side will be replaced with word or phrase on right side of list.

You write word followed by some word delimiter (space, symbol, ...). If the word is found in the list, it will be replaced with the replacement word (or phrase).

Note: To edit an entry, you must select it, modify it in the lower textboxes and then, press Edit to save your changes.

How and where can I use it?

If you regularly make mistakes with some words (changed letters, missing letters,..). PSPad can auto correct these mistakes. teh > the; theer > there

Next case is to increase speed of writing source code. If you have some long name functions, e.g. IncludeTrailingBackSlash you can simply write itb and PSPad will "correct it" by writing out the full function name.

Where is list stored?

Word list is in text file named AutoCorr.TXT in the same directory as PSPad.EXE or user profile directory, if MultiUser environment is set on. Structure of this file is simple:

What to replace | Replace with

Try Auto Correct yourself

· Enter your initials, and your full name.
· Enter teh, and the
· Enter fo, and for (i= ; i >= ; i++) { }

See Topics

Spell check

Settings Menu


Window Menu

Set as Main File for Compiler

Sets file as main project file. If you run the compiler (see Compiler Settings) the file marked as Main (if set) is always sent to the compiler. That file may or may not call other files to be compiled. If you don't compile this type of file, then setting as Main serves to make that file more visible in the editor file tabs.

Show / Hide LOG window (Ctrl+L)

Toggles the display of the LOG window. In LOG window you see compilation results, find in files results, ...

Jump to Editor / LOG (Alt+L)

Toggles the active focus to-or-from LOG window and editor window.

Autorefresh Window

The window is marked when auto-refresh is ON for the active file. (Refresh icon on status bar and different color in file panel). When AutoRefresh is on, the file is automatically reopened after given interval in seconds (Program Settings > Editor > Auto Refresh [s] ). Refreshing is provided only if document is active. When you click on another file tab, you are not interrupted. When the AutoRefreshed document is once again selected and active, then refreshing will resume. You are prompted for changes: "File 'x' was changed. After reopen, changes will be lost. Continue?" If you say no, the file is not reopened and your changes will not be lost. But you will be prompted again after the interval.

Sort file tabs alphabetically

Sorts file tabs in alphabetical order

File tab color

This function allows you to set individual color for any file. If Save file state functionality is enabled, the color is saved too.

Note: This settings has higher priority that file tab color in Highlighter settings (setting for language)

Vertical Split

Shows two views of the same file, to the left and right. Each can be scrolled independently.

Horizontal Split

Shows two views of the same file, one above the other. Each can be scrolled independently.

Open in new instance

Opens current window in new PSPad instance. Same function is in File tab context menu

Next Window (Ctrl+Tab)

Switch to next open file.

Previous Window (Shift+Ctrl+Tab)

Switch to previous open file.

Cascade

The windows cascade from the upper left to the lower right of the workspace.

Tile Vertical

Windows are resized to fit verticaly within the workspace.

Tile Horizontal

Windows are resized to fit horizontaly within the workspace.

Arrange

Windows are tile horizontally, but put the active document on top. Alternately, you may drag your document tabs to the order you prefer and then tile horizontally. Note: It does NOT tile horizontally when there are more than 3 files open. It displays in square boxes.

See Topics

File Tabs Context Menu

Working With Projects

Project Context Menu

Project Menu

Control Toolbar

External applications

Command/Compiler Variables

Compiler examples


Script User's Guide

PSPad from 4.3.3 version supports active scripting (users can add functionality with simple scripts) via MS Windows Scripting host (WSH). PSPad script functions and examples may be found here. Scripts are compiled once PSPad opens. Scripts are executed and/or recompiled with the use of the Script menu or via an assigned keyboard shortcut.

WSH must be installed, enabled, and Integrated scripting support (WSH) must be enabled if you want use scripting in PSPad. (See System integration)

WSH supports not only VBScript and JavaScript (default) but also additional languages.

· WSH download
· Microsoft scripting documents Includes reference material for VBScrip, JScript (JavaScript), Script Runtime, WSH, WMI, and ADSI.
· Windows Scripting Languages infomation
· Batch Scripts for Windows
· FileSystemObject Basics

Where are the scripts stored

Scripts are organised in subdirectories coresponding to language. The root folder for scripts comes as subfolder .\Script.

PSPad automatically creates subfolder for WSH supported languages. If you install new language for WSH, PSPad creates new folder.

Note: Do not put non-script files into this directories!!! Do so may result in script compile error.

Note: If you installed PSPad into Program files folder, you have to run it as administrator to be able create new subfolders

Script (function) libraries

You can build script libraries and use functions from other modules. Access to function in other modules required a prefix of the module name separted by a period (.).

i.e. modeuleName.function(index)

See Topics

Script Menu

Script Language Reference

PSPad Actions

Multihighlighter

HTML Menu


Script Language Reference

GLOBAL FUNCTIONS

Command | Description
addMenuItem | Creates menu item
echo | Information box with text and button OK
setWaitCursor | sets/resets hourglass mouse cursor
inputText | Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box
tabsToSpaces | Converts tabs to spaces
sleep | Stops script execution for number of miliseconds
pspadVersion | Returns PSPad version
getVarValue | Returns any PSPad variable
moduleExists | Returns version of module, if module doesn't exists, returns empty string
moduleVersion | Returns file name of module, if module doesn't exists, returns empty string
moduleFileName | Returns module filename include last backslash
modulePath | returns module file path include last backslash
closeEditorByTitle | Closes editor by filename
closeEditorByIndex | Closes editor by index
closeAllEditors | Closes all editor windows
newEditor | Creates new object for editor handling
editorsCount | Number of currently open editors
setClipboardText | Stores text into clipboard
getClipboardText | Returns text from clipboad
runPSPadAction | Runs any PSPad action
pspadClosing | Returns if PSpad is in closing state
reloadUserHighlighter | Reloads user highlighter definition sent by parameter
mainWindowHandle | Returns handle of main PSpad window

EDITOR OBJECT FUNCTIONS

Command | Description
activate | Set focus to editor
appendText | Appends text to editor end
assignActiveEditor | Assign active editor window into object and show it
assignEditorByIndex | Assign editor window to object by editor index
assignEditorByName | Assign editor window to object by file name
assignLog | This function is obsolete and is replaced with logXXXXX() functions
caretX | Sets/returns editor CaretX position
caretY | Sets/returns editor CaretY position
closeFile | Closes file
command | Runs editor command processor command
editorWindowHandle | Returns current editor window handle
fileName | Sets/returns editor file name
lineText | Replaces/returns content of active line
linesCount | Returns editor lines count
topLineIndex | Sets or returns index of first line in editor window
linesInWindow | Returns number of lines in window
markEditorLine | Paint editor line sent by parameter as click in the log Window
newFile | Creates new file in PSPad. File name is optional
openFile | Opens existing file in new editor window
openFileFromFTP | Opens file using FTP
printFile | Print editor
readOnly | Set or return current editor read only (R/O) status
reloadFile | Reload file
saveFile | Saves file
saveFileAs | Saves file as
saveFileToFTP | Saves file to current FTP directory
splitWindow | Get or set editor window split state
selText | Replaces/returns selected text from editor
setBlockBegin | Sets begin of block selection
setBlockEnd | Sets End of block selection
blockBeginX | Returns block selection bounds, begin X
blockBeginY | Returns block selection bounds, begin y
blockEndX | Returns block selection bounds, end x
blockEndY | Returns block selection bounds, end y
selStart | Returns/sets selection start
selLength | Returns/sets selection length
selectionMode | Sets selection mode - C:column, L:line, N:normal
setCaretPos | Sets editor caret position. -1 in parameter mean no change coordinate
text | Replaces/returns all editor text
textDiffWithFileName | Compares text in editor with file given by parameter
textDiffWithEditorIndex | Compares text in editor with another editor given by index
tabColor | Returns/sets color of file tab. Parameter is string in RGB format

LOG ACCESS FUNCTIONS

Command | Description
logClear | Clears whole LOG window content
logAddLine | Adds new line into LOG
logGetLine | Returns line from LOG, identified by index parameter (numbered from 0)
logSetLine | Sets log line, identified by index
logLinesCount | Sets log line, identified by index
logLineIndex | Sets or returns current line of the log
logSetTypeMemo | Sets LOG style to MEMO - free selection without error marks
logSetTypeList | Sets LOG style to LIST - line by line selection with error marks
logIsVisible | returns if LOG windows is/isn't visible

PROJECT ACCESS FUNCTIONS

Command | Description
projectSave | Save current project
projectFilesCount | Number of files in current project
projectFiles | File path including filename
projectFileName | Project file path including filename
projectItemsCount | Number of project items files + folders
projectItems | Item path including filename
projectItemType | Type of project item - file or folder

FTP FUNCTIONS

Command | Description
ftpConnect | Connect to predefined FTP connection
ftpDisconnect | Disconnect FTP server
ftpCommand | Send command to FTP server, e.g.. "CWD \public\www"
ftpDownloadFile | Download file using FTP
ftpUploadFile | Upload file using FTP

addMenuItem(caption: string; submenu: string; procedure: string; [shortcut: string]): Long(1)

Creates menu item. If you don't want submenu, send empty string as parameter. It is contained in script Init subroutine and works only during Init phase. All other calling is ignored. "&" may be used in caption to assign menu shortcuts. Caption set as "-" creates a line divider. More infomation about shortcut keys is found here. Shortcuts are optional.

Example VBscript

' Subroutine "Init" Is required

' It Is called automatically during initialization To create menu items.

Sub Init

  menuName = "&" & module_name

  addMenuItem "&Main method"         , menuName, "Main"

  addMenuItem "PSPad &version"       , menuName, "Demo1"

  addMenuItem "Script module version", menuName, "Demo2", "CTRL+ALT+1"

  addMenuItem "Open &script file"   , menuName, "openScript"

  addMenuItem "-"                   , menuName, ""

  addMenuItem "&Log Access"         , menuName, "DemoLog"

End Sub

Example JavaScript

// Subroutine "Init" Is required

// It Is called automatically during initialization To create menu items.

function Init() {

  menuName = "&" + module_name;

  addMenuItem("&Main method"         , menuName, "Main");

  addMenuItem("PSPad &version"       , menuName, "Demo1");

  addMenuItem("Script module version", menuName, "Demo2", "CTRL+ALT+2");

  addMenuItem("Open &script file"   , menuName, "openScript");

  addMenuItem("-"                   , menuName, "");

  addMenuItem("&Log Access"         , menuName, "DemoLog");

}

Example Python

def Init():

pspad.addMenuItem("Example function", "PySample sample", "beispiel")

pspad.addMenuItem("Version", "PySample sample", "version")

pspad.addMenuItem("Selection", "PySample sample", "selection")

Back to Top

echo(text: string): void

Information box with text and button OK.

Example VBscript

echo "Hello World!"

Example JavaScript

echo("Hello World!")

Back to Top

setWaitCursor(boolean)

Sets the mouse cursor to HourGlass when parameter is True or set the mouse cursor to Default for False parameter.

Example VBScript

setWaitCursor(True)

' some code here

setWaitCursor(False)

Back to Top

inputText(prompt: string, default: string[, cancel: string]): string

Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box. If user clicks "Cancel" a empty string is returned, or value of optional cancel parameter.

Back to Top

tabsToSpaces(input: string): string

Converts tabs to spaces.

Back to Top

sleep(ms: integer): void

Stops script execution for number of miliseconds.

Example VBscript

Sub FindToDos

  Set SH = Wscript.CreateObject("WScript.Shell")

  SH.AppActivate "PSPad"

  Sleep(100)

  '// Send Alt + F

  SH.SendKeys "^f"

  Sleep(100)

  SH.SendKeys "todo"

  Sleep(100)

  '// Sends the shortcut for the ok button. = Alt+O

  SH.SendKeys "%l"

End Sub

Back to Top

pspadVersion(): string

Returns PSPad version.

Example VBscript

echo "PSPad version : " & pspadVersion()

Example JavaScript

echo("PSPad version : " + pspadVersion());

Example Python

def version():

version = 'pspad version: %s\n' % pspad.pspadVersion()

pspad.echo(version)

Back to Top

getVarValue(variable: string)[, filename: string]:string

Returns any PSPad variable. Second parameter is optional, is used fo filename related variables.

Example VBscript

test = getVarValue("%UserName%")

echo(test)

PSPad variables list, you can use any PSPad or system variable

Back to Top

moduleExists(name: string):boolean

Returns version of module, if module doesn't exists, returns empty string.

Back to Top

moduleVersion(name: string):string

Returns file name of module, if module doesn't exists, returns empty string.

Example VBscript

echo "Module version: " & moduleVersion(module_name)

Example JavaScript

echo("Module version: " + moduleVersion(module_name));

Example Python

def version():

version = 'module version: %s' % pspad.moduleVersion('PySample')

pspad.echo(version)

Back to Top

moduleFileName(file_name: string): boolean

Returns module filename include last backslash.

Back to Top

modulePath():string

returns module file path include last backslash.

Back to Top

closeEditorByTitle(file_name: string): boolean

Closes editor by filename.

Back to Top

closeEditorByIndex(index: integer): boolean

Closes editor by index.

Back to Top

closeAllEditors(): void

Closes all editor windows.

Back to Top

newEditor(): object

Creates new object for editor handling.

Example VBscript

Set editor = newEditor()

editor.assignActiveEditor

handleSelText = editor.selText

Example JavaScript

var obj1 = newEditor(); //New editor object

obj1.openFile(moduleFileName(module_name)); // Open actual script file

var s = obj1.Text(); //returns all text from window 1

Back to Top

editorsCount():integer

Number of currently open editors.

Back to Top

setClipboardText(text: string)

Stores text into clipboard.

Back to Top

getClipboardText(): string

Returns text from clipboad.

Back to Top

runPSPadAction(action: string)

Runs any PSPad action. Click here for a list of comands.

Example VBscript

Const module_name = "RunAction" 'this name must be unique !!!

Const module_ver = "0.001" 'version

Sub Procedure

Set obj = NewEditor()

For i = 0 To editorsCount - 1

  obj.assignEditorByIndex(i)

  obj.activate

  If i = 0 Then 'For first file we Call user convertor selector

    runPSPadAction "aUserConvertors"

  Else 'For all other files we run last used convertor

    runPSPadAction "aLastUserConvertor"

  End If

Next

End Sub

' name "Init" Is required, its called automatically during initialization To create menu items

Sub Init

addMenuItem "Run action demo (convert all Open files)","", "Procedure"

End Sub

Back to Top

pspadClosing(): boolean

Returns if PSPad is in closing state

Back to Top

reloadUserHighlighter(name: string)

If user highlighter name send as parameter is loaded (highlighter name or name of definition file), PSPad will reload it

Back to Top

activate(): boolean

Set focus to editor. Return a value of True/1 on success

Back to Top

appendText(string): boolean

Appends text to editor end.

Back to Top

assignActiveEditor(): boolean

Assign active editor window into object and show it.

Example VBscript

Sub replaceRegExp

  Pattern = InputBox("Enter RegExp.", module_name, "([^\n\r]+)[\n\r]{1,2}")

  msg = "Enter replacement text for RegExp /" & Pattern & "/."

  newtext = InputBox(msg, module_name, "$1\+\+\+")

  text = handleSelText("")

  text = runRegExpReplace(text, Pattern, newtext)

  handleSelText text

End Sub

Private Function runRegExpReplace(haystack, Pattern, newtext)

  Set regEx = New RegExp

  If Pattern = "" Then

      runRegExpReplace = haystack

      Exit Function

  End If

  regEx.Pattern   = Pattern

  regEx.IgnoreCase = TRUE

  regEx.Global     = TRUE

  runRegExpReplace = regEx.Replace(haystack, newtext)

End Function

'// @param string Text to replace selected text

Private Function handleSelText(text)

  On Error Resume Next

  Set editor = newEditor()

  editor.assignActiveEditor

  If text = "" Then

      '// Get selected text

      handleSelText = editor.selText

      If handleSelText = "" Then

          '// No text was select. Get all text and select it.

          handleSelText = editor.Text

          editor.command "ecSelectAll"

      End If

  Else

      '// Set selected text

      editor.selText text

  End If

End Function

Back to Top

assignEditorByIndex(index: integer): boolean

Assign editor window to object by editor index.

Example VBscript

Sub GetOpenFiles()

  On Error Resume Next

  Set tmpeditor = newEditor()

  Set outputlog = NewEditor()

  outputlog.AssignLog

  outputlog.selText(vbNewLine)

  i = 0

  Do While tmpeditor.assignEditorByIndex(i)

      FileName = tmpeditor.fileName

      '// assignEditorByIndex always return 1, hack to detrmine when all

      '// open editors have been handled.

      If FileName = LastFileName Then

          Exit Do

      End If

      LastFileName = FileName

      outputlog.selText(FileName & vbNewLine)

      i = i + 1

  Loop

  outputlog.selText("Number of open file: " & i & vbNewLine)

End Sub

Back to Top

assignEditorByName(file_name: string): boolean

Assign editor window to object by file name.

Back to Top

assignLog(): boolean

This function is obsolete and is replaced with logXXXXX() functions.

Example VBscript

'// Paste clipboard content to log

'// Requires PSPad 4.3.3 (2065)

Sub paste2Log

  Set outputlog = NewEditor

  With outputlog

      .AssignLog

      .selText(vbNewLine)

      .command "ecPaste"

  End With

End Sub

Back to Top

caretX(integer): integer

Sets/returns editor CaretX position.

Back to Top

caretY(integer): integer

Sets/returns editor CaretY position.

Back to Top

closeFile(): boolean

Closes file.

Back to Top

command(editor_command: string): boolean

Runs editor command processor command. Click here for a list of comands.

Back to Top

fileName(string): string

Sets/returns editor file name.

Example VBscript

Private Function GetFileName()

  On Error Resume Next

  Set editor = newEditor()

  editor.assignActiveEditor

  GetFileName = editor.fileName

End Function

Sub openFolder

  Set FS     = CreateObject("Scripting.FileSystemObject")

  Set Shell = CreateObject("Shell.Application")

  Set File   = FS.GetFile(GetFileName())

  folderName = File.ParentFolder

  Shell.Explore folderName

End Sub

Back to Top

lineText(string): string

Replaces/returns content of active line.

Back to Top

linesCount(): integer

Returns editor lines count.

Back to Top

topLineIndex(): integer

Sets or returns index of the first line in editor window

Back to Top

linesInWindow(): integer

Returns number of lines in the editor window

Back to Top

markEditorLine([line: integer])

Marks line in the editor sent by parametr with same style as click from the LOG window.

Back to Top

newFile([file_name: string]): boolean

Creates new file in PSPad. File name is optional.

Back to Top

openFile(file_name: string): boolean

Opens existing file in new editor window.

Back to Top

openFileFromFTP(name): boolean

Opens file using FTP.

Back to Top

printFile(Show dialog box: boolean): boolean

Print editor. Note: For text files only. Will not print Hex file

Back to Top

readOnly(status: boolean): boolean

Set or return current editor read only (R/O) status.

Back to Top

reloadFile(): boolean

Reload file.

Back to Top

saveFile(): boolean

Saves file.

Back to Top

saveFileAs(file_name: string): boolean

Saves file as.

Back to Top

splitWindow(split_state: integer): integer

Gets or sets split window state.

Split state:

0 - isn't split

1 - vertical split

2 - horizontal split

Example VBscript

sub SplitIt

set obj = NewEditor()

obj.assignActiveEditor()

if obj.SplitWindow() = 0 then

       obj.SplitWindow(2)

end if

end sub

Back to Top

selText(string): string

Replaces/returns selected text from editor.

Back to Top

setBlockBegin(x: integer, y: integer): boolean

Sets begin of block selection.

Back to Top

setBlockEnd(x: integer, y: integer): boolean

Sets End of block selection.

Back to Top

blockBeginX(): integer

Returns block selection bounds, begin X.

Back to Top

blockBeginY(): integer

Returns block selection bounds, begin y.

Back to Top

blockEndX(): integer

Returns block selection bounds, end x.

Back to Top

blockEndY(): integer

Returns block selection bounds, end y.

Back to Top

selStart(integer): integer

Returns/sets selection start.

Back to Top

selLength(integer): integer

Returns/sets selection length.

Back to Top

selectionMode(value: string)

Sets selection mode - C:column, L:line, N:normal.

Back to Top

setCaretPos(x: integer, y: integer): boolean

Sets editor caret position. -1 in parameter mean no change coordinate.

Back to Top

text(value: string):string

Replaces/returns all editor text.

Back to Top

textDiffWithFileName(string)

Compares text in editor with file given by parameter

Example VBscript

Set editor = newEditor()

editor.assignActiveEditor

textDiffWithFileName("path and file name")

Back to Top

textDiffWithEditorIndex(integer)

Compares text in editor with another editor given by it's index

Example VBscript

Set editor = newEditor()

editor.assignActiveEditor

textDiffWithEditorIndex(2)

Back to Top

tabColor(rgb: string): string

Sets or returns (without parameter) file tab color. Parameter is string in RGB format: "RRGGBB"

Example VBScript

set obj = NewEditor()

obj.assignActiveEditor()

 obj.tabColor("FF0000")

Back to Top

logClear()

Clears whole LOG window content.

Back to Top

logAddLine(test: string)

Adds new line into LOG.

Back to Top

logGetLine(index: integer): string

Returns line from LOG, identified by index parameter (numbered from 0).

Back to Top

logSetLine(index: integer, test: string)

Sets log line, identified by index.

Back to Top

logLinesCount(): Integer

Sets log line, identified by index.

Back to Top

projectSave(): long

Save current project. Always returns a value of 1.

Back to Top

projectFilesCount(): long

Number of files in current project.

Back to Top

projectFiles(index: long): string

File path including filename.

Example VBscript

Function listProjectFiles()

  data = ""

  For i = 0 To projectFilesCount - 1

      data = data & projectFiles(i) & vbNewLine

  Next

  listProjectFiles = data

End Function

Back to Top

projectFileName(): string

Project file path including filename.

Back to Top

projectItemsCount(): long

Number of files in current project.

Back to Top

projectItems(index: long): string

Item name for the index. If item doesn't exists, it returns empty string.

Example VBscript

Function listProjectItems()

  data = ""

  For i = 0 To projectItemsCount - 1

      data = data & projectItems(i) & vbNewLine

  Next

  listProjectItems = data

End Function

Back to Top

projectItemType(index: long): long

Project item type:

1: folder

2: file

-1: item doesn't exist

Back to Top

ftpConnect(connection: string): Boolean

Connect to predefined FTP connection.

Back to Top

ftpDisconnect()

Disconnect FTP server.

Back to Top

ftpCommand(command: string)

Send command to FTP server, e.g.. "CWD \public\www".

Back to Top

ftpDownloadFile(ftp_name:string, local_name:string): boolean

Download file using FTP.

Back to Top

ftpUploadFile(local_name:string, ftp_name:string): boolean

Upload file using FTP.

Back to Top

See Topics

Script Menu

Script User's Guide

PSPad Actions

Variables list


PSPad Actions

List of Actions

Action | Description
aAddDiacritic | Add accent marks (dictionary is required)
aAddFile | Add current file to project
aAddFilesToFolder | Add Files to project - dialog
aAddFolder | New folder to project
aAllToASCII | Remove Accent from chars
aAutoCompl | Auto completion
aAutoRefresh | Set Autorefresh flag for window
aBlockAlign | Align selection to block
aBlockCenter | Justify block to the center
aBlockLeft | Justify block to the left
aBlockRight | Justify block to the right
aCapitalize | Capitalize block
aClose | Close window
aCloseAll | Close All
aCodeExplorer | Code Explorer window
aCodeFormat | Code Case Change dialog
aColorSelect | Color Selector window
aComment | Add/Remove Comment
aCompile | Compile
aCopy | Copy
aCopyLine | Copy Line
aCSSToInLine | Reformat into Inline CSS
aCSSToStructure | Reformat into Structured CSS
aCSVImport | Import from CSV dialog
aCut | Cut
aDateTime | Insert Date Time
aDateTimeDialog | Date Time Dialog
aDecToHex | Decimal to Hexadecimal selection
aDelete | Delete
aDelFolder | Remove Folder from project
aDelMark | Delete Bookmark
aDelMarks | Delete all Bookmarks
aDiffSame | Text Diff with File Contents on Disk
aDOSFormat | Changes line ends to DOS (Cr+Lf)
aExit | Exit
aExpClipHTML | Export to Clipboard as HTML
aExpClipRTF | Export to Clipboard as RTF
aExpClipTeX | Export to Clipboard as &TeX
aExpClipXHTML | Export to clipboard as XHTML
aExport | Export dialog
aFilesSearch | Search / Replace in Files dialog
aFind | Find dialog
aFindNext | Find Next
aFindPrev | Find Previous
aFindPrevWord | Previous Occurrence of Current Word
aFindWord | Next Occurrence of Current Word
aFont | Font dialog
aFullScreen | Full Screen mode
aGoogleSearch | Google Search dialog
aGotoLine | Goto Line dialog
aGUID | Insert GUID
aHexToDec | Hexadecimal to Decimal selection
aHTMLCompress | Compress HTML code
aHtmlCheck | Check HTML code
aHTMLPrev | HTML Page Preview
aHTMLReformat | Reformat HTML code
aHTMLSelTag | Select TAG
aIndent | Indent Block
aInfo | File Info
aInserFile | Insert From File...
aInsertText | Insert Text into Lines...
aInvertCase | Invert Case
aJoinLine | Join Lines
aLangHelp | Help for Language
aLastUserConvertor | Run Last used convertor
aLineNum | Line Numbers
aLogWindow | Show / Hide LOG window
aLoremIpsum | Lorem Ipsum generator
aLowerCase | To Lower Case
aMACFormat | Changes line ends to MAC (Cr)
aMacroMgr | Macro Manager
aMacroPlay | Play Macro
aMacroRecord | Start / Stop Recording
aMailContents | As e-mail Contents
aMailFile | As e-mail Attachment
aMarkDown | Next Bookmark
aMarkList | Bookmark List
aMarkSelection | Creates bookmarks on the selection begin and end
aMarkUp | Previous Bookmark
aMatchBracket | Matching Bracket
aMD5Gen | Hash generator dialog
aMoveAs | Move as dialog
aNew | New file dialog
aOpen | Open file dialog
aOpenCopy | Open Active File with New Name dialog
aOpenHex | Open in HEX Editor dialog
aOpenSame | Open R/O copy of Active File
aOpenSelected | Open file appointed by selection
aOpenWWWFile | Open File from Internet dialog
aPageSetup | Page Setup dialog
aPaste | Paste
aPasteHTML | Paste as HTML
aPasteNoMove | Paste Without Cursor Change
aPrint | Print file
aPrintPrev | Print Preview
aPrintSetup | Printer Settings dialog
aProjAddOpen | Add all open files to project
aProjFolderClose | Close files of current project folder
aProjFolderOpen | Open files of current project folder
aProjFromDir | Create Project from Directory dialog
aProjInfo | Project Information dialog
aProjMainFile | Set File as Main for Compiler
aProjNew | New Project (closes all)
aProjOpen | Open Project dialog
aProjSave | Save Project
aProjSaveas | Save Project as dialog
aProjSettings | Project Settings dialog
aProjShow | Show/hide left Panel
aReadOnly | Read Only on/off for file
aRedo | Redo
aReformat | Reformat block (paragraph=blank line)
aReformat2 | Reformat block (paragraph=short line)
aRemoveBlankLines | Remove Blank Lines
aRemoveDuplicities | Remove duplicated lines (case sensitive)
aRemoveDuplicitiesCI | Remove duplicated lines (case insensitive
aRemoveFile | Remove File from Project
aRemoveRedundantBlank | Remove Redundant Blank Lines
aRemoveSpaces | Remove Redundant Spaces dialog
aRemoveTags | Remove HTML tags - it opens result in new window
aReOpen | Reopen Active File
aRepeatLastAction | Repeat last command
aReplace | Replace dialog
aRollBar | Ruler on/off
aRTFImport | Import text from RTF
aSave | Save current file
aSaveAll | Save All files
aSaveAs | Save As dialog
aSaveBlock | Save Block As dialog
aSaveSameTime | Save Without changing File Date
aSaveToFTP | Save to FTP
aSelectAll | Select All
aSelectNext | Next Window
aSelectPrew | Previous Window
aSelInsideMarks | Select text between nearest Bookmarks
aSelMatchBracket | Select text Inside Brackets
aSelString | Select String
aSendToDisk | Save to Drive A:
aSentensize | Sentensize selection
aSetMain | Set as Main File for Compiler
aSetMark | Set Bookmark
aShellOpen | Open with associated application
aShowControlBar | Show/hide all toolbars
aShowSpecChar | Show/hide nonprinted characters
aSort | Sort dialog
aSpell | Online Spell Check on/off
aSpellCheck | Spell Check with dialog
aSpellSett | Spell Settings dialog
aStayOnTop | Stay on Top on/off
aSwapLineAbove | Swap line with line above (applicable to block)
aSwapLineBellow | Swap line with line bellow (applicable to block)
aSwitchLog | Jump to Editor / LOG
aSyntax | Syntax on/off
aSyntaxChange | Change Syntax dialog
aSysEdit | Open System Files (Autoexc, Config, ...)
aTabToSpaces | Convert Tabs to Spaces dialog
aTagToLowercase | Tags to Lowercase
aTagToUpperCase | Tags to Uppercase
aTextToHTML | Text to HTML
aToJScript | Selection to JavaScript
aToPHP | Selection to PHP variable
aUndo | Undo
aUnIndent | UnIndent Block
aUnixFormat | Changes line ends to UNIX (Lf)
aUnQuote | Remove Email Quoting
aUpperCase | To Upper Case
aUserConvertors | User Convertors dialog
aWindCascade | Cascade windows
aWindSplitHoriz | Horizontal Split current file
aWindSplitVert | Vertical Split current file
aWindTile | Arrange windows
aWindTileHoriz | Tile windows Horizontal
aWindTileVert | Tile windows Vertical
aWordWrap | Word Wrap Lines on/off

See Topics

Script Menu

Script User's Guide

Script Language Reference


User highlighters

How to create user highlighter

Open the user highlighter dialog by selecting Settings menu > User Highlighter.

Highlighter definition

1. Load highlighter definition for folder .\PSPad\Syntax.
2. Fill Name.
3. Fill File Types, Comma Delimited. Comma delimited extension list of file types (*.bat, *.log, ...)
4. Select Comment Style. Specification of comment styles used in your language. You can combine several styles together.
5. Choose string identifiers of double and/or single quotes.
6. Check Preprocessors. Contains special parts of code, usually compiler directives, usually proceeded with a # symbol.
7. Fill word word list.
8. Fill word word list.
9. Save highlighter definition. User highlighter's are saved in the .\PSPad\Syntax folder.

How to tell PSPad to use new highlighter

1. Select Settings menu > Highlighter settings.
2. Select Specification tab.
3. On the left (highlighter) list, click on one of three bolded highlighters.
4. On the right side is list of user highlighters, select the one you created and click on it.

Color settings for highlighter

If you need change the font and colors for highlighter attributes, go to tab "Colors" and set the colors and font styles you want. If active document corresponds with highlighter you are modifying, you will immediately see the changes you make. (See Working with Color)

Definition file structure description

; Comments, are ignored

; Bold in brackets are section name

[Settings]

; File name

Name=OtherCad

; List of file extension

FileType=*.prg,*.bpk

; Comments settings (optional) 1 = Yes, 0 = No

ANSIComment=0

PasComment=0

CComment=0

SpecComment=1

BasComment=0

SingleQuote=0

Preprocessors=0

....

; List of keywords and reserved words

; Include the = sign at the end of each word.

[KeyWords]

ABS=

ACOS=

ATN=

BOOLEAN=

[ReservedWords]

BOOLEAN=

INTEGER=

STRING=

See Topics

· File Tabs Context Menu
· Statusbar Explained
· File Menu
· Project Menu
· Main Toolbar


Keyboard commands

This is a list of valid keyboard shortcuts. Keyboard shortcuts maybe used to activate any menu command, insert clips, or run user scripts. If multiple keys are required for the shortcut then they should be combined with a plus(+) symbol. i.e CTRL+ALT+1.

The non-alphabetic keys are:

· CTRL
· ALT
· SHIFT
· F1 ... F12
· PGDN
· PGUP
· DEL
· ENTER

See Topics

Keyboard shortcuts

Mouse control

Key mapping

Macro Manager

Macro commands


File type plug-ins

Idea - each file extension has its own EXE or BAT.

Plugin is used for the file open/save handling if EXE or BAT exists and matches the plugin name to file extension.

Plugin loads file given by input file parameter, transforms it and saves it to output file

You can easily call any command line tool and transform file before PSPad opens it with simple BAT file

PSPad automatically detects encoding: UTF-16LE, UTF-16BE, UTF-8. The rest is considered as ANSI

Plugin must support 3 parameters:

syntax: switch InputFile OutputFile

switch: -L|-S

Load file using plugin: extension.exe -L "existing_file" "temp_file_for_PSPad"

Save file with plugin: extension.exe -S "temp_file_from_PSPad" "output_file"

================================================================================

BAT plugins example for command line placed in .\Plugins subfolder when BAT is in .\Plugins\FileType

if %1 == -L "%~d0%~p0..\some.exe" %2 %3

if %1 == -S "%~d0%~p0..\some.exe" %2 %3

See Topics

Export


Table of contents

Top

Contents

branchtop page Overview

minus Basic information

line minus FAQ

line minus Licence

line branchbottom page Contacts and info

minus Working with PSPad

line branch page Starting PSPad

line minus Working with File Tabs

line line branchbottom page File Tabs Context Menu

line minus Working With Projects

line line branchbottom page Project Context Menu

line branch page Working with Text

line branch page Working with Color

line minus FTP

line line branchbottom page FTP setting

line branch page Hex editor

line branch page Command line parameters

line branch page Code page conversion

line branch page Statusbar Explained

line minus Macro

line line branch page Macro Manager

line line branchbottom page Macro commands

line branch page Keyboard shortcuts

line branch page Mouse control

line minus Files and folders

line line branchbottom page Template Files

line minus Context Files

line line branch page Clips

line line branchbottom page Interactive Clips

line branch page Save desktop

line branch page HTML page - example

line branchbottom page File type plug-ins

minus Menu description

line minus File Menu

line line branch page Open Special

line line branchbottom page Export

line branch page Project Menu

line minus Edit Menu

line line branch page Special Paste

line line minus Lines Manipulation

line line line branchbottom page Insert Text Into Lines

line line branch page Special Conversion

line line branch page Date Dialog

line line branch page Sort

line line branchbottom page Selection Type

line minus Search Menu

line line branch page Search and Replace

line line branch page Search and Replace in Files

line line branch page Google Search

line line branchbottom page Regular Expressions

line minus View Menu

line line minusbottom Toolbars

line line linebottom branch page Project Toolbar

line line linebottom branch page Main Toolbar

line line linebottom branch page Edit Toolbar

line line linebottom branch page Look Toolbar

line line linebottom branch page Control Toolbar

line line linebottom branch page HTML Toolbar

line line linebottom branchbottom page Macro Toolbar

line minus Format Menu

line line branch page Case change

line line branchbottom page Block format

line minus Tools Menu

line line branch page Color Selector

line line branch page Spell check

line line branch page Expression evaluator

line line branch page User convertors

line line branch page Text Differences

line line branchbottom page Running a Command

line branch page Script Menu

line minus HTML Menu

line line branchbottom page HTML TiDy

line minus Settings Menu

line line minus Program settings

line line line branch page Language

line line line branch page Program - look

line line line branch page Program - behaviour

line line line branch page Editor - behaviour

line line line branch page Editor - settings

line line line branch page Confirmation

line line line branch page Files and dirs

line line line branch page Backup

line line line branch page Colors

line line line branch page System integration

line line line branch page Registered file types

line line line branch page Multihighlighter

line line line branch page Tools

line line line branch page Text difference

line line line branch page Internet

line line line branch page Web server

line line line branch page HEX editor

line line line branch page Key mapping

line line line branchbottom page Special settings

line line minus Highlighter settings

line line line branch page Colors

line line line branch page Specification

line line line branch page External applications

line line line minus Compiler Settings

line line line line branchbottom page Compiler examples

line line line branchbottom page Command/Compiler Variables

line line branchbottom page Spell check options

line branchbottom page Window Menu

minusbottom Customize PSPad

linebottom minus Script

linebottom line branch page Script User's Guide

linebottom line minus Script Language Reference

linebottom line line branch page Global Functions

linebottom line line branch page Editor Object Functions

linebottom line line branch page LOG Access functions

linebottom line line branch page Project Access Functions

linebottom line line branchbottom page FTP Functions

linebottom line branchbottom page PSPad Actions

linebottom branch page User highlighters

linebottom branchbottom page Keyboard commands


Include Images

 Top

See Topics

· Special Paste
· Tools
· Search Menu
· Google Search
· HTML Menu