Nightly Build 2.5.0.4

612 views
Skip to first unread message

josip

unread,
Feb 22, 2013, 1:45:24 PM2/22/13
to write...@googlegroups.com
DL: http://writemonkey.com/__files/NB/wm2504NB.zip


- fixed: Nasty crash on combination: blinds on & info bar hidden at startup.

- Fixed: Missing dependent dll for irrKlang sound library (upgraded in 2.5.0.3) on some systems. This version hence includes msvcr100.dll.

- removed: "Inverse colors in repository" option is no longer available in this version. Some (read: most of) color schemes produced ugly results.

- added: New plugin engine features, richer API

- added: Pomodoro timer, Auto Indent, and Clipboard picker proto plugins. Improved Quick search plugin.


Plugins engine

This will allow 3rd party extensions/plugins to add to and interact with existing core wm functionality. Since no technical documentation exists at the moment, I will just summarize some basics.

Plugins are stored in wm/plugins folder. Each sub folder represents a plugin and it needs to contain at least one plugin_name.js file. Wm supports javascript as it’s scripting language. It utilizes Jint javascript interpreter for .NET (http://jint.codeplex.com) which currently implements all concepts defined in ECMAScript version 3.0. Version 5.0 is not supported at the moment.

Javascript is commonly used for handling web browser’s DOM objects but in our case it can interact with:

  • .NET 4.0 core functionality – Your scripts can instantiate and use all generic classes and methods. The usage is the same as in C# (.NET flagship language) with some minor differences.
  • External .net libraries (dll-s) supplied with a plugin.
  • Special “monkey” object that allows you to interact with different aspects of current writemonkey instance. For example:

    monkey.selectedText = “this will be inserted at current caret position”;

There are couple of quick and dirty examples already there; I wrote them more as a proof of a concept than anything else. You can open js files and see what’s inside, modify them. Note that you don’t need to use .NET stuff at all. You can just put together simple javascript “macros”.

Included proto plugins

  • Lorem ipsum - generate random lorem ipsum paragraphs of different lengths
  • Namely - generate random names using huge database of real names
  • Smarty pants - replace straight quotes with curly ones, -- to en dash, --- to em dash etc.
  • Wordwrap at 75 - hard break the text at certain position
  • Quick search - find text quickly, [initialized at startup]
    • Deploy: CTRL+E,S
    • Find: start writing
    • Next down: Down arrow, Enter
    • Next up: Up arrow
    • First: Home
    • Last: End
    • Clear search field: Delete
    • Exit: Escape
    • Back to original location: Insert
  • Auto save scratch - backup unsaved "scratch" files to desktop (or any other) folder on set interval 
  • Block comment - add or remove "//" from the paragraphs of selected text [initialized at startup]
    • Deploy: CTRL+E,C (comment) / CTRL+E,U (uncomment)
    • If nothing is selected, paragraph under the caret will be acted upon
  • Rounded monkey - show borderless window with rounded corners [initialized at startup]
    • Deploy / toggle: CTRL + click right side of the wm window
    • Set radius and opacity in js file
  • Clipboard picker - keep clipboard history and allow text snippets to be accessed later [initialized at startup]
    • Deploy / toggle: CTRL+E,E or /clip replacement trigger
  • Pomodoro - show timer and completed pomodoros with words written for each of them. Track how productive you were during the session. More about this technique at <www.pomodorotechnique.com> [initialized at startup]
    • Show / hide: CTRL+E,P
    • Click timer to start / void pomodoro
    • Click session label to start new session
    • More settings at the beginning of the plugin file
  • Auto indent - On enter match the indent of the previous line, auto insert markdown bullets and increment numbers [initialized at startup]
    • Toggle plugin active / inactive: CTRL+E,I
    • SHIFT+ENTER: bypass auto indent

Modes of deployment

Individual plugin can be initialized when wm starts or it can be deployed later using plugin menu. That depends on plugin's nature. Some plugins need to run all the time, other just do stuff when needed in a single step.

All plugin .js files with names starting with "exe_" will execute at startup. For example: exe_someplugin.js will run and someplugin.js won't.

You can deploy "one step" plugins using plugins menu - CTRL+F10. Run last used plugin with CTRL+ALT+F10. Plugin menu does show "exe" plugins (maked with green icon) but you can't re-run them. Use plugin shortcuts to deploy actions.

If implemented, running plugin can listen for keyboard (and other) events and reacts on them. Since core wm already occupies a big chunk of shortcut space, wm 2.5.0.3 adds a new feature that will allow plugins to assign shortcuts without interfering with existing combinations. To use this extended shortcut space hit CTRL+E, release, and hit another key. Plugin Quick search, for example, uses CTRL+E,S to open quick search field at the top left corner of the screen. Users can modify this shortcut by editing the plugin file.

Version 2.5.0.4 also allows replacements to not just replace text, but to execute scripts or send keyboard commands. You can for example type /go and wm will execute command predefined in replacement string. If you want to execute plugin use {full_plugin_path} for the replacement string. To execute keyboard command, use {^es} for example. That means that CTRL+E,S command will be executed. Note that {H} will send SHIFT+H and h will send just H. Visit http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx to learn more. Plugins can register their own trigger/replacement pairs using monkey.setReplacement(trigger, replacement) method. Plugin Quick search for example defines trigger /s that brings up search field.

Plugins can be disabled in Preverences / Misc.

Notice of caution

The code from the plugin files can be dangerous as the API allows full access to your file system and many other system resources. This will change when this version is officially released (some security precautions will be taken), but right now be careful what kind of code are you putting in js files.

Plugins will be available only to donors / wm key owners.

Huskey

unread,
Feb 22, 2013, 5:11:29 PM2/22/13
to write...@googlegroups.com
After typing one line of words and hitting 'Enter' for new line, line spacing is as follows:

1 line after first hit
2 lines thereafter for each hit

Thanks.

josip

unread,
Feb 22, 2013, 6:40:31 PM2/22/13
to write...@googlegroups.com
Bug in Auto indent plugin. Attaching fix. Replace file.
exe_Auto indent.js

Huskey

unread,
Feb 23, 2013, 11:39:31 AM2/23/13
to write...@googlegroups.com
Cool. Thanks.

Karl

unread,
Feb 23, 2013, 12:01:05 PM2/23/13
to write...@googlegroups.com
- added: Pomodoro timer, Auto Indent, and Clipboard picker proto plugins. Improved Quick search plugin.


Most awesome shit in the world! :-) And this is only the beginning. Fainting from joy... 

StefanG

unread,
Feb 24, 2013, 3:44:47 AM2/24/13
to write...@googlegroups.com

Cannot get it to run. There is a brief screen flicker upon start-up, then nothing.
But it seems to be doing something, because after I went back to 2.4.0.17 I could no more manually open my last used document. An error message told me it was already in use. So it seems like the 2.5.0.4 process did start up in the background and hugged the last used file.

Win7. I have no Java installed. I hope this is not mandatory?

StefanG

unread,
Feb 24, 2013, 12:11:25 PM2/24/13
to write...@googlegroups.com
For the record: it was my own fault, I completely left out the plugins- folder when upgrading. Since I did not have plugins disabled (Prefs > Misc) it seems logical that WM was looking for them but couldn't find them.

Anyway, thanks to Josip for a lightning fast Sunday - support via e-mail.

josip

unread,
Mar 6, 2013, 5:04:37 AM3/6/13
to write...@googlegroups.com, etor...@gmail.com
This is a known problem. Syntax highlighting is causing some prblms. to undo function. On top of my to do list, but there is no simple solution for that.
i.

On Wednesday, March 6, 2013 9:48:14 AM UTC+1, etor...@gmail.com wrote:
I see some weirdness with undo function.

Steps to reproduce:
1. Create new file (Ctrl+N).
2. Put some text (Lorem ipsum).
3. Add list below text (multiple dashes as bullets, strings, carret returns).
4. Press Ctrl+Z to get rid of list, but nothing happens.

josip

unread,
Mar 6, 2013, 5:05:35 AM3/6/13
to write...@googlegroups.com, etor...@gmail.com
Is this happening at the start up? 
i.

On Wednesday, March 6, 2013 9:11:50 AM UTC+1, etor...@gmail.com wrote:


On Sunday, February 24, 2013 12:44:47 PM UTC+4, StefanG wrote:

There is a brief screen flicker upon start-up, then nothing.


It works for me, yet I agree about a screen flicker. At first half screen is painted in black, other half is in white, then my color scheme is loaded. Very annoying thing showed up with plugins feature.

josip

unread,
Mar 6, 2013, 11:14:10 AM3/6/13
to write...@googlegroups.com, etor...@gmail.com
The inverted colors can be easily reintroduced as an optional plugin.
i. 


On Wednesday, March 6, 2013 9:04:42 AM UTC+1, etor...@gmail.com wrote:

- removed: "Inverse colors in repository" option is no longer available in this version. Some (read: most of) color schemes produced ugly results.



It's pity, that feature worked like a charm. It enabled me to easily distinguish between face (primary text) and verso (scheme, notes). I also used dark verso to continue writing when I was tired of bright side — single-key pressed and you feel different.

Perhaps you should redesign Preferences dialog to gain more space for optional features people had time to love (color inversion, green icon, etc)? See example below.


josip

unread,
Mar 6, 2013, 11:16:13 AM3/6/13
to write...@googlegroups.com, etor...@gmail.com
It is very brief, I can barely notice it on your video.
i.

On Wednesday, March 6, 2013 11:38:10 AM UTC+1, etor...@gmail.com wrote:

On Wednesday, March 6, 2013 2:05:35 PM UTC+4, josip wrote:
Is this happening at the start up? 


True. I have captured it for you. 

josip

unread,
Mar 6, 2013, 12:07:11 PM3/6/13
to write...@googlegroups.com, etor...@gmail.com
I can't reproduce this one. Give me some info about you comp - processor speed, os ...
i.

On Wednesday, March 6, 2013 5:49:42 PM UTC+1, etor...@gmail.com wrote:

On Wednesday, March 6, 2013 8:16:13 PM UTC+4, josip wrote:
It is very brief, I can barely notice it on your video.


That's why it's called flicker, right?
You see, flash captured video FPS is low, meaning some frames are missing, still you see the flicker.
Hey, it's as brief as Fight Club (movie) subliminal images when close-up shots of penis are injected.
This annoyance is a part of this year versions, so I guess it wouldn't be hard to catch and fix.
Reply all
Reply to author
Forward
0 new messages