ViewVC logotype

Contents of /trunk/www/working/basic-vi.html

Parent Directory Parent Directory | Revision Log Revision Log

Revision 183 - (show annotations)
Mon Jul 4 13:31:17 2011 UTC (10 years, 2 months ago) by sng
File MIME type: text/html
File size: 12551 byte(s)
- Fixing a misplaced cd command in usb.html
- Adding a basic tutorial (basic-vi.html)
- Updating trunk site

1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <link rel="alternate" type="application/rss+xml" title="RSS" href="http://clonezilla-sysresccd.hellug.gr/clonezilla-sysresccd.rss">
5 <link rel="shortcut icon" href="favicon.ico">
6 <title>Clonezilla-SysRescCD - Documentation: Getting backups</title>
7 <style type="text/css">
8 body { font-family: Arial, 'sans serif'; color: black; font-size: 12pt; background : fixed no-repeat; background-color: #333333; padding: 0; margin: 0; margin-top: 5px; margin-bottom: 5px; }
12 #header {position:relative; display: block; width: 980px; height: 121px;margin: auto; padding: auto; background-color: #D37624; background-image: url('images/header.png');clear:both;}
13 #header h2{ color: #FFE6BC; font-weight: bold; font-size: 2.2em; margin:0; padding:0; padding-left: 10px; padding-top: 7px; text-shadow: #333333 2px 2px 4px;}
14 #header h3{ color: #FFE6BC; font-weight: bold; font-size: 1.8em; margin:0; padding: 0; padding-left: 10px; text-shadow: #333333 2px 2px 4px;}
15 #header h4{ color: #FFE6BC; font-weight: bold; font-size: 1.2em; margin:0; padding: 0; padding-left: 10px; padding-right: 10px; text-shadow: #333333 2px 2px 4px;}
16 #header a {text-decoration:none;}
18 #contarea {display: block; width: 980px; margin: auto; padding: auto; background-color: #FFF2DD; clear:both;}
20 #linkline { width: 980px; height: 29px;margin: auto; padding: auto; background-color: #D37624; background-image: url('images/linkline.png');clear:both; }
21 #linkline a{float: left; color: #FFE6BC; font-weight: bold; font-size: 0.8em; text-decoration: none; text-shadow: #333333 2px 2px 4px; padding-left: 10px; padding-right: 10px; padding-top: 5px;}
22 #linkline a:visited{color: #FFE6BC;}
23 #linkline a:hover{color: #333333;}
24 #linkline a.here {color: #333333; text-decoration: none;}
26 #lastupdate {float: right; display: block; text-align: right; margin: 0; margin-top: -1.2em; padding: 0; padding-right: 15px;}
28 #rss { float: right; text-align: right; padding-top: 3px;}
30 #docline-top { float: right; padding-right: 40px; text-align: right; }
31 #docline-bottom { float: right; padding-right: 40px; text-align: right; font-size: 0.8em; padding-top: 15px; }
32 #docline-bottom a{ padding-left: 10px; padding-right: 10px; }
34 #menu { float: right; display: block; width: 170px; margin: auto; padding: 15px; font-size: 0.8em; font-weight: bold; background-color: #FFE6BC;}
35 #menu h1 {color: #990000; font-size: 1.8em;text-shadow: gray 2px 2px 4px;}
36 #menu a,a:visited{ color: black; text-decoration: none; font-weight: normal;}
37 #menu a:hover{ text-decoration: underline;}
38 #menu p{ margin-bottom: 10px;}
40 #content { float: left; display: block; width: 950px; margin: auto; padding: 15px;}
43 #footer {display: block; width: 980px; height: 100px;margin: auto; padding: auto; background-color: #D37624; background-image: url('images/footer.png');clear:both;text-shadow: #333333 2px 2px 4px;}
44 #footer p{color: #FFE6BC; font-weight: bold; padding:15px; padding-left: 10px;}
45 #footer a,a:visited{color: #FFE6BC; font-weight: bold; text-decoration:none;}
46 #footer a:hover{ color: #333333; text-decoration: none;}
49 #content H1,H2,H3,H4{color: #990000; text-align: left;}
50 #content H2{margin-top: 2em;}
51 #content H3{margin-top: 1.5em}
52 #content H4{margin-top: 1em}
53 #content li { margin-top: 1em;}
54 #content a,a:active,a:visited{text-decoration: none; color: #4075CA; font-weight: normal;}
55 #content a:hover{text-decoration: underline; font-weight: normal;}
56 #content .hidden{ display:none; }
57 #content p,td,table,tr,li { font-family: Arial, 'sans serif'; }
58 #content .nav{margin-left: 0pt;}
59 #content .newcode{font-family : "Courier New", Courier, monospace; font-weight: bold; background-color: #F2F2F2; border: solid 1px #DEDEDE;padding: 20pt;}
60 #content .note{margin-top: 30pt; margin-bottom: 30pt; text-align: left; background-color: #FFEFEF; border: double 3px; border-color: #FFD5D5;}
61 #content hr{color: Black; background-color: Black; height: 1px; border: none;}
62 #content .header-news{margin-top: 2em; margin-left: 25pt; font-weight: bold; color: #990000;}
63 #content .item-news{margin-left: 45pt; margin-right: 45pt;}
64 #content .otherpage{border: solid 1px darkgoldenrod; padding: 20pt; background-color: lemonchiffon;}
65 #content IMG {display: block; margin-left: auto; margin-right: auto; }
66 #content .red{color: white; background-color: Red; font-weight: bold;}
67 #lphp{text-align: right; padding-left: 10px; padding-right: 10px; padding-top: 50px; float: right;}
68 #lphp a{padding-left: 5px;}
69 </style>
70 <META NAME="Keywords" CONTENT="multiboot Multi Boot bootable cd rescue clonezilla sysresccd backup restore samba">
71 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
73 </head>
75 <body>
76 <div id="header">
77 <div id="lphp" style=""><a target="_blank" href="onepage.php"><img src="images/chain.png" border="0" /></a><a target="_blank" href="printable.php"><img src="images/print_it.png" border="0" /></a></div>
78 <H2>Clonezilla-SysRescCD</H2>
79 <H3>Basic vi tutorial</H3>
80 <div style="margin:0; padding: 3px; width: 980; position relative;">
81 <div style="position: absolute; left: 0px;"><H4>25/02/2010 - v 3.1.0</H4></div>
82 <div style="position: absolute; right: 0px;"><H4>Last update: 01/03/2010</H4></div>
83 </div>
84 </div>
85 <div id="linkline">
86 <a href="index.html">Home</a>
87 <a href="news.php">News</a>
88 <!-- <a href="features.html">Features</a>-->
89 <a class="here" href="doc.html">Documentation</a>
90 <a href="index.html#download">Download</a>
91 <a href="screenshots.html">Screenshots</a>
92 <a href="index.html#credits">Credits</a>
93 <a href="help.html">Help</a>
95 <div id="rss">
96 <a href="clonezilla-sysresccd.rss"><img src="images/rss-orange-11.png" width="30" height="14" border="0"/></a>
97 </div>
98 <!-- docline-top-->
99 <div id="docline-top"> <a href="clonezilla.html">&lt; PREV</a> <a href="doc.html">UP</a> <a href="backup-smb.html">NEXT &gt;</a> </div>
100 </div>
101 <div id="contarea">
102 <div id="content">
103 <a name="backup-top"></a>
106 <!-- Intro -->
108 <H2 style="margin-top: 0;"><a name="why-vi"></a>Why vi? <span class="hideprint">[<a href="#backup-top" title="go to top of the page">^</a>]</span></H2>
110 <p>vi is the standard editor in most existing *nix environments. This means that by learning it, you make sure you will never find yourself in a spot where you cannot edit a file, because the editor is unknown to you.</p>
112 <p>vi is really very powerful, something that's difficult to see judging from its plain interface. It goes without a doubt to say, that once you get familiar with it, you may find it hard to live without it. Actually, I am using it right now, to write this page :)</p>
114 <p>So what's the big fuss with people finding it so hard to use or even not being able to use it at all? Well, I wouldn't say it's difficult to use, I'd say it's different. The whole philosophy behind vi is hard to comprehend especially by people coming from Windows (and lately also from *nix world).</p>
116 <p> vi is a console program and many people are really scared to use the console (this is one reason vi is said to be hard). Also, vi believes (well its developers) that a person should not get his hands off the keyboard for any reason while typing or editing text. This is why vi implements all its commands in such a way that they can be inserted from the keyboard, without having to use the arrow keys or the numeric keypad or anything.</p>
118 <H2><a name="why-vi-tut"></a>Why another vi tutorial? <span class="hideprint">[<a href="#backup-top" title="go to top of the page">^</a>]</span></H2>
120 <p> Well, this is not really a vi tutorial, this is a very basic rescue introduction. It's meant for people who do not know vi, don't want to know vi, will never use it unless they have to (this may be the situation with <b>Clonezilla live</b>), but need to edit a file without going through a real tutorial. </p>
122 <p> So let's get down to it. </p>
125 <H3><a name="vi-modes"></a>vi modes <span class="hideprint">[<a href="#backup-top" title="go to top of the page">^</a>]</span></H3>
127 <p> vi has two working modes (well, that's not entirely true, but let's just keep it simple). </p>
129 <ol>
130 <li>Command Mode<br>
131 In this mode of operation you can insert commands (delete characters, scroll down, save file, exit the program, etc.). This is the default mode (the one that's active when vi is first launched). Anything you do starts from Command mode and ends back in Command Mode.</li>
132 <li>Input Mode<br>
133 In this mode of operation all you do is insert test. This is the default mode of operation for any other editor you have ever worked with, but not with vi. In order to start typing text you have to type <b>i</b> or <b>o</b> from Command Mode in order to enter Insert Mode.</li>
134 </ol>
137 <!-- note -->
138 <div align="center"><table class="note" border="0" cellpadding="20"><tr><td valign="top"><img src="images/info.png"></td><td>
139 In case you can't remember which mode you are in,<br>
140 just type <b>&lt;ESC&gt;</b> (that's <b>Escape</b>) to get back to<br>
141 Command Mode and take it from there.</td></tr></table></div>
143 <p> Although vi does provide commands for text navigation, you can still use the arrow keys and Home, End, PgUp, PgDown to move around. </p>
145 <H3><a name="vi-commands"></a>vi commands <span class="hideprint">[<a href="#backup-top" title="go to top of the page">^</a>]</span></H3>
147 <p>vi commands are issued from the <b>Command Mode</b>. There are two types of commands: <b>normal commands</b> (which take effect as soon as you type them) and <b>extended commands</b> (which start with a "<b>:</b>" and do not take effect until <b>&lt;ENTER&gt;</b> is pressed).</p>
149 <p> The commands you will need are: </p>
151 <table border="1" cellpadding="10" align="center">
152 <!--not-on-txt-->
153 <tr><td><b>Command</b></td>
154 <td><b>Effect</b></td></tr>
155 <!--endnot-on-txt-->
156 <tr><td colspan="2"><b>Save / Exit (Extended Commands)<b/></td></tr>
157 <tr><td>:w</td>
158 <td>Save file</td></tr>
159 <tr><td>:wq</td>
160 <td>Save file and exit</td></tr>
161 <tr><td>:q</td>
162 <td>Exit the program</td></tr>
163 <tr><td>:q!</td>
164 <td>Exit without saving</td></tr>
165 <tr><td>:e!</td>
166 <td>Reload the file (revert to saved)</td></tr>
167 <tr><td colspan="2"><b>Inserting test<b/></td></tr>
168 <tr><td>i</td>
169 <td>Enter <b>Insert Mode</b>. Typing starts before current cursor position</td></tr>
170 <tr><td>a</td>
171 <td>Enter <b>Insert Mode</b>. Typing starts after current cursor position</td></tr>
172 <tr><td>o</td>
173 <td>Enter <b>Insert Mode</b>. Typing starts on a new line</td></tr>
174 <tr><td>O</td>
175 <td>Enter <b>Insert Mode</b>. Typing starts on a new line above the current one</td></tr>
176 <tr><td>ESC</td>
177 <td>Exit <b>Insert Mode</b> - enter <b>Command Mode</b></td></tr>
178 <tr><td colspan="2"><b>Deleting text<b/></td></tr>
179 <tr><td>x</td>
180 <td>Delete the character under the cursor</td></tr>
181 <tr><td>dd</td>
182 <td>Delete the whole line</td></tr>
183 <tr><td>d^</td>
184 <td>Delete to the beginning of the line (starting from cursor position)</td></tr>
185 <tr><td>d$</td>
186 <td>Delete to the end of the line (starting from cursor position)</td></tr>
187 <tr><td colspan="2"><b>Changing test<b/></td></tr>
188 <tr><td>cw</td>
189 <td>Change a word (starting from cursor position)</td></tr>
190 <tr><td>c^</td>
191 <td>Change text to the beginning of the line (starting from cursor position)</td></tr>
192 <tr><td>c$</td>
193 <td>Change text to the end of the line (starting from cursor position)</td></tr>
194 <tr><td colspan="2"><b>Replacing test<b/></td></tr>
195 <tr><td>r</td>
196 <td>Replace the character under cursor. Just press the desired character after <b>r</b></td></tr>
197 <tr><td>R</td>
198 <td>Replace text until <b>&lt;ESC&gt;</b> is pressed. Just start typing after pressing <b>R</b></td></tr>
199 <tr><td colspan="2"><b>Undo / Redo<b/></td></tr>
200 <tr><td>u</td>
201 <td>Undo last action</td></tr>
202 <tr><td>Ctrl-R</td>
203 <td>Redo last action</td></tr>
204 </table>
206 </div>
209 <div id="footer">
210 <div id="docline-bottom"> <a href="clonezilla.html">&lt; PREV</a> <a href="doc.html">UP</a> <a href="backup-smb.html">NEXT &gt;</a> </div>
211 <p>Copyright: &#169; <a href="mailto:&#115;&#110;&#103;&#064;&#104;&#101;&#108;&#108;&#117;&#103;&#046;&#103;&#114;?subject=About Clonezilla-SysRescCD v 3.1.0">Spiros Georgaras</a>, 2007-2010<br /><br/>
212 Hosted by <a href="http://www.hellug.gr" target="_blank" title="Hellenic Linux User Group">HEL.L.U.G.</a></p>
213 </div>
214 </div>
215 </body>
216 </html>

ViewVC Help
Powered by ViewVC 1.1.26