OpenOffice syntax highlighting - macros

I have some big documentation to do that will contain pieces of code I'd like to give the conventional "coding language" syntax highlighting. I've searched the styles feature to do such a thing, but there is no way to do that (in fact I could only found a forum where people were fighting about adding this feature or not, but this is not the point).
There is an abandoned extension for OpenOffice, but using it freezes my installation of OpenOffice.
What's the easiest way to do this? Should I try to recompile the extension and debug it (although I'm already having a hard time compiling another Java project), or maybe I should use a macro? How to implement this?

One possibility is to use one of the many code to html tools out there and then include the html in your OpenOffice document (using "File..." on the Insert menu).
One possibility is highlight. Vim has a :TOhtml command that will convert the current file to syntax highlighted html using the current colour scheme. I've not tried it, but this looks promising. There are also a few online ones, such as this. I'm sure there are a great many other options.

Related

VS Code formatting plugins

Is there a way in VS Code to format code according to the style that a person prefers? I guess there might be a plugin for this sort of thing but I've not found that.
For example, I prefer 'K&R' coding style while a colleague prefers 'Whitesmiths' style. When we share code or functions it would be nice to autoformat code into the style that each prefers.
This does not seem like it should be so difficult for a plugin to do except that coding style also has to parse the language of the code, so Whitesmiths PowerShell is going to be different from Whitesmiths on Perl I would imagine.
Are there any plugins like this (or internal functionality in VS Code - it's a very comprehensive tool without installing any plugins of course!) that people use regularly like this?
In contrast to its name, "JIndent" (commercial) is a tool I've been using for the exact purpose you're asking about.

Delete a specific Intellisense suggestion in VS Code

Intellisense sometimes comes up with irrelevant suggestions that I will never use in my project. Those can get in the way of the valuable other suggestions.
They also prevent VS Code features like "Add all missing imports" from working.
For example:
The first DocumentType is a low-level module that I will never use.
The second is one that I need in most of my files.
So how can I get rid of the first one?
Related (obsolete and unanswered) questions:
VS Code intellisense remove some suggestions
Disable specific autocomplete suggestion in Visual Studio 2013
You cannot disable specific IntelliSense completion options, however, there are a few other relevant caveats.
Answer to not your question: You can filter whole classes of keywords with the editor setting editor.suggest.filteredTypes. See more about this here.
IntelliSense does not allow you to configure or filter specific keywords. The list of all IntelliSense options is here. It also appears this is impossible with other major options. For example, the language server protocol does not support this(GitHub thread abt this). That being said, there is a plethora of autocomplete extensions and I'm certain this feature exists for some.
Something like intellicode might also be an answer, as it will look through other files you've edited to try to learn your practices.
If you're 100% sold on IntelliSense, and you're willing to sink several hours into this, you could set up a discrete language server, and then use something like this to filter completions as they are sent to the editor. While this would work, I think it's a terrible idea.
After spending several hours with no satisfying result, I created my own IntelliSense snippets. I used another keyword to make sure, it will show on top.
I used the Easy Snippet plugin for this.

Human editable snippet store in eclipse

I am looking for a easier way to manage my eclipse code snippets. I know and have used Eclipse's template and snippets features. But as far as I have found, they can only be exported and imported as XML files.
Since I use many versions of eclipse and I keep migrating between machines managing the snippets is a hassle. I am looking for a UltiSnips like method to manage these snippets/templates. Is there one?
I also looked at snip2code, but it didn't appeal to me because I sometime work offline. Also, I want to have much greater control over the snippets using version control.
Oh well! I couldn't find anything that matched the set of requirements I had. So, I've ended up creating my own.

what happened to gtk_source_iter_forward_search in gtksourceview-3.0

I've looked at the GtkSourceView 3 Reference Manual, and I've googled for a while, but I cannot find any mention of why gtk_source_iter_forward_search was dropped from gtksourceview or what should be used instead.
I've also looked at the features link at the gtksourceview website where it lists as a feature: Caseless UTF-8 compliant search.
I've looked at the gedit source ver 3.2.6 (since I know they use gtksourceview), but they seem to be using gedit_document_search_forward, which I'm guessing comes from some other library. So my question is, what happened to the search capabilities in gtksourceview? Is there another library that provides similar functionality to gtk_source_iter_forward_search, or is it now done another way within gtksourceview?
I originally wrote my editor in gtksourceview-2.0, now I am rewriting it using gtksourceview-3.0, and I have an established search forward function based on the gtk_source_iter_forward_search function.
Thanks.
Always browse the source if you want to know these things. I found in this commit that GtkSourceIter was removed because the functionality was moved to GtkTextIter.

Add to language syntax in Netbeans/Eclipse

This may seem like seem like a bit of a weird/uncommon request but I am trying to find out if it is possible. I would like to add to the language syntax in Netbeans or Eclipse easily without needing to create an entirely new language. According to this question How to add more syntax elements for eclipse it is not possible in Eclipse, but that was asked in 2008 so maybe things have changed.
The reason I want to do it is I am developing in node.js and it uses callbacks quite heavily. So it would be nice if I could make the word 'callback' and 'callback()' be highlighted in a different colour so it can be easily seen in amongst the rest of the code.
Thanks for your help!
The css thing is really easy:
go to Options/Miscellaneous/Files, create new file extension less and then select proper MIME type text/x-css. I Believe that it is possible to extend syntax highlighting in NetBeans IDE but you have to write your own plugin to do that.