Author Topic: Problem with Vim emu and XML  (Read 2325 times)

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Problem with Vim emu and XML
« on: June 26, 2009, 05:06:22 pm »
SlickEdit Version 14.0.1.2

Build Date: May 15, 2009
Emulation: Vim
OS: Windows XP
Version: 5.01.2600  Service Pack 3
Hotfixes:
C:\Documents and Settings\CB\My Documents\My SlickEdit Config\14.0.1\hotfixes\hotfix_se1401_cumulative.zip (Revision: 8)

Code: [Select]
1  <window>
2      <Button Name="buttonDiff"
3              Width="64"
4              Height="30"
5              Grid.Column="1"
6              Grid.Row="5"
7              HorizontalAlignment="Left"
8              Margin="12,10,16,16"
9              Click="diff_Clicked"
10             IsEnabled="False"
11             Style="{StaticResource buttonStyle}"> Diff
12     </Button>
13     <Button
14         Name="buttonDiff"
15         Width="64"
16         Height="30"
17         Grid.Column="1"
18         Grid.Row="5"
19         HorizontalAlignment="Left"
20         Margin="12,10,16,16"
21         Click="diff_Clicked"
22         IsEnabled="False"
23         Style="{StaticResource buttonStyle}">
24         Diff
25     </Button>
26 </window>

Two issues:
1)  Serious:
  • Place the cursor on the first " on line 22
  • Press ESC to make sure SlickEdit is in Command Mode
  • Press d$ -- delete to end of line
  • Instead, two lines are deleted, and the next two lines are joined
   Do the same thing at the first " on line 10 -- different behavior.
2)  Argh:
  • Place cursor on first " on line 23
  • ESC, to make sure editor is in command mode
  • y$ -- copy from cursor to end of line -- a vim command that doesn't modify the buffer causes reformatting?!?
3)  Annoying: Almost any editing operation, and SlickEdit reformats the xml on the fly.  I don't like it.  How can I turn that off?
« Last Edit: June 26, 2009, 05:19:51 pm by Wanderer »

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Problem with Vim emu and XML
« Reply #1 on: June 26, 2009, 05:46:21 pm »
Turn off XML/HTML Formatting: Document > XML Options or Tools > Options > Languages > XML/Text Languages. Then pick the Formatting node. Uncheck "Enable content wrapping" and "Enable tag layout".

That may fix all 3 problems, but it should surely address #3.

When properly configured, the XML/HTML Formatting feature can be great. But you have to tell it how to lay things out. We use the docbook scheme all the time to write our User Guide, and I can't imagine working without it. For data-oriented XML, like what you've posted, it wouldn't be of much use though.

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Problem with Vim emu and XML
« Reply #2 on: June 26, 2009, 06:04:39 pm »
It's XML Formatting...I'm not exactly sure why it's doing what it's doing...but if you turn that off all 3 problems will go away.

- Ryan

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Problem with Vim emu and XML
« Reply #3 on: June 28, 2009, 02:56:15 pm »
Thanks, turned off XML formatting.