From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35946 Path: news.gmane.org!not-for-mail From: "Idris Samawi Hamid" Newsgroups: gmane.comp.tex.context Subject: ConTeXt Support Package for Notepad++. Date: Sun, 12 Aug 2007 23:01:37 -0600 Organization: Colorado State University Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1186981324 11926 80.91.229.12 (13 Aug 2007 05:02:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Aug 2007 05:02:04 +0000 (UTC) Cc: Instanton , Vitaliy Dovgan , Hector Palacios , yatskovsky@gmail.com, Zhichu Chen To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 13 07:01:59 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IKS3z-0001lH-FP for gctc-ntg-context-518@m.gmane.org; Mon, 13 Aug 2007 07:01:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2A0F22011A; Mon, 13 Aug 2007 07:01:58 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00315-02-10; Mon, 13 Aug 2007 07:01:47 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C7FEC200BE; Mon, 13 Aug 2007 07:01:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A75AF200BE for ; Mon, 13 Aug 2007 07:01:44 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00315-02-9 for ; Mon, 13 Aug 2007 07:01:41 +0200 (CEST) Original-Received: from trueband.net (director.trueband.net [216.163.120.8]) by ronja.ntg.nl (Postfix) with SMTP id 7750E200AF for ; Mon, 13 Aug 2007 07:01:41 +0200 (CEST) Original-Received: (qmail 32546 invoked by uid 1006); 13 Aug 2007 05:01:35 -0000 Original-Received: from ishamid@colostate.edu by rs0 by uid 1003 with qmail-scanner-1.16 (spamassassin: 3.1.4. Clear:SA:0(0.1/100.0):. Processed in 1.020331 secs); 13 Aug 2007 05:01:35 -0000 Original-Received: from unknown (HELO trueband.net) (172.16.0.16) by -v with SMTP; 13 Aug 2007 05:01:34 -0000 Original-Received: (qmail 17168 invoked from network); 13 Aug 2007 05:01:32 -0000 Original-Received: from unknown (HELO your-b27fb1c401) (75.104.82.83) by -v with SMTP; 13 Aug 2007 05:01:32 -0000 User-Agent: Opera Mail/9.20 (Win32) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:35946 Archived-At: Dear fellow gangsters, At long last, I have completed a ConTeXt setup package for Notepad++. See http://wiki.contextgarden.net/images/8/87/Npp_ConTeXt.zip Some background: I come from the WinEdt world originally. However WinEdt, while a fantastic TeX editor (perhaps the best), has a couple of problems: a) Geared towards LaTeX; b) No utf-8 support present or immediately planned (at least when I was using it); c) No Right-to-left support present or immediately planned (at least when I was using it); a) is not really a problem; one could easily configure WinEdt to be ConTeXt editor, but b) and c) were showstoppers. Scite is nice, but seems to me to be a real regression when compared to WinEdt's features. Finally I came across Notepad++, hereafter called Npp (actually it was Hans who told me about it first). This is one amazing text editor. Like Scite, it is based on Scintilla. It is a programmer's editor, but for a non-programmer user like myself it is amazingly easy to configure. Like scite, it has utf-8 support. It also has global utf-8 support (as opposed to local utf-8 support which scintilla does not support). Npp is just loaded with features. It supports plugins, and some of the available plugins are now indispensable to me. For more information about Npp go to http://notepad-plus.sourceforge.net/uk/site.htm ================================== For ConTeXt, I have implemented 1) Syntax highlighting. There are six kinds: a) \start-stops b) TeX primitives c) setups d) comments e) sectioning f) general ConTeXt commands g) operator arguments h) numbers 2) Folding a) Since discovering folding, my efficiency in writing long documents has really increased. All \start-stops are foldable, and you can easily add your own in the User-Defined-Language dialog; just select "ConTeXt" and you can edit all entries. Fellow gangster Wolfgang Schuster has provided a small module, t-startstops, which converts section headings like \chapter into \startchapter-\stopchapter, etc. You can add more. Look at the files t-startstop.tex and startstop.tex. NOTE: Hans will eventually implement official support for startstops, and the syntax will in all likelihood be different than the one used here (\startpart[title=,ref=]). 3) Auto completion. There is a notepad++ api file context.api, which has a list of perhaps all english ConTeXt commands. From the scite properties files you can find more keyword for your your own language and roll your own version. The nice thing is that Npp has a sorting utility so you can easily add your keywords and alphabetically sort them into your own api list. 4) ConTeXt utilities. a) The Run menu mimics the one in Hans's distribution of Scite, and mostly uses the same shortcuts. You can add more by pressing F5 and saving your command, which will allow you to define a shortcut. I deleted a few utilities that come with the default Npp setup but which did not seem relevant to context. If you want them back just look at the original shortcuts.xml file and copy the ones you want. A few nice tricks are there. For example, \input file.tex After selecting "file.tex" you can run "open file" and Npp will open file.tex for you. From selected text, you can also do a Google search , wiki search. Perhaps we could add a ConTeXt wiki search.... next version perhaps. b) Npp comes with a Console plugin, NppExec, which allows you to run scripts. Most of the Run commands have been implemented as scripts in NppExec. Here you can play around with the commands, test different options etc. 5. Integrated Explorer plugin. This is one of favorite tools. I have just added some tex-related filters Both NppExec and the Explorer are dockable. They can also be docked into one another outside of the main editor, separately outside, or separately inside. You'll have lots of fun with these two. 6. Color. I have implemented a color theme that is easier on the eyes than the default pure white background. It makes use of four shades of DADADA. For non-TeX languages you may need to tweak the settings a bit in Settings > Styler Configurator. 7. I have removed most of the languages from the Language menu, but you can bring back any language you need from Settings > Preferences > Language Menu. 8) The Shortcut Mapper has been slightly changed: Ctrl-Shift-Z does undo now. shortcut.xml controls this. 9) Added four functions to the context menu (right-click that is): Split lines, Join Lines, Text Direction RTL Text Direction LTR ========================= Nearly everything above is easily configurable. I could not implement support for non-startstop folding with sectioning like \chapter etc. because that would mean compiling the scintilla lexer, something I'm not interested in doing. If anyone knows how to do lexer programming and is interested, feel free;-) ========================= This package depends on Npp 4.2, so if you already have Npp then upgrade to the latest version. The documentation.bat file is based on code from Adrian Drury. Eventually it may be replaced with the mtxrun utility. I offer the package to the community but I am no OS guru so I cannot promise any support. OTOH please do make suggestions for improvement. Finally, I need a volunteer to post this on the wiki and to update the Text Editor page. Enjoy! Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________