Send Notepad-plus-plus mailing list submissions to notepad-plus-plus@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/notepad-plus-plus or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Notepad-plus-plus digest..." Today's Topics: 1. [notepad-plus - Open Discussion] Bug(?):Find in Files (UTF-8) (SourceForge.net) 2. [notepad-plus - Plugin Development] Two styles for one language! Easy switching on per file basis! Woohoo! (Thell Fowler) 3. [notepad-plus - Help] Notepad can't read a unicode file (SourceForge.net) 4. [notepad-plus - Open Discussion] RE: Improvement/Support of Big File Handling (SourceForge.net) 5. [notepad-plus - Open Discussion] Adding set of keywords to syntax highlighter (SourceForge.net) 6. [notepad-plus - Translation] RE: Updated Notepad++ v5 translation model (SourceForge.net) 7. [notepad-plus - Open Discussion] RE: Improvement/Support of Big File Handling (SourceForge.net) 8. [notepad-plus - Open Discussion] RE: Improvement/Support of Big File Handling (SourceForge.net) ---------------------------------------------------------------------- Message: 1 Date: Sat, 12 Jul 2008 16:06:49 +0000 From: "SourceForge.net" <[EMAIL PROTECTED]> Subject: [Notepad-plus-plus] [notepad-plus - Open Discussion] Bug(?):Find in Files (UTF-8) To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="UTF-8" Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5091426 By: nobody Hi i'm using N++ 5.0 official under XP+SP2 Find in files does not workabout the file of "UTF-8" i see this. Is it a bug? Regards ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=331753 ------------------------------ Message: 2 Date: Sat, 12 Jul 2008 21:18:03 +0000 (UTC) From: Thell Fowler <[EMAIL PROTECTED]> Subject: [Notepad-plus-plus] [notepad-plus - Plugin Development] Two styles for one language! Easy switching on per file basis! Woohoo! To: notepad-plus-plus@lists.sourceforge.net Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=iso-8859-1; format=flowed Want to have both a light and dark theme for the languages you use often? Me too! Perhaps you went so far as to have two styles.xml files, or created a user defined language (which may have negated some of your folding). Well, thanks to the external lexer you can make a copy of a languages lexing and folding capabilities fairly easily. So thank you to the Notepad++, Scintilla, and MyLexerTemplate creators for sharing! Unfortunately, there didn't seem to be a simple how-to example anywhere; at least I couldn't find one. So after lots of reading and rummaging around in files it slowly dawned on me that it was easier than I was making it; and it is more than likely even easier than this, but for others out there who may work in multiple lighting conditions and want multiple styles and can't find a how-to... Duplicating the C++ lexer... Grab the source files: - Latest Notepadd ++ source from the NPP downloads page (I used npp.5.0.src) - MyLexerTemplate.zip source ( I used the link in this post: https://sourceforge.net/forum/message.php?msg_id=4899940 ) - Have a way to build them! VS2008 was used in this example Extract the NPP source, then extract the MyLexerTemplate source and place the MyLexerTemplate folder containing the source files within the cpp.5.0.src folder so it is at the same level as the PowerEditor and scintilla. (allow conversions if needed) Open the notepadPlus.vc.7.0.vcproj Add the SciLexer.vcproj to this project Add the MyLexerTemplate.vcproj to this project Build the notepadPlus.vc.7 project Build the SciLexer project In the MyLexerTemplate Property page for 'Linker' change the output file name. (ExternalLexerCPP2.dll) Open the MyLexerTemplate.def and change the LIBRARY name. ("ExternalLexerCPP2") Open the MyLexerTemplate.cpp ( we have some editing to do... we're going to duplicate the internal C++ lexer) Add a header file for the MyLexerTemplate project (MyLexerTemplate.h - you don't have to, but I like it that way) In MyLexerTemplate.cpp cut from below the GPL notice to (and including) the aboutDlg() Wrap the pasted code with: #ifndef MYLEXERTEMPLATE_H #define MYLEXERTEMPLATE_H <... Pated Code...> #endif In MyLexerTemplate.cpp: Add #include "MyLexerTemplate.h" below the GPL notice Edit PLUGIN_NAME, LEXER_NAME, and LEXER_DESC ("External Lexer C++", "C++ (2)", "C++ Source File)" Edit the MessageBox text for aboutDlg() (Mine looks like the line below) "External Lexer Template\nversion 1.0\nCopyright (C)2008 Kyle Fleming ( [EMAIL PROTECTED] )\n\nDuplicate of the internal C++ lexer.\nCopyright 1998-2005 by Neil Hodgson <[EMAIL PROTECTED]>\n\nCombined to enable multiple styles for one language!\n2008\nAuthor: Thell Fowler ( [EMAIL PROTECTED] )" Add a line to indicate where the default template ended and where you're pasting will begin similar to: #ifdef LexCPP_Code_Below // The below code block was duplicated from LexCPP.cxx // Copyright 1998-2005 by Neil Hodgson <[EMAIL PROTECTED]> // The License.txt file describes the conditions under which this software may be distributed. #endif Find and open the Scintilla Lexer source file for the desired language (LexCPP.cxx) Copy everything below the SCI_NAMESPACE block and paste it at the bottom of the MyLexerTemplate.cpp -If you see LexerModule declarations at the bottom of the file comment them out. Determine the Scintilla Lexer style codes being used by looking for SCE_* entries in the pasted code (SCE_C_*) Open SciLexer.h and copy all of the SCE* entries for the desired language (SCE_C_*) In the MyLexerTemplate.h under #define WIN32_LEAN_AND_MEAN add // C++ Style Types Paste the entries into the header file under that line Since the pasted code implements the highlighting and folding we need to change the existing MyLexerTemplate code in a few places. (Minimize all folds to make for less scrolling) Note the Colorourise routine you pasted and change the 'ColouriseMyDoc' declaration under the aboutDlg() to match it. (ColouriseMyDoc changed to ColouriseCppDoc) Do the same thing for the FoldMyDoc declaration (FoldMyDoc changed to FoldCppDoc) In the definition code for InternalLexorFold find the // call our "internal" folder/lexer comment. Change the if/else statement to call the newly declared names. (changed 'My' to 'Cpp' for both Fold and Colourise Comment out the ColouriseMyDoc and FoldMyDoc definition code blocks. (Delete them if you want.) Our code is now setup, but we still need to add some includes needed by the C++ lexer. We find out which ones by troubleshooting till it works! It isn't too bad though! Try a build of MyLexerTemplate right now and receive errors for 'CharacterSet' being undeclared. Resolve this by looking in the LexCPP.cxx includes to see if something declares CharacterSet. (CharacterSet.h) Copy the include statement. In the MyLexerTemplate.h file add the following between the #include "WindowAccessor.h" and void aboutDlg(); statements: // LexCpp specific includes #include "CharacterSet.h" Try a build of MyLexerTemplate again and we receive an error about ColouriseCppDoc declared but not defined. This means something is different between what was pasted in and what was declared to be there. Look at the declaration and look at the definition. See the 'bool caseSensitive' parameter in the definition? Add it to the declaration. Try to build again and an error that ColouriseCppDoc function doesn't take 5 arguments. We fix that by going back into the InternalLexOrFold code we changed in the if/else statement and add our caseSensitive flag. (I added false to mine) Build again and we are good to go! Almost done! Now we need to edit the style.xml file for the copied language. Open the MyLexerTemplate.xml in from the MyLexerTemplate\bin\config folder Open the langs.xml file in your notepad++ folder and find the desired language definition (name="cpp") Copy from the the whole <Language> section and replace the MyLexerTemplate.xml language section with it. Do the same thing for the LexerType section using your stylers.xml file as the source. Edit both the Language and LexerType name to match the name entered for 'LEXER_NAME' in MyLexerTemplate.cpp ("C++ (2)") Edit the LexerType desc value ("C++ (2)") Save the file as 'ExternalLexerCPP2.xml' Copy the dll to the plugins folder (your application data plugins folder will work) Copy the xml to notepad++\plugins\config\ (don't know why yet, but the application data folder doesn't work here, but changes to styles) Open Notepad++ and set your alternate style to your liking! Share and enjoy! That's all. Thell PS - If you know how to set the read location for the xml please share. ------------------------------ Message: 3 Date: Sat, 12 Jul 2008 18:13:56 +0000 From: "SourceForge.net" <[EMAIL PROTECTED]> Subject: [Notepad-plus-plus] [notepad-plus - Help] Notepad can't read a unicode file To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="UTF-8" Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5091587 By: davemidgley The particular file in question is the Summary.txt file created when I update SQL-Server 2005 (has anyone else had trouble with kb948109?). It just puzzled me that N++ couldn't read this particular file while Notepad and TextPad have no problem. It appears to be a Unicode file, but I don't know which particular encoding. N++ is usually so good, I was surprised that it fell at this hurdle. Can anyone shed any light? ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=331754 ------------------------------ Message: 4 Date: Sat, 12 Jul 2008 18:18:25 +0000 From: "SourceForge.net" <[EMAIL PROTECTED]> Subject: [Notepad-plus-plus] [notepad-plus - Open Discussion] RE: Improvement/Support of Big File Handling To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="UTF-8" Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5091591 By: clrs530 Thanks but this is an answer that brings no advantage to anyone. < Perhaps the proper answer is "Don't use NP++ for really big files?" < [...] < NP++ is wonderful, but I don't believe there is a "one size fits all" editor That might be often right but its also an easy excuse. For me notepad++ fits for almost everything. I use Visual Studio on windows and Eclipse on Linux for developing c/c++ but for everything else also viewing source files I use Notepad++. I use hexworkshop for interpret files thats right. But also this has a limitation where I like the plugin for Notepad++ very much (thanks Jens :) ). I would be willing to work with others on changing the file management. First good improvements were made on v5 but I hope more is possible. Im not so fast in understanding source code written by others and also I dont want to waste time in searching if the things I want to do are possible if there are others that know this project much better (Don, Jens, Harry...) ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=331753 ------------------------------ Message: 5 Date: Sat, 12 Jul 2008 20:46:42 +0000 From: "SourceForge.net" <[EMAIL PROTECTED]> Subject: [Notepad-plus-plus] [notepad-plus - Open Discussion] Adding set of keywords to syntax highlighter To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="UTF-8" Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5091797 By: nobody I am very impressed with Notepad++ so I'm switching from UltraEdit which I've been using for years, keep it up! Anyway, I primarily write PHP and Javascript. In UltraEdit the syntax highlighter will do common function/variable/property names in a different color. Javascript Example: var test = new Array(); test.push('foo'); In the above example, I would like: var to be blue - operator new to be green - alternate operator Array to be red - object push to be orange - function I have the lists of words I want, but I can't get the syntax highlighter to do them.. I've spent hours modifying stylers.xml and langs.xml to no avail. Can anyone help me get this working? I'd like to do similar for PHP (e.g. str_replace in orange). stylers.xml: <LexerType name="javascript" desc="Javascript" ext=""> <WordsStyle name="DEFAULT" styleID="41" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> <WordsStyle name="NUMBER" styleID="45" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> <WordsStyle name="WORD" styleID="46" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> <WordsStyle name="KEYWORD" styleID="47" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="instre1" /> <WordsStyle name="OPERATOR KEYWORD" styleID="53" fgColor="008040" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="instre2" /> <WordsStyle name="TYPE WORD" styleID="16" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="type1" /> <WordsStyle name="FUNCTION NAME" styleID="54" fgColor="FF8040" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="type2" /> <WordsStyle name="DOUBLESTRING" styleID="48" fgColor="646464" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> <WordsStyle name="SINGLESTRING" styleID="49" fgColor="646464" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> <WordsStyle name="SYMBOLS" styleID="50" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" /> <WordsStyle name="STRINGEOL" styleID="51" fgColor="646464" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" /> <WordsStyle name="REGEX" styleID="52" fgColor="910000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> <WordsStyle name="COMMENT" styleID="42" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> <WordsStyle name="COMMENTLINE" styleID="43" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> <WordsStyle name="COMMENTDOC" styleID="44" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> </LexerType> langs.xml: <Language name="javascript" ext="js" commentLine="//" commentStart="/*" commentEnd="*/"> <Keywords name="instre1">var ...</Keywords> <Keywords name="instre2">new ...</Keywords> <Keywords name="type1">Array ...</Keywords> <Keywords name="type2">push ...</Keywords>--> </Language> I don't understand why this won't work, but that's probably because I don't know how the highlighter works... Thanks! Colin ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=331753 ------------------------------ Message: 6 Date: Sat, 12 Jul 2008 21:31:18 +0000 From: "SourceForge.net" <[EMAIL PROTECTED]> Subject: [Notepad-plus-plus] [notepad-plus - Translation] RE: Updated Notepad++ v5 translation model To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="UTF-8" Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5091862 By: hp38guser I would prefer it if you posted this before any release, so updated translations can be included with the setup. I also would like an option to switch language from within the program. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=558104 ------------------------------ Message: 7 Date: Sat, 12 Jul 2008 22:41:41 +0000 From: "SourceForge.net" <[EMAIL PROTECTED]> Subject: [Notepad-plus-plus] [notepad-plus - Open Discussion] RE: Improvement/Support of Big File Handling To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="UTF-8" Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5091935 By: donho > we had much blaming about notepad++ isnt able to show and open files with xx mb. > My tests show its critical from ~60mb up. > Don didnt write much to this issue which could have the reason > that the kind of these messages was only blaming without helping anyone. Well, here's the official answer for your question : we don't really know up to how many MB notepad++ is able to open a file - it depends on the amount of available memory in your system. The current implementation to open a file is loading whole file into Notepad++ - which makes sure the syntax highlighting won't be interrupted. Handling a important size of file needs a more sophisticated method to synchronize view and loading of a part of file. It means also that some existing features will be sacrificed, for example syntax highlighting. This issue is taken into account in the Notepad++ future evolution - if we have enough time and if there's no technical impact. Don ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=331753 ------------------------------ Message: 8 Date: Sat, 12 Jul 2008 23:12:09 +0000 From: "SourceForge.net" <[EMAIL PROTECTED]> Subject: [Notepad-plus-plus] [notepad-plus - Open Discussion] RE: Improvement/Support of Big File Handling To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="UTF-8" Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5091960 By: clrs530 Your answer didnt really go into the direction I want but thank you anyway. > Well, here's the official answer for your question : we don't really know up to how many MB notepad++ is able > to open a file - it depends on the amount of available memory in your system. Sure. But it is more a restriction of the OS then of the memory because 4gb in my case is more then enough. > The current implementation to open a file is loading whole file into Notepad++ - which makes sure the syntax > highlighting won't be interrupted. > > Handling a important size of file needs a more sophisticated method to > synchronize view and loading of a part > of file. > It means also that some existing features will be sacrificed, for example syntax highlightin I hoped for a more technical discussion. If I think more about syntax highlighting I could think of problems you direct to. They should be handlable (but I know too less about the way scintilla does this). Wont it possible until the point this change will find a way into the code to produce an error message instead a bad crash? ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=331753 ------------------------------ ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ------------------------------ _______________________________________________ Notepad-plus-plus mailing list Notepad-plus-plus@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/notepad-plus-plus End of Notepad-plus-plus Digest, Vol 26, Issue 33 *************************************************