ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Copy from Find Results

Little package to remove the line number when copying from the find in files panel

Details

  • 2.0.0
  • github.​com
  • github.​com
  • 10 years ago
  • 28 minutes ago
  • 10 years ago

Installs

  • Total 796
  • Win 441
  • Mac 263
  • Linux 92
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8
Windows 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Copy from Find Results

Build Status

Little package to remove the line number when copying from the find in files panel

Use

The command is designed to only work on the Find Results tab and default to a normal copy otherwise.

It will transform this:

6  class CopyFromFindResultsCommand(sublime_plugin.TextCommand):
7:     def run(self, edit):
8          self.view.run_command('copy')

to this:

class CopyFromFindResultsCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        self.view.run_command('copy')

KeyBindings

There is no default shortcut, to add it open your User Keybindings file and add something like the following:

// Linux or Windows
{ "keys": ["ctrl+c"], "command": "copy_from_find_results", 
    "context": [{ "key": "selector", "operator": "equal", "operand": "text.find-in-files" }]
}

// MacOS
{ "keys": ["super+c"], "command": "copy_from_find_results", 
    "context": [{ "key": "selector", "operator": "equal", "operand": "text.find-in-files" }]
}

using "context": [{ "key": "selector", "operator": "equal", "operand": "text.find-in-files" }] it's being extra careful, you can leave that out and the package will check for Find Results for you.

Outside Find in Files

If you want to use the package outside Find Results you can add a the force argument, like this:

// Linux or Windows
{ "keys": ["ctrl+alt+c"], "command": "copy_from_find_results",
    "args": { "force": true }
}

// MacOS
{ "keys": ["super+alt+c"], "command": "copy_from_find_results", 
    "args": { "force": true }
}

Settings

{
    // If set to false, it removes the dots added by sublime to mark the separation between matches in the same file.
    "keep_intermediate_dots": false
}

Installation

PackageControl

If you have PackageControl installed, you can use it to install the package.

Just type cmd-shift-p/ctrl-shift-p to bring up the command pallete and pick Package Control: Install Package from the dropdown, search and select the package and you're all set.

Manual

You can clone the repo in your /Packages (Preferences -> Browse Packages…) folder and start using/hacking it.

cd ~/path/to/Packages
git clone git://github.com/NicoSantangelo/sublime-copy-from-find-results.git "Copy from Find Results"