EmEditor (text editor) Forum Index
   Questions and Answers about Macros
     want to indent block by one column
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
gning
Posted on: 6/16/2011 6:49 pm
Just popping in
Joined: 9/10/2008
From:
Posts: 17
Re: want to indent block by one column
Bringing back an old issue here... this problem is not fixed in 10.0.8 (x64). Here is my latest attempt at a macro to indent by one space... note that it tries to force the editor into indent-with-spaces-only mode:

var icfg = Document.Config.Indent;
var oldIC = icfg.IndentColumns;
var oldTC = icfg.TabColumns;
var oldIS = icfg.InsertSpaces;
icfg.IndentColumns = icfg.TabColumns = 1;
icfg.InsertSpaces = true;
Document.Config.Save();
Editor.ExecuteCommandByID(4358);	// indent (as with Tab key)
icfg.IndentColumns = oldIC;
icfg.TabColumns = oldTC;
icfg.InsertSpaces = oldIS;
Document.Config.Save();


With alerts, I have verified that the values of the column properties do change to 1... but the indent I end up with is still a tab character, not a space. Exactly as if I had just pressed the tab key without changing any settings.
Flat Previous Topic | Next Topic


Subject Poster Date
   want to indent block by one column gning 2/24/2009 3:08 pm
     Re: want to indent block by one column Yutaka 2/24/2009 3:20 pm
       Re: want to indent block by one column gning 2/24/2009 7:49 pm
         Re: want to indent block by one column Yutaka 2/24/2009 9:49 pm
           Re: want to indent block by one column gning 3/17/2009 10:37 am
             Re: want to indent block by one column Yutaka 3/17/2009 2:49 pm
               Re: want to indent block by one column gning 4/14/2009 4:41 pm
                 Re: want to indent block by one column gning 4/23/2009 2:39 pm
                   Re: want to indent block by one column Yutaka 4/24/2009 2:09 pm
                   » Re: want to indent block by one column gning 6/16/2011 6:49 pm
                       Re: want to indent block by one column Yutaka 6/17/2011 8:17 am

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