开发者

Copying text with color from Notepad++

Is the开发者_如何学JAVAre a way to copy the text from a Notepad ++ file with color?

I am trying to write a tutorial document, and I would to be able to copy the xml tags.

Thanks!


There's a plugin called NppExport that does just that in a couple of available formats. If you don't have NppExport yet, you can download it through the inbuilt plugin manager.

update As of version 6.1.5 (or maybe earlier) this ships with a standard install of Notepad++

Copying text with color from Notepad++

update As of 2019 NppExport is not included by default in the Notepad++ 64 bits version (github issue). You can download the 64 bits version of NppExport here: [github]


In NPP v6.7.7 you can do this by selecting your text, right clicking on it, select "Plugin commands" and then "Copy text with syntax highlighting".


To built on Raveren answer : Copy HTML to clipboard didn't for me (for a .bat), I had to select plugins/NppExport/Export to HTML instead and then open the html in a browser and copy the text from there.


It works fine when you choose copy with right click plugin commands and copy text with syntax highlighted.


For Notepad++ 64-bit releases you can find the NppExport plugin here: https://github.com/chcg/NPP_ExportPlugin/releases

I've tested "NppExport_0.2.8.16_x64.zip" with Notepad++ v7.5.4.


For copying .bat file contents, simply choose the 'Copy all formats to Clipboard' Option.


The easiest way worked for me is:

  1. Print your contents from npp++ to pdf by using microsoft print to pdf tool ( It will retain all the formatting and color code in pdf).

    1. Open that pdf file by using Microsoft Word and it will ask you the confirmation for conversion to word, convert it.

    2. If you want to make changes to the file just save save as the file with 'save as' option and that's it.


I have downloaded plugin Manager from https://github.com/bruderstein/nppPluginManager/releases. It contains Plugin Manager DLL and an EXE. Copy paste PluginManager.dll into C:\Program Files\Notepad++\plugins and Copy paste gpup.exe into C:\Program Files\Notepad++\updater. If you dont have updater folder, create one. Restart notepad ++. Under Plugins-->YOu will notice Plugin Manager. Use this to install Plugins. The one I installed is NppExport. This is very use full.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜