* * *

Author Topic: Notepad++ plugin Lazarus template  (Read 6258 times)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Notepad++ plugin Lazarus template
« on: August 18, 2012, 04:27:09 pm »
If you use the free Notepad++ text editor, you might have wanted to write a plugin for that in FPC/Lazarus.

Ludob and I have ported over the Delphi "Hello World" template so now you can try and do exactly that.

It's a first release, but initial tests on both the Unicode and Ansi versions of Notepad++ are satisfactory.

As usual, feedback and patches welcome.

You can find the code in this repository
https://bitbucket.org/reiniero/notepad-pluginlazarus
... from which you can download a zip of the latest version, or checkout with mercurial/hg.

If the code turns out to workable for people, I'll submit it for inclusion in the NPP Plugins Sourceforge project:
sourceforge.net/projects/npp-plugins/


Thanks,
BigChimp
« Last Edit: August 19, 2012, 02:35:37 am by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Notepad++ plugin Lazarus template
« Reply #1 on: August 19, 2012, 02:08:49 am »
Attached the Notepad++ plugin I wanted to write all along: insert a separator line and date/time.
I've attached a keyboard shortcut to it in my NPP settings so I can be even more lazy in keeping my logs ;)

(I know the date/time format is wonky/ambiguous, but that's what I've been using till now with a macro in NPP - next up will probably be some code to go through text files and convert the timestamps...)

I've stripped out all forms from the example plugin as well as icon handling code, and set the widgetset to nogui. Open for suggestions on optimizing this further...

Also, of course, if you have other functionality (current IP address? phase of the moon?) that would fit into a "current" plugin, I'm open for patches ;)

Thanks,
BigChimp
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

eastorwest

  • New member
  • *
  • Posts: 14
Re: Notepad++ plugin Lazarus template
« Reply #2 on: September 06, 2012, 07:38:00 pm »
Some time back I tried to port the same template independently... Not successfully... Thought it is impossible)
Thanks BigChimp and Ludob for this conversion of plugin for my favourite text editor!)
P.S. I think it will be usefull to submit Lazarus-plugin sources template for inclusion in the NPP Plugins Sourceforge project. (Please contact with Don Ho to do this.)
« Last Edit: September 06, 2012, 08:10:51 pm by eastorwest »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Notepad++ plugin Lazarus template
« Reply #3 on: September 06, 2012, 08:15:35 pm »
Thanks, eastorwest, hoping to see some nice plugins from you ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

yifan

  • Newbie
  • Posts: 4
Re: Notepad++ plugin Lazarus template
« Reply #4 on: February 02, 2018, 07:50:33 am »
HI,
I use this Template ,when I open a file
Code: Pascal  [Select]
  1. GetNPPPluginInstance.DoOpen('a.txt') ;  
  2.  
it will create a new file  , 
this is a  Error images
http://kde.df5d.com/1.jpg

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus