Author Topic: Basic Editing : Cursor Movement : cbacktab fails  (Read 3926 times)

PurdueEEGrad

  • Senior Community Member
  • Posts: 115
  • Hero Points: -17
Basic Editing : Cursor Movement : cbacktab fails
« on: September 23, 2014, 11:21:46 AM »
I have mapped cbacktab to the Ctr-I key (control key + I key : depressed at same
time).

cbacktab fails via (A) keymapping and (B) command line execution on a *.txt file.

cbacktab works partially - in columns 001 -> 004 - after ctabs +3 is set.

I use a ctabs = +3 configuration for all my files.

I have had strange behavior on *.c and *.h files - where cbacktab worked for a
bit - and then suddenly never worked again : Only because I opened the workspace
- in different versions of Slickedit (see below).  While the *.c and *.h file
worked - the *.txt file never worked - and I could not move cursor left via
cbacktab - using a Ctr-I key stroke.

Mostly, however, cbacktab never works in the new beta (except for one time).

Strangely enough, cbacktab always works for columns 0 to 4 - with ctabs set a +3 (ie;
ctabs +3).

So cbacktab/tab works for the first tab - but not for any others - since
cbacktab fails (ctab, however, is fine.  It moves cursor to the right with no
problems).

I have switched between three versions of Slickedit - which can sometimes cause
different behaviors of cbacktab in the new beta.

   [1]   Slickedit 2004 -  v09.0.4   - 32 bit   -  cbacktab works OK (never fails)

   [2]   Slickedit 2013 -  v18.0.1.2 - 64-bit   -  cbacktab fails

   [3]   Slickedit 2014 -  v19.0.0.8 - 64 bit   -  cbacktab fails

Version [1] above - has no problems with cbacktab.

Version [2,3] above - has problems with cbacktab.

Again : There was some anomalous cbacktab behaviour - where it worked for a
while - and then did not - without any option setting changes - or significant
changes to the Slickedit workspace.

My keychart.html is attached - generated from the beta (version [3] above).
(generated via Tools -> Options -> Keyboard and Mouse -> Keybindings : Save Chart)

For command line execution - I entered ctabs +3 - so the tabs should be at 3
space intervals. The 3 space ctab option was already set via the GUI.

After entering ctabs +3 on the command line - both (A) keymap and (b) command
line still failed in the beta (ie; version [3] above).

In other words - the command line execution of cbacktab fails - just like the
keymapped execution of cbacktab.

Note Again : The ctab macro works just fine in all three versions (as above).

In summary - the cbacktab macro is a simple edit function - but it prevents me
from porting my earlier Slickedit configuration - to the new beta version.

I use cbacktab ALL the time - to move my cursor around a file - via my mapping
of cbacktab to the Ctr-I key.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Basic Editing : Cursor Movement : cbacktab fails
« Reply #1 on: September 24, 2014, 12:05:07 PM »
This is fixed in v19 beta 6 which will be available soon.

PurdueEEGrad

  • Senior Community Member
  • Posts: 115
  • Hero Points: -17
Re: Basic Editing : Cursor Movement : cbacktab fails
« Reply #2 on: September 24, 2014, 01:10:52 PM »
Thank goodness :-)

Will test it out as soon as beta 6 is released.

PurdueEEGrad

  • Senior Community Member
  • Posts: 115
  • Hero Points: -17
Re: Basic Editing : Cursor Movement : cbacktab fails
« Reply #3 on: October 03, 2014, 05:41:24 PM »
      cbacktab(), tab() still have problems.

      Test Status : SE V19 Beta 6 : Partially fixed (see below - test [SUMmary] statements)

      I have attached 4 test files for [1] tabs('+3') and [2] tabs("1 4 7 10 13 16 ...") context testing of cbacktab().

      I have also attached a keymap (Ctr-I, Ctr-O = cbacktab, tab) - to verify cbacktab under alternate keymappings.

      Read the text in each testfile (attached) - for detailed test results.

      Bottom line is a cbacktab() seems partially fixed.

      [1] Good : cbacktab, tab works - as far as moving left, right

      [2] Bad : _tst_CMD.e : The distance they move can not be set via - tabs('+3')

      [3] Bad : _tst_CMD.e : The distance they move can not be set via - tabs("1 4 7 10 13 16 ...")

      [4] Good : GUI : On opening a virgin *.bat file - the GUI default +3 char setting worked.

      [5] Bad : Command Line : Verification of macro action impact via tabs on command line does not work.


      In summary;

      [SUM_1] Movement left right works

      [SUM_2] LENGTH of movement does not work.

      [SUM_3] Desire : What I would expect (and desire) - is that;

      [SUM_3.a] Synchronicity : CMD - GUI : The GUI should reflect chances made via macros.

      [SUM_3.b] Verification  : CMD - command line : The CMD action should be verified via the SE command line Tabs() command (ie; this was not consistent in testing)

      [SUM_3.c] Mechanism : CMD - Some macro (tabs - whatever) could be used to set cbacktab, tab movement length for all file types - including default action for all files.

      I use a +3 tab space on all my stuff - so my scope of action impact need is pretty simple.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Basic Editing : Cursor Movement : cbacktab fails
« Reply #4 on: October 04, 2014, 01:59:47 PM »
Tabs stops are only used for fundamental mode files (plain text files) which have no syntax indent. See function ptab() in stdcmds.e to see implementation details.

PurdueEEGrad

  • Senior Community Member
  • Posts: 115
  • Hero Points: -17
Re: Basic Editing : Cursor Movement : cbacktab fails
« Reply #5 on: October 06, 2014, 03:10:19 PM »
Is there another function I can use - just to move the cursor left, right - with a distance I can control?

Moving the cursor left, right - in single character movements - just takes too long. Of course, I use
both single and multiple moves (left, right) - so my V09 keymap has both (1) single char and (3) +3 char
movements.

All my code and contracts (for software engineering) - have used +3 code spacing (indenting) for decades.

Any alternate macros (besides cbacktab, tab) - are OK by me.

(please note that my SE 2004 V09 editor - moves as above (on +3) - and is really fast, fast, fast
when I code.)


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Basic Editing : Cursor Movement : cbacktab fails
« Reply #6 on: October 07, 2014, 03:44:55 PM »
You can already control the cursor movement for cbacktab and ctab. For plain text files set the tab stops, for others set the syntax indent.

PurdueEEGrad

  • Senior Community Member
  • Posts: 115
  • Hero Points: -17
Re: Basic Editing : Cursor Movement : cbacktab fails
« Reply #7 on: October 27, 2014, 03:24:47 PM »
I wanted to close out this Slickedit Topic - by logging the attached SE
test files (*.) - designed to AUTOMATICALLY setup the SE environment (1)
via modules loaded from the GUI (.._MOD.e) - or (2) command files executed
on the SE command line (.._CMD.e). 

I went through the 2013 SE User Guide (PDF) - and did not see any section
that clearly explained 'AUTOMATED option configuration' (which is what I
am trying to do).  I logged this post - to verify that 'automated option
configuration' - is not really working in SE (as I understand it from the
2013 user guide). 

As I currently understand the 2014 Beta 6 release : Setting Slickedit
options is done via the GUI only.  There is no fundamental paradigm
approach - to setting SE options via the loading of SE modules (as
attached). 

I permuted various forms of setting up the SE options - as attached - and
tested with results as follows. 

Note [1] :  (a) Each tests was run on a virgin configuration - with some of my other custom SE modules already loaded.
Note [2] :  _CMD.e files are loaded via the SE command line. (_MOD.e) files are loaded via SE GUI : Load Module.

(A)      WithOUT GUI setting : Tools -> Quick start config -> Coding -> Set Indent for all languages

   [1]   tst_CMD_A   :  defload     :  BEFORE any Workspace loaded : Fail (*.txt = 3: all others = 4)
                                       AFTER  a   Workspace loaded : Fail (*.txt = 8, tabs locked up: all others = 4)
   [2]   tst_CMD_B   :  definit     :  BEFORE any Workspace loaded : Fail (same as 1.a)
                                       AFTER  a   Workspace loaded : Fail (same as 1.b)
   [3]   tst_CMD_C   :  defmain     :  BEFORE any Workspace loaded : Fail (same as 1.a)
                                       AFTER  a   Workspace loaded : Fail (same as 1.b)
   [4]   tst_MOD_A   :  defload     :  BEFORE any Workspace loaded : Fail (same as 1.a)
                                       AFTER  a   Workspace loaded : Fail (same as 1.b)
   [5]   tst_MOD_B   :  definit     :  BEFORE any Workspace loaded : Fail (same as 1.a) most favored configuration
                                       AFTER  a   Workspace loaded : Fail (same as 1.b)

(B)      WITH    GUI setting : Tools -> Quick start config -> Coding -> Set Indent for all languages

   [1]   tst_CMD_A   :  defload     :  BEFORE any Workspace loaded : Fail (*.txt = 3, tabs locked up: all others = 4)
                                       AFTER  a   Workspace loaded : Fail (same as 1.a)
   [2]   tst_CMD_B   :  definit     :  BEFORE any Workspace loaded : Fail (same as 1.a)
                                       AFTER  a   Workspace loaded : Fail (same as 1.a)
   [3]   tst_CMD_C   :  defmain     :  BEFORE any Workspace loaded : Fail (same as 1.a)
                                       AFTER  a   Workspace loaded : Fail (same as 1.a)
   [4]   tst_MOD_A   :  defload     :  BEFORE any Workspace loaded : Fail (same as 1.a)
                                       AFTER  a   Workspace loaded : Fail (same as 1.a)  second most favored - (changable)
   [5]   tst_MOD_B   :  definit     :  BEFORE any Workspace loaded : Fail (same as 1.a)
                                       AFTER  a   Workspace loaded : Fail (same as 1.a)

After a lot of testing - I came to the conclusion - that the only reliable
way to save settings (for now) - is by a ZIP of the Slickedit user
configuration directory.  In other words you have to use the GUI - and
then save what you did via a ZIP of the Slickedit user configuration
directory. 

To be bullet proof and repeatable - I save a set of ZIP files - in stages
- so I can fallback to a reliable SE state space - during experimentation
with SE macro programming of the environment. 

So, as far as I know, the three ways to save the Slickedit settings are;

[1] Slickedit Module (as attached)

[2] XML file (currently these do not save all the types of settings found in SE)

[3] ZIP File (of the My Slickedit Config) directory

Using paradigm [1] above - does not really work - nor is it intended to - in
the current 2014 S3 V19 beta 6 release.

In closing, it would be nice at some future point - if the tabs and other
settings - could be automatically set up - at ANY time - via SE option
modules as attached (as a general paradigm for SE application configuration).

The USE CASE would be : Reset of the CUSTOM Slickedit Environment -
defined by a user (like me) - after a lot of testing and experimentation
on Slickedit Beta release - and new Slikedit version release (final
release). 

I have tried to 'reset' my environment and could not (via SE option
modules - as in the attached examples). Thank goodness I Zipped the
SE configuration directory - at an early point in my beta testing - when
the tabs magically worked (as I wanted them too - with +3 tab spacing).

My long term concern is that using ZIP config directories - eventually
get out of date as Slickedit new releases are put out (every year) - and
I have to rezip the whole environment in stages (as I do now) - everytime
a new final release of SE comes out (for everything to be pragmatically
reliable and bullet proof).

I do a lot of experimentation in SE - and it is often necessary - to
remove the Slickedit config directory - let SE rebuild it - and reload my
custom SE coding environment - via a reload of ALL my custom SE modules. 

Note the attached *.e files are pretty raw : Just some quick and dirty
test files - to permute loading conditions for setting SE options as herein.

Note that my long term intent - is to accelerate programmer team set up
time - where the entire programing team uses Slickedit - configured for
working in various software technologies and platforms (especially
enterprise level software pattern development - and system automation
software projects). More and more team members want to experiment with
SE customization - but need a secure, reliable, bullet proof fall back
position - to return to after playing around with various new ideas -
in SE customization and programmer productivity.

Sorry for the long post (herein) - but I thought it would help the SE team
understand my programatic desire (*.e as attached = paradigm [1] above) -
to compliment the 'XML configuration save - paradigm [2]' - instead of
using ZIP files (as the only pragmatic solution that seems to work all the
time - no matter what - for what I am trying to do). 

Thanks to the SE dev team - for their patience - in reading these long but
hopefully rare - beta test posts :-)