Copyright 1991 Sudden Incorporated, Rod Coleman Arranging Text - Copy, Cut, Paste and Move Text editors generally do three things: position the cursor, edit characters, and arrange text. Arranging text is done with the Copy, Cut, Paste and Move functions, so these things are obviously a very important part of any text editor. That is especially true for Sudden View. Sudden View deals with the arrangement of text objects in a more direct and subtle fashion than other programs. I refer to it as dynamic arrangement. Most editors and word processors simply define a text block from a start point to an end point, and include everything in between. This block can then be copied, cut or pasted into a different location. Their move block operations are generally just a single and combined cut and paste. Desktop publishing programs typically treat the block as a graphics frame, which is sometimes displayed as a separate sprite, traveling over top of existing text during a move. This frame or sprite is then pasted on top of, or sometimes re-integrated into the exiting text at acceptance time. Since Sudden View implicitly respects different kinds of existing text, so do its Copy, Cut, Paste and Move operations. Blocks are more carefully defined, and pasting is sensitive to the location, format and type of text objects. Sudden View's Move operation visually moves the block, showing at each position exactly what the document would look like if accepted at that point. This is done using repeated dynamic integration of the Cut and Paste operation. To accomplish Live Editing, Sudden View defines four types of blocks: Character, Sentence, Field, and Line. I will describe how each of these blocks are selected and used in their various operations: Block Selection, Copy, Cut, Paste and Move. I will also present a couple of advanced features only found in the personalized version of Sudden View, Dynamic Buffer Selection and Ballistic Move. To give you an idea of what I'm going to cover, let's try a real easy example. Just click the right button over "Selecting a Block" below. The whole field will turn a gold color. Now with the mouse cursor in the gold area, drag the mouse with the right button down. This is how you move text with Sudden View. Click the right mouse button again and you will deselect the Field block. You've just done all of the operations of Text Arrangement: Copy, Cut, Paste and Move. Now that wasn't bad, was it: but wait, there's more. Selecting a Block Text in Sudden View is made up of fields, each containing strings of characters (see Formatting Text). Fields can also be defined as word wrap fields, which means that any inserted text will be automatically wrapped into a defined column of similar fields below. Fields also contain information about margin, size and other control flags, all of which you can generally ignore. But the fields themselves are very important in arranging text, as I shall shortly demonstrate. In Sudden View, blocks can be selected either literally or logically, producing four different types, which are Character, Sentence, Field or Line blocks. The type of block selected, depends upon how the user does the selection. Blocks are selected by using the mouse, cursor keys or Power Menu. If you hit "Start New Block" on the Power Menu, you can then use the cursor keys to select a block. As you shall see, the direction that you move the cursor will determine the type of block you select. Before the block is actually selected using the Power Menu, you must hit the "End Block" menu. You may also notice on the Power Menu that you can select the current field or the current line with one more keystroke. There are also two ways to use the mouse for block selection. A click of the right mouse button will select the current field as a Field block in the same way that the Power Menu does. A drag of the mouse, with the right mouse button depressed, will select various types of blocks in the same manner as the cursor keys. As with all the block selection methods, an imaginary rectangle is formed by the starting and ending position of the cursor during the drag operation. If the cursor is move to the left or up, blocks are defined literally, meaning that only the text that is literally within the rectangle is included in the block. If the cursor is moved to the right or down, then any logical field touching the rectangle is included. For logical selection, each complete field is included in the block selected, even if it is not fully within the rectangle defined. The exception to this complete field rule, is for the starting and end points of a Character or Sentence block, which are always trimmed to the exact starting and ending points. This literal and logical stuff may seem a little complicated, but after you try it a few times, it makes more sense. Here, I'll describe how each type of block is selected. If the cursor is dragged to the right, over any line of text, you will be selecting a Character block. A Character block is one or more characters, but is always within one field and on one line. To select just one character, drag to the right then back to the left over that one character. It will be selected even though it may just look like the text cursor is over it. Character blocks can be selected from word-wrapped or normal non-word-wrapped text. Escape to clear the selection. For our next block definition we will need some word-wrapped text. This paragraph will do if you are looking at the screen, or you may need to set Word Wrap on some existing text (see Word-Wrap under Formatting Text). In either case, the text cursor should be blue if it is over word wrapped text. If you position the cursor over any word-wrapped paragraph and then drag down one or more lines, you will notice that complete Fields are selected, except that the begin and end points are trimmed on the first and last line. This is called a Sentence block and is made up of one or more sentences or sentence fragments. It must always be within a single paragraph, and include two or more lines (if it's only one line, it becomes a Character block). It will only select in word-wrapped text. If you do a right drag over any part of the Silly Fields Table below, you will notice a Character block being selected, just as in word-wrapped text. Just as before, the Character block will be trimmed until you pass the end of the field. At this point it becomes a Field block and selects the whole field. If you continue dragging to the right or down, each whole field will be selected as you touch it. This is a logical Field block selection. You may also notice that you do not have to encompass the field; you only need to touch it. A Field block is made up of one or more complete Fields. Field blocks are important since they will Paste and Move differently from the other types of blocks. Silly Fields Table These are fields These are fields These are fields These are fields These are fields These are fields These are fields These are fields These are fields Now, let's try some literal selections. If you start on the lower right side of the Silly Field Table, and select to the left, once again you will be selecting a Character block just like in the logical selection as described above. If however, you continue to the left past the beginning of the Field and into another Field, you will notice that unlike the logical selection, the Field block is trimmed. Now continue selecting up one or more lines. This style of trimming becomes more apparent. Only the characters within the selection rectangle are included. This selection is still a Field block since Sudden View will split these existing fields to form new fields as needed, whenever a Copy, Cut, Paste or Move is performed. This type of literal selection is very useful for taking apart and re-arranging tables. For instance, you could pull the pennies off of a price column if you liked. I'm sure you will discover other uses. It allows block operations to be done in a more universal and consistent fashion. There is only one type left to select, and that is the Line block; but they're real easy. If you drag the right mouse button up and to the right, a Line block will be selected. Line blocks contain one or more lines and are always the full width of the document. Literally everything on the line is included. This is how you would normally select large chunks of a file, maybe pages or chapters at a time. To select only one line using the mouse, just drag back down to one line after selecting two or more lines. If you like, you can select a large part of the file by doing both a right and left drag. You can also do a right drag up and to the right and then doing a left click on the scroll bar to take you up the file one or more pages. You can then finish the right drag to define the Line block. That's it! You now know how to select all four different types of Sudden View blocks, as well as literal and logical Field Block selection. Let's summarize. Sudden View block types: 1. Character block - one or more characters from any single field on any single line. 2. Sentence block - a multi-lined Character block which can only be selected from a single word-wrapped paragraph. 3. Field block - any collection of one or more complete fields. Can be selected literally or logically. 4. Line block - one or more full lines. Cursor moves for block selection: 1. Right - Character or logical Field block 2. Down - Sentence or logical Field block 3. Left - Character or literal Field block 4. Left and Up - literal Field block 5. Right and up - Line block Copy and Cut Once you have selected a block, you can either Copy or Cut it. Actually, you can also Move it, but a Move does an implied Cut and Paste so we'll cover it later. First let's do Copy and Cut, it'll be quick and easy. If you do a right click on any Field, it will turn gold to indicate that it has been selected. If you do a right click again with the mouse pointer in the gold area, it will be de-selected... and also... copied to the paste buffer. If you want it de-selected, but not copied to the buffer, use the Escape key or do the right click over a blank area where no text field exist. If you do a right click over another text field that is not gold, it will de-select the first field without copying it to the buffer, but it will also select the new field as a text block. Remember, Escape will usually get you out of whatever you're in. If you want to delete or "Cut" the block, do a left click instead of a right click with the mouse cursor in the gold area. If you didn't really want it Cut, just hit the Undo key. Outside the gold area, the left click will de-select the block and place the cursor in a normal manner. You also will notice that you can Copy and Cut a block using the Power Menu, once a block has been selected. By the way, a Cut also does an implied Copy, so the buffer always contains a copy of whatever you have just deleted or cut. There are also other ways that things get copied to the buffer. If you use any of the Delete functions (Delete Character, Delete Word, Delete Field, Delete Sentence, Delete Line or Delete Lines), the item deleted will also be copied to the buffer. Also any text which has been replaced will end up in the buffer for possible later use. Copy and Cut are easy; just remember, once you select a block, it turns gold; then left click for Cut, right click for Copy and Escape for I'm confused. And if you didn't mean to Cut, hit the Undo key. Paste The Paste function is how something is copied from the buffer back into the file, or any other file for that matter. The Paste operation does not remove the object from the buffer, so it can be pasted as many times as you wish. The action of the Paste operation depends upon the text cursor position, block type and the type of existing text that you are pasting into. But before I go into all that, let's cover this cut/paste buffer. Sudden View's buffer is a bit different from those of other editors or word processors. It not only keeps a copy of the last block Copied, Cut or Deleted, it stacks up the last twenty such blocks! This rotating stack approach to the buffer offers several advantages in manipulating text. Some word processors do allow you to undo the editing process; but to recover deletes, you must also undo everything else you have done since the delete. Sudden View focuses this type of feature on only the data in question, and not on the process. Because of this, Sudden View's buffer stack can be used for more than just data recovery. It can actually become a very dynamic scratch pad for doing all sorts of text object duplication and arrangement. For instance, if there are three separate fields that you want copied from chapter four to chapter fourteen, you don't have to bounce back and forth between chapters three times. You would simply copy each of the fields into the buffer by selecting and de-selecting. After going to chapter fourteen, you would selectively paste each of the fields into its proper place by rotating the buffer as you paste. Let's go through the detail to make this example a little clearer. First we'll need to put something into the buffer. Just double right click on several different fields from the Block Selection summary; then come back here (check the line number before you leave). Now place the text cursor by doing a left click on any blank line. If you left click again on the text cursor after it has already been placed, it will activate the paste buffer which is indicated by displaying a blue text object at the cursor location. This means that the buffer is activated and the bottom entry is being shown on the screen in blue. At this point you can rotate the buffer stack using the Power Menu, or if you have the personalized version of Sudden View, by dynamically scrolling the Buffer (see below). With the Power Menu, just hit the Last Block or Next Block menus as many times as you choose. After you have selected the element of the buffer that you want to paste, you can do so with a right click or the Power Menu. The blue text object will turn white and be integrated into your file just as it is shown. You can repeat this process as many times as you like. At any time before you actually Paste Block, you can escape using the Escape key or left click, and the buffer will be hidden again. The previous example shows the power of the buffer, but it might help to understand it better if we try an even simpler example. First, delete one character using the Delete key. Now hit the Undo key one time. This is actually the fastest way to do a Cut to buffer / Paste operation. When you deleted the character, a copy was put into the buffer. The Undo key displayed the buffer contents and then Pasted it. If you look closely, you may even see a flash of blue as the buffer is being displayed. Hit the Undo key a couple of more times; you'll see it paste a copy of the bottom entry of the buffer stack each time you hit the Undo key. This example brings up the one exception to deleted text being pushed on to the buffer stack. If you are deleting or replacing characters, and the total number of characters deleted or replaced without moving the cursor is less than four characters, it will be placed on the bottom entry of the buffer stack like normal; but it will not be automatically pushed up when the next copy, cut, delete or replace occurs. This exception is to keep the stack from becoming cluttered with minor entries. The exception is not valid if a small Character block is Cut or Copied using the formal block commands. All formal blocks are always pushed onto the buffer stack, regardless of size. Now on to what happens when we Paste. The actual paste operation will vary depending upon block type and existing text type and location. These differences are reflected in the blue display when you Show Buffer; so what you see, is what you get. A Line block integrates at the line level. Thus, it will only push existing lines down before the block insert is done. Margins are maintained and the paste will not affect existing text in any other way. A Field block integrates at the field level, at least most of the time. In other words, if there is not enough room to paste in the margin, it will push existing fields to the right before Pasting (this is what you see dynamically during a Move). If you Paste a Field directly on top of existing text, something different happens. The Field block will act like a Line block and integrate at the line level by pushing lines down instead of integrating with the existing fields (you may notice that this aspect is suppressed during the Move operation). Another interesting detail about Pasting Field blocks is that when they are copied to the buffer, the right margin is extended for each line so a perfect rectangle is formed. Then when Field blocks are Pasted, existing fields are pushed out to this nice even boundary. This is so "C" shaped Field blocks don't "capture" existing text when being Pasted or Moved. Pasting Field blocks also can do multiple field joins in certain situations. If a Field block is pasted so some or all of the left hand fields just touch the right edge of existing fields, then the existing field and the new pasted fields will be automatically joined to form one combined field. This joining is more obvious during the Move operation. Joining does not happen if the existing field is a word-wrapped field. Other than that, the new joined field will take on the characteristics of the existing field. Field joining is the opposite of a literal Field block Cut, in which one existing field is split into two. Now on to Sentence blocks. A Sentence block will fully integrate at the character level in any existing word-wrapped text. It also will assume the format of the existing text. If a Sentence is pasted any where else, it will integrate at the line level just like a Line block, maintaining is own word-wrapped setting and format. So, how about Character blocks? A Character block will completely integrate or join at the character level anywhere it is pasted, margin or not, wrapped or not. If it is pasted into word-wrapped text, it will assume the format of the existing text, automatically re-wrapping the existing text. If it is Pasted into a normal text field, it will adopt the existing format. If it is Pasted into blank space, it will use its own format. The Character block is an all-together agreeable type of guy. You have just learned about the most difficult and powerful aspect of Sudden View. I call it the rules of integration for text blocks. Here, let me summarize: Rules of Integration 1. Blocks generally integrate at their own level. 2. Line blocks ONLY integrate at line boundaries. 3. Field blocks integrate at field boundaries unless Pasted on top of existing text, in which case they integrate at line boundaries. 4. Sentence blocks integrate at character boundaries in word-wrapped sentences, otherwise they integrate at line boundaries. 5. Character blocks integrate anywhere, anytime. Now you know why Sudden View has different types of blocks. It may seem a bit complicated right now, but once you start using it, it gets easy, very fast. It also allows for a very powerful manipulation of text objects which can't be done as directly in other programs. Don't worry about learning the formal type definitions; you will see them visually, and quickly learn their characteristics. Paste Buffer Scrolling If you have the personalized version of Sudden View, you can dynamically scroll the Paste Buffer using a right drag. You need to be careful with this at first; it's very fast, and if you blink, you may miss the block you want to select. We recommend that you use the Power Menu until you get use to the way the mouse works. Once you get the hang of it, this feature can make arranging and duplicating text extremely fast. In an instant, you can recover and Paste something you may have deleted ten minutes ago. You also can copy a collection of blocks and then paste them somewhere else in a different order without ever selecting a menu. Move The Move function is not indicated in the Power Menu or anywhere else. Instead of being explicitly stated, it implicit in cursor control or right mouse dragging once a block is selected. In other words, once you have selected a block, and it has turned gold, you can move it using the cursor keys or the mouse. For a mouse Move, make sure that the mouse cursor is within the gold area, and then do a right drag to wherever you want the block to be. If you have the personalized version of Sudden View, you can do a Ballistic Move as defined below. You will quickly notice that Moves do not move over top of other text. Instead, they tend to "part the waters", like the Red Sea in the Bible. The way the water is parted, depends upon the type of block and the type of text that the block is being moved through. This is so whatever you see at any time, is exactly what you will get, if you stop and de-select the block or escape. Since moves are just a series of Cuts and Pastes, you could assume that the blocks would move through existing text according to the same rules of integration which were defined in the Paste section above. With one exception, your assumption would be correct. When moving Field blocks, they never integrate at the line level, even when moved directly over existing text (things get too visually frantic if you do that). Therefore when moving Field blocks, they always push existing fields to the right. So, with this exception out of the way, let's review what happens during block moves of different types of blocks through different types of text. Line blocks are very clean. They part the existing file at line boundaries and flow in a very obvious way; but only up or down. Field blocks take a little getting used to as they part existing text at field boundaries, pushing everything to the right as they go through. This brings up one very important point. Remember, as with any block, where you leave it is what you get. After you de-select the Field block, you can re-select it again and move on, but the existing fields may not flow back to where they were before you de-selected. Try it, you'll see what I mean. There are a couple of other pointers that may help you in your management of Field blocks. Avoid forming Field blocks with irregular left margins and try to work from the right to the left when doing a literal dissection. These two items can cause what at first glance appears to be very strange behavior, but actually conforms to the standard model. This is because, where the existing fields "belong" is set on acceptance, which occurs whenever the block is de-selected. If you are dragging a Field block through foreign territory, don't de-select it until you are ready to accept what you see. This sounds worse than it is; it only takes a few seconds to fix if you happen to mess it up. If a normal Field block is selected in The Fields Below from point A to point B as indicated, you will be selecting a Field block with a reversed C shaped left margin. If you now try to move this Field block, the non-selected field in the "bay" will be immediately pushed to the right since it is not included in the original block selection. This is a bit startling, but is entirely consistent with the rules of integration as defined above. This type of confusion can be dealt with or avoided altogether by moving the block in three horizontal pieces. The Fields Below Point A field location Far right fields Some more text Far right fields Field in the bay Another field Far right fields Here we go Far right fields This is Point B Far right fields The Fields Below (now above) also can be used for our next example. If you do a Literal selection from point B to point A, and then move the selected block right, things may seem kind of strange. When you delete part of a field, as in the above move, the two remaining parts of the field are joined to the left, creating a larger margin for the next field to the right. When the cut field is again pasted, what was left from the cut field is now a separate field making the remaining and the far right fields move to the right by the width of the pasted field. Again, the rules of delete and integration push things to the right if there is not room where they are. Play with it a little, it'll make more sense. The simplest way to deal with this situation is to take the field apart from the right by selecting the rightmost portion first and move it to the right. You can then select the middle portion and put it wherever you like. If you then re-join the two remaining parts of the field, no margin adjustments are necessary. Again, disassemble from the right to the left. Changing the rules for these situations would actually cause more confusion than it would solve (it would require another block type and behavior), so I have left it as it is. It's not really a big problem once you understand how it works, and besides, it gives the program some character. Oh well, onward! Sentence blocks act like Line blocks, unless you are moving them through word-wrapped text, in which case they act like a long Character blocks and fully integrate at the character level. One interesting feature about moving Sentence blocks through wrapped text is what happens when you move past the end of the line. If you are using cursor keys, the text cursor gets wrapped down to the next line, but will not wrap back up. This is consistent with standard word wrap. Use the up arrow if you need the Sentence back on the line above. Using the mouse in the same situation, has a little different effect. The key to its behavior is the text cursor position. If it goes too far to the right, the Sentence block will act like a Line block again. A Character block will push through and integrate into any type of text, word-wrapped or not. Like Lines, the Character block is an obvious and effective tool for manipulating text, even if it's only one character. Now you are a master of block movement; well almost, practice will help. Something that I haven't mentioned, but will become quickly obvious, is that even though there are only four different types of blocks, there are thousands of ways of using and combining them. You can pre-trim or post-trim Field blocks if needed for certain situations; you can adjust tables in lots of ways. Or you might even want to split a paragraph horizontally, reformat it to be in two columns, side by side and then make them two entries in a larger table. The best way to find out if you can do something is try! Sudden View generally allows you to recover from almost any situation, but just in case, keep plenty of back-ups. Ballistic Move If you have the personalized version of Sudden View, you can do a Ballistic Move of any block. It has this name because when you do the move, the block stands still and the text moves underneath it. It appears that you are tracking a cruise missile from the air. To do one, just start a normal move but then hold down both mouse buttons, the block stands still on the screen and your file moves. This allows you to move a block very quickly over great distances (you also can use Fast Dynamic Scrolling for this). As with other advanced features, this can be visually strange, but very quickly fun. Don't worry, it won't explode when you reach your target; but it may move around a little. Just let up on both buttons and re-grab it for final positioning if needed (the text cursor may become displaced from the mouse cursor during the Ballistic Move). One special exception should be noted here. If the block that you are moving is a multiple Field Block, you can drag it past the end of the file, creating lots of blank lines at the end of your file. This feature may be handy in certain cases.