Plugin:HistoryPP/en/Text formatting: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
The following <tt>STRING</tt> keys are used to change text which is copied to clipboard.
The following <tt>STRING</tt> keys are used to change text which is copied to clipboard.


{| class="wikitable"
{| class="wikitable"
Line 5: Line 6:
! Key !! Default setting !! Description
! Key !! Default setting !! Description
|-
|-
| '''FormatCopy'''|| <tt>%nick%, %smart_datetime%:\n%mes%\n</tt>|| to format text which is copied to clipboard on "Copy" command
| '''FormatCopy'''|| <tt>%nick%, %smart_datetime%:\n%mes%\n</tt>|| to format text which is copied to clipboard on ''Copy'' command
|-
|-
| '''FormatCopyText'''|| <tt>%mes%\n</tt>|| to format text which is copied to clipboard on "Copy Text" command
| '''FormatCopyText'''|| <tt>%mes%\n</tt>|| to format text which is copied to clipboard on ''Copy Text'' command
|-
|-
| '''FormatReplyQuoted'''|| <tt>%nick%, %smart_datetime%:\n%quot_mes%\n</tt>|| to format text which is copied to message input area on "Reply Quoted" command
| '''FormatReplyQuoted'''|| <tt>%nick%, %smart_datetime%:\n%quot_mes%\n</tt>|| to format text which is copied to message input area on ''Reply Quoted'' command
|-
|-
| '''FormatReplyQuotedText'''|| <tt>%quot_selmes%\n</tt>|| to format selected text which is copied to message input area on "Reply Quoted" command
| '''FormatReplyQuotedText'''|| <tt>%quot_selmes%\n</tt>|| to format selected text which is copied to message input area on ''Reply Quoted'' command
|-
|-
| '''FormatSelection'''|| <tt>%selmes%\n</tt>|| to format selected messages or text via external log API query
| '''FormatSelection'''|| <tt>%selmes%\n</tt>|| to format selected messages or text via external log API query
|}
|}
You will need {{Plugin|DbEditorPP|Database Editor}} plugin to add/edit these keys. To restore default format for particular setting, just delete it from the database and restart Miranda.
You will need {{Plugin|DbEditorPP|Database Editor}} plugin to add/edit these keys. To restore default format for particular setting, just delete it from the database and restart Miranda.


== Formatting variables ==
== Formatting variables ==
Line 35: Line 37:
* <tt>%date%</tt> – date of the event
* <tt>%date%</tt> – date of the event
* <tt>%time%</tt> – time of the event
* <tt>%time%</tt> – time of the event


== Single event examples ==
== Single event examples ==
Line 52: Line 55:
  > Hello, how are you? I haven't seen you for a long time. I've got fantastic
  > Hello, how are you? I haven't seen you for a long time. I've got fantastic
  > new gadget I want to tell you about. Please, drop me a line.
  > new gadget I want to tell you about. Please, drop me a line.


== Multiple events examples ==
== Multiple events examples ==

Revision as of 16:21, 14 October 2013

The following STRING keys are used to change text which is copied to clipboard.


Key Default setting Description
FormatCopy %nick%, %smart_datetime%:\n%mes%\n to format text which is copied to clipboard on Copy command
FormatCopyText %mes%\n to format text which is copied to clipboard on Copy Text command
FormatReplyQuoted %nick%, %smart_datetime%:\n%quot_mes%\n to format text which is copied to message input area on Reply Quoted command
FormatReplyQuotedText %quot_selmes%\n to format selected text which is copied to message input area on Reply Quoted command
FormatSelection %selmes%\n to format selected messages or text via external log API query

You will need Database Editor plugin to add/edit these keys. To restore default format for particular setting, just delete it from the database and restart Miranda.


Formatting variables

  • \n – new line
  • \t – tab
  • \\ – backslash (if you need to output backslash, instead of "Me\You" write "Me\\You")
  • \% – percent sign (if you need to output percent sign, instead of "Me%You" write "Me\%You")
  • %nick% – default contact's nickname text
  • %from_nick% – nick of the sender
  • %to_nick% – nick of the reciever
  • %mes% – plain message text
  • %adj_mes% – message adjusted to fit in 72 symbols
  • %quot_mes% – the same as %adj_mes%, but every line is prefixed with "> "
  • %selmes% – the same as %mes% or selected text in pseudo-edit mode
  • %adj_selmes% – the same as %adj_mes% or applied to selected text in pseudo-edit mode
  • %quot_selmes% – the same as %quot_mes% or applied to selected text in pseudo-edit mode
  • %datetime% – date and time of the event
  • %smart_datetime% – works for only for several messages. Outputs full date & time only for messages with unique date. For other events outputs only time.
  • %date% – date of the event
  • %time% – time of the event


Single event examples

Event:

SomeContact, 21.01.2006 18:34
Hello, how are you? I haven't seen you for a long time. I've got fantastic new gadget I want to tell you about. Please, drop me a line.

Format: %nick% - [%datetime%]:\n%mes%

SomeContact - [21.01.2006 18:34]:
Hello, how are you? I haven't seen you for a long time. I've got fantastic new gadget I want to tell you about. Please, drop me a line.

Format: %nick%, %time%\n%quot_mes%

SomeContact, 18:34
> Hello, how are you? I haven't seen you for a long time. I've got fantastic
> new gadget I want to tell you about. Please, drop me a line.


Multiple events examples

Events:

Mario, 21.01.2006 18:34: Hi!
You, 21.01.2006 18:35: Hi!
Mario, 21.01.2006 18:36: Bye then
You, 22.01.2006 12:11: Hi again! Where have you been?
Mario, 22.01.2006 12:12: Oh, don't ask

Format: %nick%, %smart_datetime%: %quot_mes%

Mario, 21.01.2006 18:34: > Hi!
You, 18:35: > Hi!
Mario, 18:36: > Bye then
You, 22.01.2006 12:11: > Hi again! Where have you been?
Mario, 12:12: > Oh, don't ask

Format: %from_nick%\\%to_nick% [%smart_datetime%]: %mes%\n-----\n

Mario\You [21.01.2006 18:34]: Hi!
-----
You\Mario [18:35]: Hi!
-----
Mario\You [18:36]: Bye then
-----
You\Mario [22.01.2006 12:11]: Hi again! Where have you been?
-----
Mario\You [12:12]: Oh, don't ask
-----

Format: %nick%\t[%time%]\t%mes%

Mario   [18:34] Hi!
You     [18:35] Hi!
Mario   [18:36] Bye then
You     [12:11] Hi again! Where have you been?
Mario   [12:12] Oh, don't ask