Scrolling and Selecting Text. Source Dynamics Source Insight 4.0
تبلیغات
تبلیغات
Scrolling and Selecting Text
Scrolling and Selecting Text
Scrolling around the selecting text is a basic operation, and there are a lot of commands for doing some variation of those things.
In Source Insight, a selection is a range of zero or more characters highlighted in a source file window.
Selected text is highlighted and displayed in the "Selection" style; usually an inverse color. You can change the look of selected text by editing the Selection style in Options > Style Properties.
Each source file window has its own single selection. Switching between windows leaves the selections in each window intact. The selection in the current window and current file is referred to as the current selection.
Selections can be made with the keyboard and the mouse. Commands used for selecting text are listed below. To select text with the mouse, simply point at the text and drag across it. Double-clicking the left mouse button selects a whole word.
Scrolling the window will only change the selection if the "Keep cursor in window when paging up and down" option is turned on in the Options > Preferences: General dialog box. Otherwise, only cursor movement keys, pointing with the mouse, or editing your file will change the selection.
Moving Through a File
There are many commands to move you around in a file. It's important to know that there are two types of movement: selecting and scrolling.
Selecting is moving the current selection (usually an insertion point) around in the file.
Scrolling is when the file window is scrolled to reveal new parts of the file. You can scroll a window up, down, left, and right. Scrolling does not always affect the location of the selection.
Selection commands can cause scrolling to occur if the place you are selecting is not visible in the window.
For example, if the cursor is on the bottom line of a window and use the Cursor Down command, the window is scrolled to reveal the line below.
Scrolling Commands
The scrolling commands scroll the active window. They do not affect the current selection. They only affect the window.
Command
Scroll Line Up
Scroll Line Down
Page Up
Page Down
Scroll Half Page Up
Table 3.9: Scrolling Commands
Key
Alt+Up
Alt+Down
PgUp
Scroll Half Page Down
Scroll Left
Scroll Right
PgDn
Ctrl+PgUp
Ctrl+PgDn
Alt+Left
Alt+Right
Description
Scrolls up by one line
Scrolls down by one line
Scrolls up by a window full
Scrolls down by a window full
Scrolls up by half a window
Scrolls down by half a window
Scrolls left by aprox. 1 tab stop
Scrolls right by aprox. 1 tab stop
Source Insight 4 User Guide 113
Scrolling and Selecting Text
Selection Commands
The selection commands change the current selection. Usually, if the resulting selection is not visible in the window, the window is scrolled to show it. These commands change the selection to an insertion point and move it to a new location in the file.
Word Left
Word Right
Function Down
Function Up
Paren Right
Table 3.10: Cursor Movement Commands
Command Key
Cursor Down
Cursor Up
Cursor Left
Cursor Right
Down Arrow
Up Arrow
Left Arrow
Right Arrow
Beginning of Line
End of Line
Top of File
Bottom of File
Home
End
Ctrl+Home
Ctrl+End
Beginning of Selection Ctrl+Alt+[
End of Selection
Top of Window
Bottom of Window
Word Fragement Left
Word Fragment Right
Blank Line Down
Blank Line Up
Paren Left
Blank Line Up
Blank Line Up
Block Up
Block Down
Go To Line
Ctrl+Alt+]
Ctrl+Left
Ctrl+Right
Keypad +
Keypad -
Ctrl+9
Ctrl+0
Ctrl+Shift+{
Ctrl+Shift+}
F5,
Ctrl+G
Description
Move down by one line.
Move up by one line.
Move left by one character.
Move right by one character.
Move to beginning of line.
Move to end of line.
Move to top of file.
Move to end of file.
Move to start of an extended selection.
Move to end of an extended selection.
Move to top of window.
Move to bottom of window.
Move left by one word.
Move right by one word.
Move left by a word fragment.
A fragment is a section of characters bounded by a change in case or punctuation. You can use this for camel-case words, such as
"OpenFileCore"
Move right by a word fragment.
Move to next function definition.
Move to previous function definition.
Move to next blank line.
Move to previous blank line.
Move to previous enclosing parentheses.
Move to next enclosing parentheses.
Move to previous blank line.
Move to previous blank line.
Move to previous { block level.
Move to next { block level.
Move to a specified line number.
114 Source Insight 4 User Guide
Scrolling and Selecting Text
Command
Search
Search Forward
Table 3.10: Cursor Movement Commands
Search Backward
Search Forward for
Selection
Selection History
Key
Ctrl+F
F4
F3
Shfit+F4
Ctrl+Shift+M
Description
Search for occurrence of a pattern.
Search for next occurrence.
Search for previous occurrence.
Searches for next occurrence of the word under the cursor.
Displays a list of your past selections.
Extending the Selection
These commands will create an extended selection or extend an existing selection. The keystrokes listed are the defaults.
Command
Select All
Select Block
Select Function Or
Symbol
Select Char Left
Select Char Right
Select Line
Select Line Down
Select Line Up
Select Match
Select Sentence
Select Word
Table 3.11: Selection Commands
Key
Hold down Ctrl and click the mouse in the selection bar at the left.
Ctrl+-
Description
Select the whole file.
Double-click in selection bar at the left of edge of the window
Shift+Left
Shift+Right
Shift+F6
Shift+Down
Shift+Up
Alt+=
Shift+F7,
Ctrl+.
Selects the next smallest enclosing set of braces or parentheses.
Select the whole enclosing symbol definition.
Extends selection to the left by one character.
Extends selection to the right by one character.
Selects whole line.
Extends selection down a line.
Extends selection up by a line.
Selects up to the matching brace, parentheses, or quote mark.
Selects whole sentence (up to the next period).
Selects whole word.
Shift+F5, and
Double-click L. Mouse
Source Insight 4 User Guide 115
Scrolling and Selecting Text
Command
Select Word Left
Select Word Right
Select To
Select To Top Of File
Select To End Of File
Toggle Extend Mode
Table 3.11: Selection Commands
Key
Ctrl+Shift+Left
Select To End Of Line
Ctrl+Shift+Right
Shift+L. Mouse
Shift+Home
Shift+End
Description
Extends selection to include the whole word on the to the left.
Extends selection to include the whole word on the to the
Right.
Extends the selection to the current mouse location. This is assigned to the mouse.
Selects up to the beginning of the file.
Selects up to the end of the file.
Selects up the end of the current line.
When on, movement keys extend the selection.
The Toggle Extend Mode command toggles Extend Mode on and off. When Extend Mode is on and you use a movement command, such as Cursor Left, the current selection is extended in that direction.
See “Browsing and Analysis” on page 72.
Selection Shortcuts
Source Insight provides many short cuts for selecting meaningful objects within your source code.
Source Insight has a "selection bar" area in the left margin of each source file window. Many shortcuts involve clicking in the selection bar.
Selecting Whole Words
Simply double-click on a word to select the whole word. You can drag out a selection in this mode to select whole words.
Selecting Whole Functions or Symbols
To select a whole function, struct, or other type of symbol, simply double-click in the selection bar area of a source file window. If you hold the mouse button down and drag, Source Insight will select whole functions or symbols as you drag.
You can also use the Select Symbol command to select the symbol that encloses the current text selection.
The Symbol Window (on the left of the source file window) also can be used to select whole symbols. Doubleclicking on any entry in the list will select the symbol.
116 Source Insight 4 User Guide
Scrolling and Selecting Text
Selecting Matching Parentheses and Blocks
To select to the matching brace or parentheses, double-click on any parentheses, square brace, curly brace, or double-quote mark. Source Insight selects up to its match. The Select Match command (Alt+equal) also selects up to the matching brace or parentheses.
Selecting the Enclosing Block
The Select Block command (Ctrl+minus) selects the enclosing block. An enclosing block is one that is surrounded by either a parentheses, square brace, or curly brace. If you repeat this command, it will select the next outer-most block.
Selecting a Whole Line
To select a whole line of text, simply click in the selection bar. A whole line of text will be selected. If you hold the mouse button down and drag, whole lines will be selected. The Select Line command (Shift+F6) also selects a whole line.
Selecting the Whole File
To select the whole file, hold down the Ctrl key and click the mouse in the left margin. Or, use the Select All
(Ctrl+A) command.
Selecting a Paragraph of Text
click in the selection bar to select a whole paragraph of text.
A paragraph is defined as a group of text lines surrounded by blank lines.
Selecting Between Lines
Source Insight allows you to select in between lines by providing a wedge shaped cursor when the cursor is near the start of a line and slightly above or below it. When you click at that point with the mouse, Source
Insight selects the space between the lines. If you start typing, Source Insight automatically inserts a line break first. This is a handy way to insert a new line.
Source Insight 4 User Guide 117
Scrolling and Selecting Text
The Overview Scroller
The Overview scroller is an optional control which appears at the right edge of source file window. It shows a miniature version of you file, along with function boundary markers.
See “The Overview Scroller” on page 25.
118 Source Insight 4 User Guide
دانلود
تبلیغات