Macros

From FlashDevelop

Jump to: navigation, search

Description

Macros are series of internal FlashDevelop commands that are processed for arguments. These can be runned automaticly on application start or as commands during development. The macro management dialog creates menu items for these macros (unless you run them on start) where you can specify shortcuts and icons for the macros. Macros can be exported and imported so they are fairly easy to share with other users.


Syntax and samples

One individual command entry is:

<Command>|<Parameters>

So for example this command executes a script in development mode and letting user to select the file:

ExecuteScript|Development;$(OpenFile)

Here is another sample that saves all modified *.as files and opens the command prompt:

SaveAllModified|as
RunProcess|cmd.exe

Available commands

There are lots of commands available but here are some useful commands. You can browse for more by viewing the MainForm.cs file from the code repository.

  • ExtractZip|<File> - Extracts an internal FD Zip file.
  • ExecuteScript|<File> - Executes the specified script file.
  • RunProcess|<File>;<Args> - Runs the specified process with the specifed arguments.
  • RunProcessCaptured|<File>;<Args> - Runs and tracks the specified process with the specifed arguments.
  • PluginCommand|<Command>;<Args> - Sends the specified command and arguments to all plugins.
  • ScintillaCommand|<Command> - Calls a specified method of the scintilla editor component.
  • SaveAllModified|<Extension> - Saves all modified files with the specified file extension.
  • NewFromTemplate|<File> - Creates a new file from the specified template file.
  • InsertSnippet|<Name> - Expand the snippet specified at the current cursor position

Basics:

  • Undo
  • Redo
  • Cut
  • Copy
  • Paste

Line operations:

  • LineCopy - Copy the line containing the caret.
  • LineCut - Cut the line containing the caret.
  • LineDelete - Delete the line containing the caret.
  • LineTranspose - Switch the current line with the previous.
  • LineDuplicate - Duplicate the current line.

Edition:

  • DeleteBack - Delete the selection or if no selection, the character before the caret.
  • DeleteBackNotLine - Delete the selection or if no selection, the character before the caret. Will not delete the character before at the start of a line.
  • DelWordLeft - Delete the word to the left of the caret.
  • DelWordRight - Delete the word to the right of the caret.
  • DelLineLeft - Delete back from the current position to the start of the line.
  • DelLineRight - Delete forwards from the current position to the end of the line.
  • Tab - Insert Tab/indent.
  • BackTab - Unindent.
  • NewLine - Insert a new line (follow EOL mode).
  • AddLastLineEnd - Adds a line end marker to the end of the document.
  • StripTrailingSpaces - Removes trailing spaces from each line.

View:

  • ScrollCaret - Ensure the caret is visible.
  • SelectionDuplicate - Duplicate the selection. If selection empty duplicate the line containing the caret.
  • ZoomIn - Magnify the displayed text by increasing the sizes by 1 point.
  • ZoomOut - Make the displayed text smaller by decreasing the sizes by 1 point.
  • ExpandAllFolds
  • CollapseAllFolds
  • LineScrollDown - Scroll the document down, keeping the caret visible.
  • LineScrollUp - Scroll the document up, keeping the caret visible.
  • MoveCaretInsideView - Move the caret inside current view if it's not there already.

Selection:

  • Clear - Clear the selection
  • ClearAll - Delete all text in the document.
  • SelectAll - Select all the text in the document.
  • LineDown - Move caret down one line.
  • LineDownExtend - Move caret down one line extending selection to new caret position.
  • LineDownRectExtend - Move caret down one line, extending rectangular selection to new caret position.
  • LineUp - Move caret up one line.
  • LineUpExtend - Move caret up one line extending selection to new caret position.
  • LineUpRectExtend - Move caret up one line, extending rectangular selection to new caret position.
  • CharLeft - Move caret left one character.
  • CharLeftExtend - Move caret left one character extending selection to new caret position.
  • CharLeftRectExtend - Move caret left one character, extending rectangular selection to new caret position.
  • CharRight - Move caret right one character.
  • CharRightExtend - Move caret right one character extending selection to new caret position.
  • CharRightRectExtend - Move caret right one character, extending rectangular selection to new caret position.
  • WordLeft - Move caret left one word.
  • WordLeftExtend - Move caret left one word extending selection to new caret position.
  • WordLeftEnd - Move caret left one word, position cursor at end of word.
  • WordLeftEndExtend - Move caret left one word, position cursor at end of word, extending selection to new caret position.
  • WordRight - Move caret right one word.
  • WordRightExtend - Move caret right one word extending selection to new caret position.
  • WordRightEnd - Move caret right one word, position cursor at end of word.
  • WordRightEndExtend - Move caret right one word, position cursor at end of word, extending selection to new caret position.
  • WordPartLeft - Move to the previous change in capitalisation.
  • WordPartLeftExtend - Move to the previous change in capitalisation extending selection to new caret position.
  • WordPartRight - Move to the next change in capitalisation.
  • WordPartRightExtend - Move to the next change in capitalisation extending selection to new caret position.
  • Home - Move caret to first position on line.
  • HomeExtend - Move caret to first position on line extending selection to new caret position.
  • HomeRectExtend - Move caret to first position on line, extending rectangular selection to new caret position.
  • VCHome - Move caret to before first visible character on line. If already there move to first character on line.
  • VCHomeExtend - Like VCHome but extending selection to new caret position.
  • VCHomeRectExtend - Like VCHome but extend rectangular selection to new caret position.
  • LineEnd - Move caret to last position on line.
  • LineEndExtend - Move caret to last position on line extending selection to new caret position.
  • LineEndRectExtend - Move caret to last position on line, extending rectangular selection to new caret position.
  • DocumentStart - Move caret to first position in document.
  • DocumentStartExtend - Move caret to first position in document extending selection to new caret position.
  • DocumentEndEnd - Move caret to last position in document.
  • DocumentEndExtend - Move caret to last position in document extending selection to new caret position.
  • ParaDown - Move caret between paragraphs (delimited by empty lines).
  • ParaDownExtend - Move caret between paragraphs (delimited by empty lines) extending selection to new caret position.
  • ParaUp - Move caret between paragraphs (delimited by empty lines).
  • ParaUpExtend - Move caret between paragraphs (delimited by empty lines) extending selection to new caret position.
  • PageUp - Move caret one page up.
  • PageUpExtend - Move caret one page up extending selection to new caret position.
  • PageUpRectExtend - Move caret one page up, extending rectangular selection to new caret position.
  • PageDown - Move caret one page down.
  • PageDownExtend - Move caret one page down extending selection to new caret position.
  • PageDownRectExtend - Move caret one page down, extending rectangular selection to new caret position.
  • HomeDisplay - Move caret to first position on display line.
  • HomeDisplayExtend - Move caret to first position on display line extending selection to new caret position.
  • LineEndDisplay - Move caret to last position on display line.
  • LineEndDisplayExtend - Move caret to last position on display line extending selection to new caret position.
  • HomeWrap - ?
  • HomeWrapExtend - ?
  • LineEndWrap - ?
  • LineEndWrapExtend - ?
  • VCHomeWrap - ?
  • VCHomeWrapExtend - ?
  • StutteredPageUp - Move caret to top of page, or one page up if already at top of page.
  • StutteredPageUpExtend - Move caret to top of page, or one page up if already at top of page extending selection to new caret position.
  • StutteredPageDown - Move caret to bottom of page, or one page down if already at bottom of page.
  • StutteredPageDownExtend - Move caret to bottom of page, or one page down if already at bottom of page extending selection to new caret position.
Personal tools