Program Highlightning .clp files? - jess

I am developing an expert system using Jess shell.
I would like a program so as to highlight with colors my code because I
want to paste it in a word document.
Is there extension in notepad++ ??
Or another program ?

I'm later, but maybe could be usefull
in vim just type :set filetype=jess
in Notepad++ I tried to make my own with this xml

Plugin for TextPad, JESS mode for GNU EMACS

There's a couple more listed here: the ones in #c69's answer, plus ones for jEdit and EditPlus.

There is also an Eclipse plugin that comes with Jess71p2 version. You just have to copy paste the content of the eclipse folder from that Jess version and restart eclipse. Any .clp files will be opened with the Jess Editor plugin. :)

Related

Notepad++ re indent code? [duplicate]

Is there a way to re-indent a block of code? I'm looking for something similar to Ctrl+Shift+F in Eclipse (Auto-Format/Indent).
To be clear,
I already know how to format XML outside of Notepad++ (Eclipse works fine, as mentioned) so I don't need a bunch of links to other XML-formatting tools.
I'm specifically working with XML and HTML.
Ideally, there's a keybinding as convenient as the one in Eclipse, so I don't have to break my workflow.
I already know about NppAutoIndent - it won't work, as I'm working with XML, HTML and CSS.
Since I upgraded to 6.3.2, I use XML Tools.
install XML Tools via the Plugin Admin (Plugins → Plugins Admin... Then search for "XML Tools", check its box and click the "Install" button).
use the shortcut Ctrl+Alt+Shift+B (or
menu → Plugins → XML Tools → Pretty Print)
In older versions:
menu → TextFX → HTML Tidy → Tidy: Reindent XML.
Install Tidy2 plugin. I have Notepad++ v6.2.2, and Tidy2 works fine so far.
For those who don't know, npp has a lot of support from plugins and other projects. You can download those plugins from SourceForge.
You need XML Tools to format your text in n++
After you have downloaded XML Tools ..
Exit Notepad++
Go To C:\Program File\Notepad++ .... Your N++ installed folder.
Place below files from xml tools which you downloaded in the npp root folder by copy replace
Go To ..\Plugins subfolder and place below downloaded file
Restart and enjoy!!!
Ctrl + Alt + Shft + B to format.
It's been the third time that I install Windows and npp and after some time I realize the tidy function no longer work. So I google for a solution, come to this thread, then with the help of few more so threads I finally fix it. I'll put a summary of all my actions once and for all.
Install TextFX plugin: Plugins -> Plugin Manager -> Show Plugin Manager. Select TextFX Characters and install. After a restart of npp, the menu 'TextFX' should be visible. (credits: #remipod).
Install libtidy.dll by pasting the Config folder from an old npp package: Follow instructions in this answer.
After having a Config folder in your latest npp installation destination (typically C:\Program Files (x86)\Notepad++\plugins), npp needs write access to that folder. Right click Config folder -> Properties -> Security tab -> select Users, click Edit -> check Full control to allow read/write access. Note that you need administrator privileges to do that.
Restart npp and verify TextFX -> TextFX HTML Tidy -> Tidy: Reindent XML works.
Not exactly a solution but a workaround.
Notepad ++ doesn't provide any such feature by default. But you can use some online tools to autoformat text like https://www.freeformatter.com/xml-formatter.html.
I had to update the proxy settings under Plugins -> Plugin Manager -> Show Plugin Manager -> Settings to see any PlugIns in the "Available" list.
After that, installing "XML Tools" was easy and did the requested job as described above.
Just install the latest notepad++ and install indent By fold. On the menu bar select Plugins -> Plugins Admin and selct indent By fold and the install. Works finest
To directly answer the OP, take a look at this guy's site: Thomas Hunter Notepad++ Tidy for XML. Simple steps to follow and you get very nice formatting of your XML right inside NPP. So far the only anomaly I've found is with nested self closing elements EG:
<OuterTag>Text for outer element<SelfClosingTag/></OuterTag>
Will be tidied up to:
<OuterTag>Text for outer element
<SelfClosingTag/></OuterTag>
There may be a way to fix this, but for the time being, it's managed to reduce the number of lines in my document by 300k and this particular anomaly can be worked around.
I'm using Notepad 7.6 with "Plugin Admin" and I could not find XML Tools.
I had to install it manually like #some-java-guy did in his answer except that my plugins folder was located here: C:\Users\<my username>\AppData\Local\Notepad++\plugins
In that directory I created a new directory (named XmlTools) and copied XMLTools.dll there. (And I copied all dependencies to the Notepad++ directory in Program files.)

Sublime Text 2 - writing a script to process multimarkdown

There is an excellent package to preview markdown written using sublime text. I wanted to know how I might modify it, or perhaps use it as the basis for writing one that could process multi-markdown.
I'm using Linux (Ubuntu) and I'm currently calling multimarkdown in the terminal on each file.
One of the issues I think I might face is that multimarkdown refuses to parse an open file for some reason.
Any thoughts on how I might begin this or if an alternative solution exists would be very gratefully received.
There is a MultiMarkdown option in the syntax list - View > Syntax > Markdown > MultiMarkdown. Isn't that working? By the way the syntax (and almost any other) files are in packages folder of Sublime Text 2. This is the syntax file:
/Users/[username]/Library/Application Support/Sublime Text 2/Packages/Markdown/Markdown.tmLanguage
And MultiMarkdown file is in the same directory.
I'm intrigued by your statement that "multimarkdown refuses to parse an open file". Can you provide more information, or email me, or open an issue on github? MultiMarkdown doesn't check to see whether a file is open or not --- it simply reads the file and processes it. So if there's a problem, then the OS is not allowing MMD to proceed for some reason...
I don't have Sublime Text installed on Ubuntu (I generally use a command line only version of Ubuntu for testing MMD), so I can't test this situation exactly. I haven't had any other reports of difficulties parsing files (open or not). I don't have any trouble with Sublime Text 2 on Mac OS X and MMD.
As an alternative, you could try using one of the support scripts (e.g. mmd if you want MMD->HTML) and see if that has the same problem with open files.
PS> Are you using the latest build of MultiMarkdown, e.g. 4.2+?? (Though it shouldn't change anything related to open files)

Is it possible to get code-hinting in JetBrains WebStorm for a non-core node package?

Is it possible to get code-hinting in JetBrains WebStorm for a non-core node package? Specifically, I'd like to get hinting/completion working for buster. I can't seem to find any information on this. Thanks much!
For buster.js, download buster-test.js and save it somewhere the WebStorm/PyCharm project can see it. Hinting should show up immediately.
WebStorm 2020.1
There's a trick to getting "coding assistance" for 3rd party packages that support community stubs (AKA Typescript definition files):
Open the project's package.json
Position the cursor on the package (within the dependencies section)
Press alt+enter (or click the light bulb)
Choose Install '#types/name' (where name is the dependency)
For example:

How To Auto-Format / Indent XML/HTML in Notepad++

Is there a way to re-indent a block of code? I'm looking for something similar to Ctrl+Shift+F in Eclipse (Auto-Format/Indent).
To be clear,
I already know how to format XML outside of Notepad++ (Eclipse works fine, as mentioned) so I don't need a bunch of links to other XML-formatting tools.
I'm specifically working with XML and HTML.
Ideally, there's a keybinding as convenient as the one in Eclipse, so I don't have to break my workflow.
I already know about NppAutoIndent - it won't work, as I'm working with XML, HTML and CSS.
Since I upgraded to 6.3.2, I use XML Tools.
install XML Tools via the Plugin Admin (Plugins → Plugins Admin... Then search for "XML Tools", check its box and click the "Install" button).
use the shortcut Ctrl+Alt+Shift+B (or
menu → Plugins → XML Tools → Pretty Print)
In older versions:
menu → TextFX → HTML Tidy → Tidy: Reindent XML.
Install Tidy2 plugin. I have Notepad++ v6.2.2, and Tidy2 works fine so far.
For those who don't know, npp has a lot of support from plugins and other projects. You can download those plugins from SourceForge.
You need XML Tools to format your text in n++
After you have downloaded XML Tools ..
Exit Notepad++
Go To C:\Program File\Notepad++ .... Your N++ installed folder.
Place below files from xml tools which you downloaded in the npp root folder by copy replace
Go To ..\Plugins subfolder and place below downloaded file
Restart and enjoy!!!
Ctrl + Alt + Shft + B to format.
It's been the third time that I install Windows and npp and after some time I realize the tidy function no longer work. So I google for a solution, come to this thread, then with the help of few more so threads I finally fix it. I'll put a summary of all my actions once and for all.
Install TextFX plugin: Plugins -> Plugin Manager -> Show Plugin Manager. Select TextFX Characters and install. After a restart of npp, the menu 'TextFX' should be visible. (credits: #remipod).
Install libtidy.dll by pasting the Config folder from an old npp package: Follow instructions in this answer.
After having a Config folder in your latest npp installation destination (typically C:\Program Files (x86)\Notepad++\plugins), npp needs write access to that folder. Right click Config folder -> Properties -> Security tab -> select Users, click Edit -> check Full control to allow read/write access. Note that you need administrator privileges to do that.
Restart npp and verify TextFX -> TextFX HTML Tidy -> Tidy: Reindent XML works.
Not exactly a solution but a workaround.
Notepad ++ doesn't provide any such feature by default. But you can use some online tools to autoformat text like https://www.freeformatter.com/xml-formatter.html.
I had to update the proxy settings under Plugins -> Plugin Manager -> Show Plugin Manager -> Settings to see any PlugIns in the "Available" list.
After that, installing "XML Tools" was easy and did the requested job as described above.
Just install the latest notepad++ and install indent By fold. On the menu bar select Plugins -> Plugins Admin and selct indent By fold and the install. Works finest
To directly answer the OP, take a look at this guy's site: Thomas Hunter Notepad++ Tidy for XML. Simple steps to follow and you get very nice formatting of your XML right inside NPP. So far the only anomaly I've found is with nested self closing elements EG:
<OuterTag>Text for outer element<SelfClosingTag/></OuterTag>
Will be tidied up to:
<OuterTag>Text for outer element
<SelfClosingTag/></OuterTag>
There may be a way to fix this, but for the time being, it's managed to reduce the number of lines in my document by 300k and this particular anomaly can be worked around.
I'm using Notepad 7.6 with "Plugin Admin" and I could not find XML Tools.
I had to install it manually like #some-java-guy did in his answer except that my plugins folder was located here: C:\Users\<my username>\AppData\Local\Notepad++\plugins
In that directory I created a new directory (named XmlTools) and copied XMLTools.dll there. (And I copied all dependencies to the Notepad++ directory in Program files.)

Syntax highlighting when pasting into emails

Im in the situation that I often send small codesnippets and xml-snippets to coworkers and partners via my outlook.
Has anyone got a good idea or tool that I can use to have my pastes syntaxhighlighted before I paste them into an email.
I was thinking of an intermediate paste to "$fancytool" and then I would have something to copy that will htmlified so I can copy paste it into the "compose email" window.
Edit-More-info:
Im pasting from windows within a VMWare virtual Machine, it might be eclipse, xmlspy, logfiles and other programs
Even-more-info:
I've seen this link how to do it from Vim. Unfortunately it seldom from vim im copying Code, and my email machine hasnt got any vim. The vmware machines has gvim, but I was hoping for an easier way that pasting to vim, saving to file, opening in internetexplorer and then copy/paste
Late but I can give an answer that works.
You need 2 things
putty
access to some Unix server (With vim)
In putty options, Under window → selection , turn the check box on for
Paste in to clipboard in RTF as well as plain text.
Log on to the server using putty.
start vim by typing vim
Paste your text (for example XML ) in to vim.
enter command mode (of vim by pressing ESC) and type
:set syn=xml.
Syntax highlighting kicks in.
Copy the text using mouse and paste it into your email.
5 years too late, sorry, but I've a much simpler solution than the accepted answer.
Use this online tool: http://tohtml.com/
copy the preview from your browser window and just paste into Word or Outlook.
Vim (or GVim) will output your code as formatted HTML. Then as long as your email is using an HTML format you can copy and paste it in.
Just an update on this matter, if you're on Windows, you can install Notepad++ (which is one of the best windows editors anyway), it comes out of the box with a plugin for this: "Copy text with Syntax Highlighting", when you select some text and right click on it.
If you just want the Add-In here it is.
If you want to know how it is done, here is an article on how to write the Add-In.
Comment: svrist mentioned a code paste site with syntax highlighting. Try http://codepad.org/
(don't have enough mojo to comment yet)
This link led me to SciTE.
Looks like SciTE has a Copy to RTF feature:
Edit(vmware upgrade):
But it looks like I am pretty much lost when I use vmware because I cant transfer rtf clipboard items to the vmware host. And I cant install software on the vmware host.
Maybe a paste-site with syntax highlighting?
If you're on Windows, Visual Studio does this automatically. At least it does for me, using Visual Studio 2005 on XP and copy/pasting to both MS Word and Lotus Notes
HeidiSQL does this for sql queries, and the syntax highlighting choices they made are quite readable. However, this will only work for sql queries, not other code. I like Notepad++ for Windows-based systems, and here are some instructions for Notepad++. Several people mentioned VIM for unix/shell environment.
For gVim (Windows), I defined this function and a convenience mapping:
function! HlCopy() range
exec a:firstline.','.a:lastline.'TOhtml'
normal yG
q!
!start /min powershell "Get-Clipboard | Set-Clipboard -AsHtml"
redraw
endfun
vmap Y :call HlCopy()<CR>
How to use?
Enter visual mode with v or by selecting text with left mouse. Then copy the current selection as raw text with y or highlighted text with Y.
Pass range directly (without visual mode): :1,3call HlCopy().
If you are lazy like me, you can set additional options for TOhtml in that function. I have this in my vimrc:
function! HlCopy() range
let g:html_font = "Consolas"
let g:html_number_lines = 0
exec a:firstline.','.a:lastline.'TOhtml'
normal yG
q!
!start /min powershell "Get-Clipboard | Set-Clipboard -AsHtml"
redraw
endfun
vmap Y :call HlCopy()<CR>