FAQ

Author: limodou
Email:limodou@gmail.com
Homepage:http://wiki.woodpecker.org.cn/moin/UliPad
BLOG:http://www.donews.net/limodou
Copyright: GPL

Content

1   About Project

1.1   What is UliPad

UliPad is a General Python Editor based on Python and wxPython. It supports many features that you can find in other Editors, and the main feature of it is flexible mixin and plugin architecture. So user can extend his own functionality into UliPad, and you can treat UliPad as a developing platform.

1.2   How to find & download it

For now, UliPad is hosted on China Woodpecker Community wiki site (http://wiki.woodpecker.org.cn), and it has its own wiki page (http://wiki.woodpecker.org.cn/moin/UliPad). You can download the lastest version of UliPad in this wiki page. And the svn url is:

http://cvs.woodpecker.org.cn/svn/woodpecker/ulipad/trunk

1.3   How do I get the newest source code from SVN

There are a couple of free programs that make this extremely easy. Windows users should get TortoiseSVN http://tortoisesvn.tigris.org/. Others should get RapidSVN http://rapidsvn.tigris.org/.

This FAQ will explain the use of TortoiseSVN.

Once TortoiseSVN has been installed:

If you have yet to install Ulipad, create a new, empty folder for it.

The following apply whether you have yet to install Ulipad, or are updating it with TortoiseSVN for the first time:

  1. Right-click within your Ulipad folder to show the context menu.
  2. Note the two menu entries, SVN Checkout, and TortoiseSVN.
  3. Click on SVN Checkout. This will call TortoiseSVN.
  4. Enter http://cvs.woodpecker.org.cn/svn/woodpecker/ulipad/trunk in the "URL of repository" box.
  5. The Checkout directory should already show the folder you created for Ulipad, for example, C:Program FilesUlipad.
  6. Do not check "Only check out the top folder" or "Omit externals".
  7. Select the "HEAD revision" radio button. This will ensure you get the latest revision. (Should you want an earlier revision for some reason, select the "Revision" button and enter the revision number)
  8. Click OK. The download will begin. When finished, you're ready to use Ulipad!

The second and subsequent times you update Ulipad using TortoiseSVN:

  1. Right-click within your Ulipad folder to show the context menu.
  2. Click on SVN Update and leave the rest to TortoiseSVN!

Hints:

  1. Before updating, you may want to backup your Ulipad folder.
  2. Always make a note of the number of latest revision you have.
  3. http://cvs.woodpecker.org.cn/svn/woodpecker/ulipad/ will show the number of the latest revision available. Or using svn update to see the lastest revision.
  4. Keep up-to-date by subscribing to the Ulipad mailing list at http://groups.google.com/group/ulipad.

2   Starting UliPad

2.1   What's DDE

DDE is dynamic data exchange, this functionality is only existed in window platform. But in UliPad, it uses socket to simulate this function. And UliPad will use it to keep one instance, and when you start UliPad with filename parameter, then the second instance will transfer the filename to the first one, then the file will be opened in the first instance.

2.2   How to set DDE port

Default, UliPad will bind 50000 port to DDE socket, but sometimes this port may be used by others, so you could not use DDE. So you can change the default DDE port in config.ini. Just write down below code in config.ini:

[server]
port=50001

2.3   How to disable DDE

Sometimes you may don't want to use DDE, so you can start UliPad with -n option:

python UliPad.py -n

3   Usage

3.1   How to use code folding

Author: Dick Moores

  1. Enable code folding by checking "Show code folding margin" on Edit -> Preferences, the Document tab.
  2. Click on a "-" to fold. "+" to expand.
  3. Ctrl+Shift+Left-Click anywhere in folding margin will toggle between Fold All and Expand All.

3.2   How to create snippets

Author: Dick Moores

A snippet is usually some bit of code that you want to keep handy for repeated use. Within Ulipad it can be inserted into your code with just a double-click on the snippet's abbreviation in a list of snippets in the Snippets Window.

See the Snippets How-to

3.3   Please explain the Edit->Format menu

Author: Dick Moores

The top 4 items, ("Trim Trailing Spaces", "Leading Spaces To Tabs", "Leading Tabs To Spaces", "ALL Tabs To Spaces"):

  1. Before using any of these four, it's a good idea to click on View -> Tabs and Spaces to make the space/tab marks visible.
  2. Select the lines you want to change and then click on the menu item you want to use.
  3. If you want to change only one line, just position the caret anywhere on that line. Selecting the line is not necessary.
  4. If you want the change to affect all lines in the document, Ctrl+Alt of course will select them all.
  5. When converting spaces to tabs, if the number of leading consecutive spaces in a line is not a multiple of the tab width you set in Edit -> Preferences -> Document (e.g., 10 spaces and tab width 4), not all the spaces will be converted to tabs (for the example, 8 spaces will become 2 tabs, leaving 2 spaces unchanged).

3.3.1   Increase and Decrease Indent

  1. Select the lines you want to affect.
  2. Use the Tab key to Increase Indent (or click on the menu item).
  3. Use Shift+Tab to Decrease Indent (or click on the menu item).

3.3.2   Comment Line and Uncomment Line

  1. Select the lines you want to affect. If only one line, just position the caret anywhere on that line.
  2. Use Ctrl+/ to Comment the line(s) (or click on the menu item). This puts a "#" at the head of each line.
  3. Use Ctrl+\ to Uncomment the line(s) (or click on the menu item). This deletes the "#" at the head of each line.
  4. For documents in languages that use different comment characters from "#", it's handy to enable "Show comment character dialog when adding comment", on the Document tab in Preferences.

3.3.3   Text Quote and Unquote

  1. Select the text you want to enclose in quotes.
  2. Ctrl+' (or clicking on the menu item) will show the Quote Char Select dialog.
  3. Select the radio button for the quote characters you want and hit Enter.
  4. To Unquote, select the text to unquote plus its quote characters.
  5. Ctrl+Shift+' (or clicking on the menu item) will show the Quote Char Select dialog.
  6. Select the radio button for the quote characters and hit Enter.
  7. If you usually use the same quote characters, it may be convenient to define those characters in the dialog box, and check the "User Define Quote Char" box.

4   Others

4.1   What is config.ini used for

config.ini is a configure file of UliPad, default it'll be not existed. Some functionality will automatically create config.ini. And if there is no such file, you can create manually.

More details about it you can see Config Description .

4.2   What is debug.txt used for

It's debug log of UliPad, UliPad will write some debug information into this file, for example: menu infos, toolbar infos, preference infos, etc. So you can use it to get some information of UliPad.

4.3   What is error.txt used for

It's error log file. If there are errors when running UliPad, it'll write error message into this file.

[Return]