koffee icon indicating copy to clipboard operation
koffee copied to clipboard

Custom external tools

Open mattstermiller opened this issue 8 years ago • 0 comments

Visual-Studio-style custom tools. Allow the user to maintain a list of tools as commands.

Tool properties:

  • Name
  • Exe Path
  • Arguments
  • Hide Window

Arguments support use of these variables:

  • selected_items
  • selected_files
  • selected_folders
  • cursor_item
  • cursor_file
  • cursor_folder
  • location
  • git_repo_root
  • env:ENVIRONMENT_VARIABLE

Variable syntax:

  • Braces around variable names: {selected_files}
  • Brackets around optional arguments containing a variable: [--files {selected_files}]
  • Optional colon and text after the name of a list variable (selected_*) to override the default space delimiter: {selected_files:,}
  • If braces contain anything other than one of the defined variables, it is used literally
  • If brackets do not contain a valid variable definition, it is used literally

When the tool is invoked:

  • Bracketed arguments are only included if the variable within is defined and not empty
  • If a variable outside of brackets has no value, the command is not executed and a message is given such as "Tool XYZ requires variable cursor_file."

Tool management:

  • The Settings window will have new buttons to add, edit and delete tools from the Commands list
  • Adding and editing will open a new Tool form to edit its properties
  • Delimiter definitions in Arguments variables will not be allowed for non-list variables

The existing commands Open Commandline and Open With Text Editor will be replaced with pre-defined tools that behave the same way.

mattstermiller avatar Sep 24 '17 22:09 mattstermiller