EmEditor (text editor) Forum Index
   Questions and Answers about EmEditor Core
     Snippets insertion point
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
Stefan
Posted on: 7/19/2011 7:48 am
Home away from home
Joined: 7/14/2008
From: Germany, EU
Posts: 285
Re: Snippets insertion point
As an hint for others reading the above request, here is the solution.


To work with selected text have ${SelText} in your snippet.

Example 1:
For HTML; format bold
<B>${SelText}</B>


Example 2:
For AutoHotkey; surround with %-signs
%${SelText}%


- - - - - -


To have your cursor at the right place after the snippet is inserted
simple add an placeholder like $7



Example 1:
For VBScript
Dim $4 As String

Results in:
Dim | As String




Example 2:
For Dairy
${Date} ${Time} Log: "$1"

Results in:
19.07.2011 17:37 Log: "|"




Example 3:
For XYplorer script
$$$1=1; 
  while($$$1 < 10){
     
     msg $$$1,1;
     //your code here> $2
     
     $$$1++;
  }



Usage:
* first, at the first $1, type the name of the loop var, e.g. 'LoOp'
(This var name is copied to all places where the placeholder '$1' is found else)
* second press TAB to jump behind '//your code here'

Note:
the var name for XYplorer script have to be prefixed by an '$'
and since this $ has an special meaning for EmEditor snippet
we have to escape them by doubling this sign to '$$'

Results in:

$LoOp=1;
  while($LoOp < 10){
       
     msg $LoOp,1;
     //your code here>  |
     
     $LoOp++;
  }
Flat Previous Topic | Next Topic


Subject Poster Date
   Snippets insertion point pja 9/21/2008 6:46 pm
     Re: Snippets insertion point Yutaka 9/22/2008 9:15 pm
       Re: Snippets insertion point pja 9/24/2008 12:17 am
     Re: Snippets insertion point Stefan 10/3/2008 8:04 am
     » Re: Snippets insertion point Stefan 7/19/2011 7:48 am

Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文