notepad++ pro*c color highlighting
-
When I use the sftp plugin to open
pro*c
files from a server the color highlighting works for
pro*c
files. When I open pro*c files that are saved on my computer the color highlighting does not work. Any idea why that is? How do I fix that?
Sorry about using code tags the pro*c part kept getting messed up without them in the first sentence.
-
I assume you are using a UDL to highlight the PRO*C files. If this PRO*C UDL is to be believed, the general extension for those files is
.pc
. If I open ablah.pc
file on my computer, and throw in some random keywords from that UDL definition, I get syntax highlighting.- Is that the UDL definition you are using? Or do you have one from elsewhere?
- When you use the “SFTP plugin” (I assume you mean NppFTP plugin using SFTP protocol – if not, please correct me), I am guessing the server files have an extension of
.pc
- When you open the local files, do they have the
.pc
extension? - What does the status bar show, if it’s wide enough to show the file-type in the lower-left: mine shows
User Defined language file - PRO*C
, as shown in my screenshot - If you manually select Language > PRO*C, does the highlighting start for you? And does the status bar update correctly?
- addenda: Is your local file above 200MB while the remote SFTP file is less? If so, Notepad++ stops syntax highlighting at ~200MB because of performance issues on large files.
- If the above 6 don’t help, please share Notepad++'s ?-menu’s Debug Info with us (you can copy from that dialog and paste into your reply)
addenda: Notepad++ doesn’t know the difference between a file opened from your computer and one opened through the NppFTP plugin, because the NppFTP plugin downloads a copy of the remote file to a location on your local computer, and tells Notepad++ to edit it from there.
Sorry about using code tags the pro*c
Not a problem. That’s why the
</>
button is there, to make sure the forum doesn’t interpret actual text as markdown formatting. You can also use a \ before the * to get a literal asterisk: typingpro\*c
renders pro*c in the forum. -
- I am not using that. Should I be using that? If so how would I set that that up?
- Yes you are correct I am using the NppFTP plugin. We actually use the file extension of
.sc
-
The local files use the extension
.sc
. -
On the local files it shows text file which I do not understand. On the non local files it shows c source file which at least makes sense. The only difference between c files and
pro*c
files is the oracle plugins for sql. -
I have not added
pro*c
to my language list so it is not there. The file on the remote server automatically selects c source file in the language list. Why is the local file not doing the same? -
The file is less than 1 mb.
-
Not sure how to share the debug info. My work blocks gmail accounts. I did not see a way to create an account without using gmail or facebook.
-
- You don’t have to be using that UDL. Are you using any UDL, or are you just highlighting PRO*C as if it’s normal C? Or something else? That is, what language does Notepad++ think the PRO*C file from the SFTP are?
- thanks
- okay, so you have the same extension on both, so Notepad++ treats both the same
- “shows text file which I do not understand”. Are you sure you’re really looking at a PRO*C
.sc
source file?- if the first couple characters of the file are PK, then it’s probably a zipped file
- if there are lots of NUL or SOT or similar text in black boxes, it’s a binary format rather than the underlying text of the
.sc
source file.
- okay
- So that’s not it
- You click on the “copy debug info to clipboard link”, which puts all the text from the dialog into the clipboard, and paste it here.
My work blocks gmail accounts. I did not see a way to create an account without using gmail or facebook
Oh, so does this mean that you are doing your posting from a home account, so you don’t have access to the information from the work-computer’s Debug Info? That’s annoying. [edit: to clarify, it’s not annoying that you are doing your best in a difficult situation; it’s annoying that you were put in the difficult situation to begin with.]
If so, can you email the Debug Info from work to home, and then post it in your reply?
Also, if possible (ie, if there isn’t any proprietary information), could you do Ctrl+PrintScreen shots of both a remote file being highlighted (like in my earlier screenshot) and of a local file that isn’t highlighted? Make sure the screenshots include the status bar section, which tells which Language is selected for each file. (If you have to, paste the images into the email home, and then paste the images from home into your reply here). If there is proprietary info, can you just add a screen-full of dummy code at the beginning, showing the highlighting is working or a screenshot showing the “text file which I do not understand” from the local file.
-
- I do not have any UDL. It is somehow highlighting the
PRO*C
as if it is C file by default when it comes from a remote server but not local files. - Your welcome.
- Its treating them different based on whether it is a local file or remote file.
- Yes I am positive. I compiled the file on my server then ran the file. It is not a zipped file or binary file. I do all my editing in notepad ++. Using old school vi is very difficult to use.
- Yes I am using my home computer to respond.
- I do not have any UDL. It is somehow highlighting the
-
Yes I am positive. I compiled the file on my server then ran the file.
That really doesn’t answer the question from my perspective, because I thought it was the file on your local machine that was having problems with and doubting the integrity of, since that’s the one that’s not properly syntax highlighting. You gave a cryptic “On the local files it shows text file which I do not understand”, which implied to me that what you were seeing on the local computer (not on the server) was not PRO*C code like you were expecting. But now you are saying you compiled it on the server. So I am not understanding the circumstances you are trying to describe. How is it “text file which I do not understand” but at the same time valis
PRO*C
code???Its treating them different based on whether it is a local file or remote file
As I said, Notepad++ cannot see the difference, because NppFTP puts the file locally on your computer, and Notepad++ opens both files from your computer – the one we are calling remote, from NppFTP, and the one that I am calling “local”, from your computer. If they have the same extension, Notepad++ should be treating them the same (unless one of them happens to have the first line start with
<?
or#/usr/bin/bash
or similarly recognized first-line phrases, which can cause Notepad++ to ignore the extension)I am using my home computer to respond.
Then you will need to gather all the requested information, then come back when you are able to post that. Without showing us the difference between what Notepad++ interprets and shows on remote files and what Notepad++ interprets and shows on local files, you are asking the impossible of us (we cannot see through your eyes or read your memory; we have no idea what you’ve seen; your description of the problem symptoms doesn’t match our experience with how Notepad++ behaves).
Other things to look at: show a screenshot Style Configurator > C dialog, so we can see what the Default and User extensions are for your setup. And, if on the version with syntax highlighting, or the version without, Notepad++ shows a language other than
C Source File
in the status bar, then you will need to show the Style Configurator screenshot for whatever language that says as well.BTW:
.sc
by default is not a known extension in Notepad++, so someone (you or an IT person) must have added it into the User or possibly Default extension list for whatever language it is getting lexed as, to get even the remote version to syntax highlight. (The pre-defined extensions for C and C++ are.c .lex
for C and.cpp .cxx .cc .h .hh .hpp .hxx .ino
for C++.)