Paulis software ->Vedit resources -> Wiki Tools | 31. 07. 2023 |
Collection of Vedit macros and other resources for editing Wiki pseudo HTML.
This is a collection of Wiki editing tools I have made for Vedit text editor. The package is designed for editing Wiki pages that use MediaWiki pseudo HTML syntax (for example Wikipedia and Rosetta code).
From a special WikiTags and W-User menus, you can easily run the macros included.
In addition, the package contains keyboard configuration and syntax highlighting files
for MediaWiki pseudo HTML. Installation instructions and a macro for quick setup are included. See below for the descriptions of each file.
For easy download, all the macros and other files are packed in the file
wikitools11.zip. Click on the link below to download the package.
Note: The Tools (WikiTags) menu below uses some macros from my other Vedit tools packages (as specified in the description below). For full functionality, you need to download those packages, too.
Download WikiTools11.zip - V1.1 - 31.07.2009 - 17 K - Vedit 6.1
Tools Menu (WikiTags)
Wiki_tools.mnu is a Tools menu for Wiki editing. It is named WikiTags in the menu bar. Some of the menu items are inline commands in the menu, others call the macros included in this package, and some items call macros from other pages on my site. Click on the links below, or on an item in the menu to see the description. ->
Matching HTML tag - see (HTML Tools) User Menu (W-User)
Wiki_User.mnu is a User menu for Wiki editing. It is named W-User in the menu bar.
Headings (Outline) - Calls the macro Wiki_outline.vdm |
![]() ![]() |
Wiki.key is keyboard configuration file for Wiki editing. It is somewhat similar to my html2.key configurations, but enters Wiki pseudo HTML instead of HTML tags. (However, some keys insert HTML tags that are accedpted by Wiki.)
The Wiki specific keys are:
F12 | Tools → Matching tag |
Alt-Del | Tools → Delete HTML tag - Deletes tag at cursor and its pair (if any) |
Ctrl-Del | Tools → Delete text inside tag - Deletes text between tags or double quotes |
Shft-F6 | Tools → table Row |
Shft-F7 | Tools → table Cell |
Shft-F8 | Tools → table Header |
Shft-F10 | Tools → List... |
Alt-2 | Level 2 header |
Alt-3 | Level 3 header |
Alt-4 | Level 4 header |
Alt-9 | Go to matching brace |
Alt-\ | Tools → Table... |
Alt-. | Tools → Line break |
Ctrl-H | HTML <hr> tag |
Alt-' | HTML Comment (from cursor to end of line) |
Wiki.syn is a color syntax highlighting file for Wiki pseudo HTML. Highlights headers, links, bold/italics text, characters for lists and indents and some other symbols, comments and HTML tags.
Wiki_fmt.vdm macro opens a dialog box, from where you
can select one of the following character format options:
Bold, Italics, Bold Italics, Strike, Code, Pre, Super, Sub, Small, Font, Span.
If you select "Font", another dialog box opens for selecting font family, size and color.
If you select "Span", the parameter "class" is included for formatting with CSS.
The selected format option is then inserted in the file, using Wiki marking if available, or HTML marking if not.
If a block is highlighted, the the tags are inserted around the block.
This macro is run when you select " " from the WikiTags menu.
Wiki_fmt.vdm macro file contains additional functions that are executed by calling a label.
Link (internal)
Label int_link
is called when you select " " from WikiTags menu.
Adds an internal link at current cursor location. A dialog box opens for entering the link target (page name) and optional link text.
If a block was highlighted when this function was called, the highlighted text will be filled as default link text.
If the cursor is inside existing link tag, the link target and link text are filled in the dialog.
If link text is not entered, the page name is used as link text.
External link
Label ext_link
is called when you select " " from WikiTags menu.
Adds an external link (link to outside the wiki) at current cursor location. A dialog box opens for entering the URL and optional link text.
If a block was highlighted when this function was called, the highlighted text will be filled as default link text or, if the text is detected as an URL, as default URL.
If the cursor is inside existing link tag, the link target and link text are filled in the dialog.
Note: if you select "Link (internal)" when the cursor is inside existing external link tag, or vice versa, the dialog for that link type is opened instead of the link type you selected.
Image
Label image_tag
is called when you select " " from WikiTags menu.
Inserts an image at cursor location. A dialog box open for entering image parameters.
If the cursor is inside an existing image tag, the dialog is filled with the parameters of that tag, and the macro only updates the existing tag.
The following parameters can be entered:
Wiki_lst.vdm macro is used to insert a list or to convert existing text into list using wiki pseudo HTML marking. In addition, this file implements other wiki operations by calling labels, see below.
List...
This macro is called when you select " " from WikiTags menu.
If no block is highlighted, adds level 1 list tag (character '*') at the beginning of current line.
If a block is highlighted, a dialog box opens for selecting the list nesting level to be added on each line.
Indent
Label indent
is called when you select " " from WikiTags menu.
Adds indenting on wiki page by adding ':' character(s) at the beginning of the line. (This is typically used on talk pages)
If no block is highlighted, adds one more level of indenting on current line.
If a block is highlighted, a dialog box opens for selecting the amount of indenting to add on each line (in addition to any existing indent).
Wiki_tbl.vdm contains functions for adding new table, for converting text into table and for adding/removing/copying columns in an existing table.
Table...
When the macro is called without label, it creates a new wiki table (or HTML table) element.
This function is performed when you select " " from WikiTags menu.
If there is no block highlighted, a new table is inserted.
A dialog box opens where you can choose table type, number of rows and columns, and options for headings and borders.
If a block is highlighted, each line in the block will be converted into one table row.
In this case, the dialog box allows you to choose the table column separator.
The macro tries to automatically detect some of the most common separators (comma, semicolon or TAB) and set that as default in the dialog.
table Row, table Cell
After a table has been inserted, you can add more rows and columns by selecting " " or " " from the WikiTools menu.
Edit columns...
Label EDIT_COLUMNS
is called when you select " " from WikiTags menu.
Before calling this function, you must place the cursor on the column you want to edit (on any row of the table).
A dialog box opens for selecting the operation. You can select , , or .
In addition, you can select the number of lines processed, default = 1.
You can paste the copied column(s) as a new table by using the normal "
" command (Ctrl-V). The new table will have the same properties as the one where the columns were copied from.Wiki_outline.vdm macro is called when you select "
" from W-User menu.This is similar to the C Function Select macro. It opens a window to display list of Wiki headings in your source file. You can then use cursor keys to choose a heading, and then press Enter to go to the heading location in the source file, or press Esc to cancel. You can use cursor left/right to display the heading location in the file but stay in the list. If you press esc, you will return to the original location.
Wiki_tools_setup.vdm macro can be used to quickly setup Vedit for wiki editing.
It loads the User and Tools menus and keyboard configuration and sets some settings.
In addition, it loads wiki.syn file for current file.
Installing Wiki Tools is simple. Just unzip the files in your user-mac directory and then run the macro wiki_tools_setup.vdm. Additionally, you may want to save file type specific configuration for wiki files, and create a project for your wiki editing.
Wiki_tools.txt file included with the package contains more detailed instructions for installing the tools. In addition, it contains information for setting up It's All Text! Firefox plugin to work with Vedit.