Paste PDF Text Block
Paste PDF text block to Sublime after stripping new lines.
Details
Installs
- Total 5K
- Win 3K
- Mac 1K
- Linux 915
Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 3 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
Mac | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Linux | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Description
Tested on Sublime Text 2 and Sublime Text 3.
Clipboard functionality to copy a block of text from PDF and paste it with the new lines and hyphenated words stripped so that it is a clean paste of a block of text into the target area.
Given that we do a lot of work between PDFs and Markdown in drafting of documents, it seemed necessary to work on the paste functionality a bit.
Using
Base Paste PDF Text Block
The default keybinding is CTRL+ALT+V in Linux and Windows, CTRL+Super+V on OsX. To assign a new keybinding:
- Open “…/Packages/User/Default.sublime-keymap”
- The relevant command name is “paste_pdf”
{ "keys": ["ctrl+alt+v"], "command": "paste_pdf" }
The function will also correct French accents thanks to the kind help of Gery Casiez and Spanish accents thanks to Ome Gak.
Paste PDF Text Block with Pandoc Footnote
One thing I often do is paste a text block but then need to mark it for citation. There is a new command that will take care of that for you, called paste_pdf_pandoc
. This command will preformat the text block using the clean_paste function, wrap the entire block in double quotes, add Pandoc's ^[]
footnote formatting, and place the cursor so you can instantly put in the BibTex reference or citation holder. The default keybinding for this is CTRL+ALT+SHIFT+V in Linux & Windows, and CTRL+SHIFT+Super+v in OsX.
Source Code
MIT License - © 2012 - Watershed Legal Services, PLLC
Installation
Install using Sublime Package Control
If you are using Will Bond's excellent Sublime Package Control, you can easily install Paste PDF via the Package Control: Install Package menu item. The Paste PDF package is listed there. See Package Control
Install using Git
You can install the theme and keep up to date by cloning the repo directly into your Packages directory in the Sublime Text 2 application settings area. You can locate your Sublime Text 2 Packages directory by using the menu item Preferences -> Browse Packages. While inside the Packages directory, clone the theme repository using the command below:
$ git clone https://github.com/compleatang/sublimetext-pastepdf
Manual Install
To download and install package manually:
- Download the files using the GitHub .zip download option
- Unzip the files and rename the folder to Paste PDF
- Move the folder to your Sublime Text 2 Packages directory