I just finished a new plugin which enables source code highlighting of the current file.
The output file type may be HTML, LaTeX, TeX, RTF, XSL-FO or XML. The parser supports more than 100 programming languages.
I have uploaded a new version which highlights the current buffer (I assume this is what should be dynamic). The URL is the same as above.I also uploaded the source code:
André,
> I have uploaded a new version which highlights the current buffer (I assume this is what should be dynamic).
When I said "the generation is not dynamic", I meant that the generated style (text color and font) in a html file doesn't come from Notepad++, but from your definition files.
A dynamic generation should be, IMHO, generic. Therefore it should work with all supported languages without definition files.
Don
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, I see. I should get the style information from the scintilla control instead of applying a foreign parser which may produce output that differs from the editor view.
Implementing this should be no big deal, I added the parser as is because I knew it would do the job ;)
André
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've installed the new version but don't see a menu item for 'current buffer'. I'm assuming that the new functionality is to reformat the contents of the current window, i.e. from ANSI C++ to KR C++ for example. Am I misunderstanding you?
Bahman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The original highlight tool is not a reformatter and indenter in the first place, although it includes the astyle functionality (reformatting). The main purpose is highlighting of code with a simple configuration.
Unfortunately the astyle code is not very pleasant, and it contains some ugly bugs. It would be easy to provide a astyle plugin, but the project is dead as you can see on the astyle project site here on sf.net. So I see no future in this code.
I will rename the plugin name "Highlight file" to "Highlight buffer", thanks for pointing that out.
André
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A couple of suggestions, then, if I may be so bold:
1. To implement a 'plain text' output format in order to use highlight as a reformatter/indenter. I took a look at astyle, and it seems redundant to implement it as a separate plugin when yours already provides the full functionality except for the final step.
2. To add a 'highlight dialog' menu item to call up the highlight win32 gui with the current file(s) ready to go.
btw I tried to do this via the n++ Run shell, using
18:53:26: Failed to load icon from the file 'C:\Documents and Settings\user\Application Data\Notepad++\WinHighlight.ico' (error 2: the system cannot find the file specified.)
18:53:26: Can not enumerate files in directory 'C:\Documents and Settings\user\Application Data\Notepad++\i18n\' (error 3: the system cannot find the path specified.)
(I found I couldn't get winhighlight to launch correctly from the command line except from within its home directory. I guess a workaround would be to instead run a batch file which changes to this directory first and then passes the FULL_CURRENT_PATH parameter to winhighlight.)
Only suggestions, the plugin is quite useful as-is :-)
Bahman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your plugin is a verry good idea and is very interresting, nevertheless I try it on vhdl source file, and there are lots of keyword that are not properly highligh in exported file (even if thay are in vhdl.lang file). If you need some vhdl code language go to http://www.google.com/codesearch and check what I said.
It is shade that it is not easier to find your plugin.
By
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, very good idea but...
What append in a code source .asp
with html+javascript+vbscript, like in my project 'lutin' on accessibility ?
How define 3 or more language in one file ?
By, Philippe.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I just finished a new plugin which enables source code highlighting of the current file.
The output file type may be HTML, LaTeX, TeX, RTF, XSL-FO or XML. The parser supports more than 100 programming languages.
Download link:
http://www.andre-simon.de/zip/NPPHighlightPlugin.zip
The next step would be to add some options and save them in a file. Plugin development was smooth - good api :)
Have fun
André
It's pity that the generation is not dynamic.
Don
I have uploaded a new version which highlights the current buffer (I assume this is what should be dynamic). The URL is the same as above.I also uploaded the source code:
http://www.andre-simon.de/zip/NPPHighlightPluginSrc.zip
André
André,
> I have uploaded a new version which highlights the current buffer (I assume this is what should be dynamic).
When I said "the generation is not dynamic", I meant that the generated style (text color and font) in a html file doesn't come from Notepad++, but from your definition files.
A dynamic generation should be, IMHO, generic. Therefore it should work with all supported languages without definition files.
Don
OK, I see. I should get the style information from the scintilla control instead of applying a foreign parser which may produce output that differs from the editor view.
Implementing this should be no big deal, I added the parser as is because I knew it would do the job ;)
André
Very nice plugin, Andre.
I've installed the new version but don't see a menu item for 'current buffer'. I'm assuming that the new functionality is to reformat the contents of the current window, i.e. from ANSI C++ to KR C++ for example. Am I misunderstanding you?
Bahman
The original highlight tool is not a reformatter and indenter in the first place, although it includes the astyle functionality (reformatting). The main purpose is highlighting of code with a simple configuration.
Unfortunately the astyle code is not very pleasant, and it contains some ugly bugs. It would be easy to provide a astyle plugin, but the project is dead as you can see on the astyle project site here on sf.net. So I see no future in this code.
I will rename the plugin name "Highlight file" to "Highlight buffer", thanks for pointing that out.
André
Andre,
A couple of suggestions, then, if I may be so bold:
1. To implement a 'plain text' output format in order to use highlight as a reformatter/indenter. I took a look at astyle, and it seems redundant to implement it as a separate plugin when yours already provides the full functionality except for the final step.
2. To add a 'highlight dialog' menu item to call up the highlight win32 gui with the current file(s) ready to go.
btw I tried to do this via the n++ Run shell, using
'C:\Programs\WinHighlight\WinHighlight.exe "$(FULL_CURRENT_PATH)"'
which resulted in the following errors
18:53:26: Failed to load icon from the file 'C:\Documents and Settings\user\Application Data\Notepad++\WinHighlight.ico' (error 2: the system cannot find the file specified.)
18:53:26: Can not enumerate files in directory 'C:\Documents and Settings\user\Application Data\Notepad++\i18n\' (error 3: the system cannot find the path specified.)
(I found I couldn't get winhighlight to launch correctly from the command line except from within its home directory. I guess a workaround would be to instead run a batch file which changes to this directory first and then passes the FULL_CURRENT_PATH parameter to winhighlight.)
Only suggestions, the plugin is quite useful as-is :-)
Bahman
This is a bug of the GUI ;(
I fixed this in version 2.4.3.1:
http://www.andre-simon.de/zip/highlight-W32GUI-2.4.3.1-Setup.exe
thanks!
Bahman
Hi,
Your plugin is a verry good idea and is very interresting, nevertheless I try it on vhdl source file, and there are lots of keyword that are not properly highligh in exported file (even if thay are in vhdl.lang file). If you need some vhdl code language go to http://www.google.com/codesearch and check what I said.
It is shade that it is not easier to find your plugin.
By
Hi,
I will try to finish the vhdl definition by inspecting the VIM file ;)
André
Hello, very good idea but...
What append in a code source .asp
with html+javascript+vbscript, like in my project 'lutin' on accessibility ?
How define 3 or more language in one file ?
By, Philippe.
Hi Philippe,
unfortunately the current highlight parser cannot switch to another mode while parsing a file.
But this is on my todo list :)
André
This plugin was updated to the current higlight code base, including many bugfixes and language parsing improvements.
Download: http://www.andre-simon.de/zip/NPPHighlightPlugin.zip
Source: http://www.andre-simon.de/zip/NPPHighlightPluginSrc.zip