Thursday, March 29, 2012

Conflict Management

We are ready to represent the best custom paper writing assistance that can cope with any task like Conflict Management even at the eleventh hour. The matter is that we posses the greatest base of expert writers. Our staff of freelance writers includes approximately 300 experienced writers are at your disposal all year round. They are striving to provide the best ever services to the most desperate students that have already lost the hope for academic success. We offer the range of the most widely required, however, not recommended for college use papers. It is advisable to use our examples like Conflict Management in learning at public-education level. Get prepared and be smart with our best essay samples cheap and fast! Get in touch and we will write excellent custom coursework or essay especially for you.



Linux - The Vi Editor


Powered By Beginners.co.uk


Category Linux


Submitted By GTS Learning


Do my coursework


Published Date 8th May 001


Viewed 614 times


From Course LINUX User Introduction


Vi is a screen-oriented display editor. It offers a powerful set of text editing operations based on a set of mnemonic commands. Most commands are single keystrokes that perform simple editing functions.


vi displays a full screen window into the file you are editing. The contents of this window can be changed quickly and easily within vi. While editing, visual feedback is provided (the name vi itself is short for visual).


Vi is one of three standard editors on the Linux system, the other two being


· ed - This is a line editor. While powerful in its own right, it is tedious to use.


· ex - This is another line editor, but with the same powers and commands as vi the names vi and ex - identify a particular user interface rather than any underlying functional difference.


In both ex and ed, visual updating of the terminal screen is limited, and commands are entered on a command line. Vi, on the other hand, is a screen-oriented editor designed so that what you see on the screen corresponds exactly and immediately to the contents of the file you are editing.


Linux offers further editors, such as joe, pico and emacs (although the latter has been available for some years before Linux was created). Although both joe and pico are relatively easy to use, this course only looks at the vi editor, because of its power and flexibility and also because it is an industry standard that is widely available, not only on Linux and Unix, but also on other operating systems.


Starting vi


The syntax of the vi command is


Vi [file . . .]


Vi performs no editing operations on the file that you name during invocation. Instead, it works on a copy of the file in an editing buffer. When you invoke vi with a single filename argument, the named file is copied to a temporary editing buffer. The editor remembers the name of the file specified at invocation, so that it can later copy the editing buffer back to the named file. The contents of the named file are not affected until the changes are copied back to the original file.


Exiting vi


There are several ways to exit the editor


· ZZ The editing buffer is written to the file only if any changes were made.


· x The editing buffer is written to the file only if any changes were made.


· q! Cancels an editing session. The exclamation mark ( !) tells vi to quit unconditionally. In this case, the editing buffer is not written out. If no alterations have been made to the file, the exclamation mark may be omitted.


The quit command may be combined with the write command - w - to produce an alternative to ZZ


wq Write and quit.


Modes of Operation


Within vi there are three distinct modes of operation


· Command Mode


Within Command Mode; signals from the terminal are interpreted as editing commands.


· Edit Mode


This mode can be entered by typing any of the vi insert, append, open, substitute, change, or replace commands. Once in insert mode, letters typed at the keyboard are inserted into the editing buffer.


· ex Escape Mode


The Vi and ex editors are one and the same editor differing mainly in their user interface. In vi, commands are usually single keystrokes. In ex, commands are lines of text terminated by a Return. Vi has a special escape command that gives access to many of these line-oriented ex commands. To use the ex escape mode, type a colon (). The colon is echoed on the status line as a prompt for the ex command. Most file manipulation commands are executed in ex escape mode.


Command Mode


Cursor Movement


The cursor movement keys allow you to move your cursor around in a file


Forward Space l, Spacebar or arrow key


They move the cursor forward one character, along the line it is on. If the cursor is moved to the end of the present line, using one of these keys, further use will not affect the cursor position.


If a number is entered before the key is pressed, the movement will be that number of spaces. For example 5Spacebar moves the cursor 5 characters forward.


Backspace h, Backspace or arrow key


They move the cursor backward one character, along the line it is on. If the cursor is moved to the beginning of the present line, using one of these keys, further use will not affect the cursor position.


If a number is entered before the key is pressed, the movement will be that number of spaces. For example 5Backspace moves the cursor 5 characters backward.


Next Line +, Return, j, Ctrl -n or arrow key


+ and Return


moves the cursor down to the beginning of the next line.


j, Ctrl - n and the arrow key


move the cursor down one line, remaining in the same column.


If a number is entered before the key is pressed, the movement will be that number of lines. For example 5j moves the cursor 5 lines downward.


Previous Line -, k, Ctrl -p or arrow key


-


moves the cursor up to the beginning of the next line.


k, Ctrl - p and the arrow key


move the cursor up one line, remaining in the same column.


If a number is entered before the key is pressed, the movement will be that number of lines. For example 5k move the cursor 5 lines upward.


Linux - The vi Editor (Page )


Powered By Beginners.co.uk





Category Linux


Submitted By GTS Learning


Published Date 8th May 001


Viewed 6150 times


From Course LINUX User Introduction


vi is a screen-oriented display editor. It offers a powerful set of text editing operations based on a set of mnemonic commands. Most commands are single keystrokes that perform simple editing functions.


Word Forward


w


Moves forward a word defined as a string of alphanumeric characters separated by punctuation or whitespace (ie, tab, newline, or space characters).


W


Moves forward a word defined as a string of non-whitespace characters.


If a number is entered before the key is pressed, the movement will be that number of words. For example 5W moves the cursor 5 words forward.


Back Word


b


Moves backward a word defined as a string of alphanumeric characters separated by punctuation or whitespace (for example,, tab, newline, or space characters).


B


Moves backward a word defined as a string of non-whitespace characters.


If the cursor is already within a word, it moves backward to the beginning of that word.


If a number is entered before the key is pressed, the movement will be that number of words. For example 5B moves the cursor 5 words backward.


End of Word


e


Moves the cursor to the last character of a word, where a word is defined as a string of alphanumeric characters separated by punctuation or whitespace (for example, tab, newline, or space characters).


E


Moves the cursor to the last character of a word where a word is defined as a string of non-whitespace characters.


If the cursor is already within a word, it moves to the end of that word.


If a number is entered before the key is pressed, the movement will be that number of words. For example 5E moves the cursor the end of the 5th word.


Beginning of Line


0 (zero)


Moves the cursor to the first character of the current line.


^ (caret)


Moves the cursor to the first character on a line that is not a tab or a space. This is useful when editing files that have a great deal of indentation, such as program texts.


End of Line


$


Moves the cursor to the last character of the current line.


If a number is entered before the key is pressed, the movement will be to the end of the (number - 1) line down. For example 5$ moves the cursor to the end of the 4th line down.


Goto Line


The syntax is [linenumber]G


This moves the cursor to the beginning of the line specified by linenumber. If no line number is given, the cursor moves to the beginning of the last line in the file.


To find the line number of the current line, use Ctrl -g.


Home H


This moves the cursor to the upper left corner of the screen. Use this command to quickly move to the top of the screen.


If an offset is given, the cursor is homed offset-1 number of lines from the top of the screen.


Note The command dH deletes all lines from the current line to the top line shown on the screen.


Middle Screen M


This moves the cursor to the beginning of the screens middle line. Use this command to quickly move to the middle of the screen from either the top or the bottom.


Note The command dM deletes from the current line to the line specified by the M command.


Lower Screen L


This moves the cursor to the lowest line on the screen. Use this command to quickly move to the bottom of the screen.


Note The command dL deletes all lines from the current line to the bottom line shown on the screen.


The Screen Commands


The screen commands are not cursor movement commands and cannot be used in delete commands as the delimiters of text objects. However, the screen commands do move the cursor and are useful in paging or scrolling through a file.


Page Forward


The syntax is [number]Ctrl - f


This pages the screen forward. Two lines of continuity are kept between pages if possible.


A preceding number gives the number of pages to move forward.


Page Backward


The syntax is [number]Ctrl -b


This pages the screen backward. Two lines of continuity are kept between pages if possible.


A preceding number gives the number of pages to move backward.


Scroll Up


The syntax is [size]Ctrl -u


This scrolls the screen up a half window.


If size is given, the scroll is size number of lines. This value is remembered for all later scrolling commands.


Scroll Down


The syntax is [size]Ctrl -d


This scrolls the screen down a half window.


If size is given, the scroll is size number of lines. This value is remembered for all later scrolling commands.


Status


Ctrl -g


Gives the name of the file being edited, whether it has been modified, the current line number, the number of lines in the file and the percentage of the file (in lines) that precedes the cursor.


Searching


The search commands search either forward or backward in the editing buffer for text that matches a given regular expression.


String Search


/[pattern] Return search forward for the pattern.


?[pattern] Return search backward for the pattern.


If no pattern is given, then last pattern searched for is used.


Preceding the pattern with the caret (^) searches for the pattern at the beginning of the line only.


Ending the pattern with the dollar ($) sign searches for the pattern at the end of the line only.


The search is cyclic. That is, if the pattern cannot be found from the present cursor position in the file, the search will continue from the beginning - for forward search - or the end - for backward search - of the file.


The characters . [ / $ ^ and ~ have to be escaped in a pattern search. That is, each requires a backslash () in front of them.


Next String


They repeat the last search command


n


repeats the search in the same direction as the last search command.


N


repeats the search in the opposite direction of the last search command.


Linux - The Vi Editor (Page )


Powered By Beginners.co.uk


Category


Linux


Submitted By


GTS Learning


Published Date


8th May 001


Viewed


6150 times


From Course


LINUX User Introduction


vi is a screen-oriented display editor. It offers a powerful set of text editing operations based on a set of mnemonic commands. Most commands are single keystrokes that perform simple editing functions.


Find Character


fchar


Searches forward on the current line for the character char.


Fchar


Searches backward on the current line for the character char.


The semicolon (;) repeats the last character search.


The comma (,) reverses the direction of the search.


Edit Mode


Text Insertion


Insert


i


Insert at the cursor position.


I


Insert at the beginning of the present line. The cursor may be at any position on the line when I is pressed.


· To exit Insert Mode, press the Esc key


If a number is keyed before pressing i or I, the text inserted will be repeated that number of times, after the Esc key has been pressed. For example 5iEsc will result in


Append


a


Append after the cursor position.


A


Append at the end of the present line. The cursor may be at any position on the line when A is pressed.


· To exit Append Mode, press the Esc key


If a number is keyed before pressing a or A, the text inserted will be repeated that number of times, after the Esc key has been pressed.


Open New Line


o


Open new line below the cursor position.


O


Open new line above the cursor position.


The cursor may be at any position on the line when o or O is pressed.


· To exit Open Mode, press the Esc key


Text Deletion


Many of the text deletion commands use the d key as an operator. This operator deletes text objects delimited by the cursor and a cursor movement command. Deleted text is always saved away in a buffer.


Delete Character


x


Delete the character at the cursor position.


X


Delete the character just before the cursor position.


If a number is keyed before pressing x or X, then that number of characters will be deleted.


In keeping with the d commands listed below, dl also deletes a single character and numberdl deletes that number of characters. The l is the Forward Cursor command (see section on Cursor Movement).


Delete Word


dw


Delete the word at the cursor position. A word is defined as a string of alphanumeric characters separated by punctuation or whitespace (for example, tab, newline or space characters).


dW


Delete the word just before the cursor position. A word is defined as a string of alphanumeric characters separated by whitespace only.


If a number is keyed before pressing dw or dW, then that number of words will be deleted.


If the cursor position is partway through a word when dw is pressed, all characters from the cursor position to the beginning of the rest of the word will be deleted.


Delete Line


dd


Delete the line at the cursor position. A line is defined as a string of alphanumeric characters terminated by a newline character.


If a number is keyed before pressing dd, then that number of lines will be deleted.


Delete Rest of Line


D


Delete the rest of the line from the cursor position. A line is defined as a string of alphanumeric characters. terminated by a newline character.


Other Delete Commands


As may be seen by the dw and dW commands, they are the word commands listed in Section on Cursor Movement, prefixed with the letter d. All other Cursor Movement commands may be similarly prefixed. Therefore


d0 and d^


Delete to the beginning of a line.


de and dE


Delete to the end of a word, without deleting the separator to the next word.


db and dB


Delete back a word.


dG


Delete to end of file.


Text Modification


The text modification commands all involve the replacement of text with other text. This means that some text will necessarily be deleted.


Replace Text


r


Replace the character at the cursor position.


R


Replace a series of characters from the cursor position. To terminate the replacement, the Esc key has to be pressed.


If a number is keyed before pressing r or R, then that number of replacements will be done. For example 5r will replace the 5 characters, from the cursor position with an asterisk each.





Linux - The Vi Editor (Page )


Powered By Beginners.co.uk


Mind that the sample papers like Conflict Management presented are to be used for review only. In order to warn you and eliminate any plagiarism writing intentions, it is highly recommended not to use the essays in class. In cases you experience difficulties with essay writing in class and for in class use, order original papers with our expert writers. Cheap custom papers can be written from scratch for each customer that entrusts his or her academic success to our writing team. Order your unique assignment from the best custom writing services cheap and fast!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.