WinPTE.com

 

Flex Insert Mode

Insert, Overtype, or Flex

Right off the bat WinPTE makes a few bold steps and gets rid of the imbedded TAB characters. These are a pain in multi-platform, multi-editor environments because no two handle these the same way. They are also difficult to handle consistently when it comes to column operations. Additionally, for programming source code they get in the way more often than not.

Most environments let you set the number of spaces a TAB represents so you can use it to indent source code. In my view this is a considerable waste of the TAB operation and also forces you to reach way-out to the TAB key just to indent.

Having the ability to edit column aligned text is crucial in formatting program source so WinPTE has features that gives you this ability without having to wrestle with tab settings all together. The expansion of tabs on opening of a file and their synthesis when saving a file is handled seamlessly.

The ability to edit column formatted text comes in two separate functions: indent/outdent and Flex Mode. First, indent/outdent functions are performed by the space/backspace keys using contextual information. If you are on or before the 'first non-blank' character of a line then space and backspace perform the indent/ outdent functions. Anywhere else they do their usual jobs. Second is the FLEX typing mode. In addition to the standard insert and overtype modes, WinPTE comes with a third mode called Flex Insert or Flex for short. Flex mode gives the benefit of tabs when editing column layouts without having the tabs and the discontinuity of text operations they cause.

Flex behaves similarly to insert mode in that as text is inserted at the cursor it pushes any text right of the cursor. Unless there is a stretch of three or more consecutive spaces somewhere further right of the cursor, in which case this stretch of spaces is 'squeezed' leaving the non-space text that follows unmoved. The deletion of characters in Flex mode does the opposite. The first region of three or more spaces to the right of the cursor is 'Stretched' so that the non-blank text following it is not moved. Hence the term Flex, stretches of spaces flex to absorb the shock to non-space characters that follow.

This mode allows you to edit column laid out text 'most of the time' without having to change tab settings or even have any tab settings at all. Why is 'most of the time' acceptable? Because 'most of the time' in Flex mode amounts to much more often than the same functionality offered with imbedded tabs.

Tabs work great for typesetting where each paragraph's tab settings are set just right for the column spacing in that paragraph. In program source tabs are usually set to 8 or 4 spaces and have nothing to do with the column spacing. To prove this point just set your tabs to every 8 characters and try to layout text in two or three columns spaced by 24 characters. Every time you edit a column and wind up overflowing the text beyond the next tab stop, all columns to the right shift. You now have to delete one or more tabs to line up the rest of the text. Realistically, you probably set tabs to 4 to make the indentation more sane and this exaggerates the column layout problem. This was the cause of the frustration that led to the development of Flex mode many years ago.

In WinPTE a column would have to overflow to the next column before the next column is affected, and only the next column. So there is less disruption to the editing process.

Example:

Lorem ipsum dolor sit amet, |          consectetur       adipisicing quis nostrud.
Lorem ipsum dolor sit amet, sed do | consectetur adipisicing quis nostrud..
Lorem ipsum dolor sit amet, sed do eiu | consectetur adipisicing quis nostrud..

The | is the insertion point. As text is inserted, it pushes text to the right, but large spaces (3 or more) get compressed so that text right of the spaces stays put. As soon as the amount of spaces shrinks to two spaces it stops compressing the spaces and starts behaving like a normal insert, but any large spaces further right on the line begin to compress until they too shrink to two at which point they stop, and so on.

Site Map | Privacy Policy | Contact Us | ©2004 Winpte.com