Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Kate external tool to intelligently copy open remote files to local directories.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.



Kate-Get is no longer supported or maintained since the External Tools Plugin was removed.

Kate-Get takes a space separated list of file paths and checks each one against a list of sources. If a match is found, the file is copied via rsync to a local directory. Options for each source are controlled by a config file. Subdirectories are handled automatically based on how local and remote root paths are set.


First, make a config file for kate-get (see the next section) and then call it with

kate-get "file_1 file_2 file_3"

The quoted argument is a space separated string of full file paths. Each file will be checked against the list of sources until it matches one, then the file will be copied into the corresponding subdirectory of the root directory for that source.

YARD documentation can be found at the page

Making a config file

By default, Kate-Get looks for the YAML file


An example of a config file

  :host: ""
  :port: 22
  :user: "user-name"

    :local: "~/Development/foo"
    :root: "/var/www/vhosts/##source_name##/htdocs"
    :base: "s"
    :local: "~/Development/bar"
    :root: "/var/www/vhosts/##source_name##/htdocs"
    :base: "s"
    :host: ""
    :port: 42
    :user: "bar-user-name"

There are two sections

  • global - rsync connection information

    • host - hostname or IP

    • port - port to connect on

    • user - username to connect with

    • These options may be overridden on a per-source basis by specifying them there.

  • sources - each entry is a source name (string) with the following options

    • local - path to local folder where files should be copied too (no leading slash)

    • root - path to remote folder (input file must exist in some subdirectory of this to be copied)

    • base - prefix string that will be stripped from the file name

Note that the string ##source_name## will be automatically replaced by the source name.

In this example config, there are two sources named and Here, has been configured to use different connection info. If a file path starts with the base of one of these sources, it will be copied to the corresponding subdirectory of the root directory for that source. For example, if file_1 was


rsync would copy the remote file from


to the local file


This configuration uses a base which is the form Kate uses when accessing a file over sftp.

Setting up Kate to use Kate-Get

Kate-Get is meant to be used with Kate ( as an external tool. For information on adding external tools to Kate see

If you want a tool that only copies the currently open file use

kate-get "%URL"

If you want to loop through all open files use

kate-get "%URLs"

Note that you may need to use the full path to the kate-get binary, usually


The example confiuration given above


Gem Installation

Download and install Kate-Get with

gem install kate-get


Source Repository

Kate-Get is currently hosted at github. The github web page is To clone the project run

git clone git://


Kate-Get is licensed under the MIT license.


This software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.

Something went wrong with that request. Please try again.