/[clonezilla-sysresccd]/trunk/www/basic-vi.html
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 184 - (show annotations)
Mon Jul 4 13:39:54 2011 UTC (10 years, 2 months ago) by sng
File MIME type: text/html
File size: 13814 byte(s)
- executing svn add trunk/www/basic-vi.html
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 - Basic vi tutorial</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; }
9
10
11
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;}
17
18 #contarea {display: block; width: 980px; margin: auto; padding: auto; background-color: #FFF2DD; clear:both;}
19
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;}
25
26 #lastupdate {float: right; display: block; text-align: right; margin: 0; margin-top: -1.2em; padding: 0; padding-right: 15px;}
27
28 #rss { float: right; text-align: right; padding-top: 3px;}
29
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; }
33
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;}
39
40 #content { float: left; display: block; width: 950px; margin: auto; padding: 15px;}
41
42
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;}
47
48
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 #warning { margin: 5px; padding: .4em; background-color: Red; color: White; align: center; font-weight: bold; border-width: 2px; border-color: white; border-style: solid; }
70 #warning a { color: white; font-weight: bold; text-decoration: underline; }
71 </style>
72 <link href="warning.css" rel="stylesheet" type="text/css" />
73 <!--
74 The file waring.css exists only in the root of the site
75 and it hides the UNSTABLE warnings. Its contents are
76 #warning { display: none; }
77 -->
78 <META NAME="Keywords" CONTENT="multiboot Multi Boot bootable cd rescue clonezilla sysresccd backup restore samba">
79 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
80
81 </head>
82
83 <body>
84 <div id="warning" align="center">
85 WARNING<br>
86 This is the UNSTABLE version of Clonezilla-SysRescCD<br>
87 To access our current stable version, please click <a href="../index.html">here</a>
88 </div>
89 <div id="header">
90 <div id="lphp" style=""><a target="_blank" title="Display all in one long page" href="onepage.html"><img src="images/chain.png" border="0" /></a><a target="_blank" title="Display printable page" href="printable.php"><img src="images/print_it.png" border="0" /></a></div>
91 <H2>Clonezilla-SysRescCD</H2>
92 <H3>Basic vi tutorial</H3>
93 <div style="margin:0; padding: 3px; width: 980; position relative;">
94 <div style="position: absolute; left: 0px;"><H4>30/06/2011 - v 3.2.0</H4></div>
95 <div style="position: absolute; right: 0px;"><H4>Last update: 04/07/2011</H4></div>
96 </div>
97 </div>
98 <div id="linkline">
99 <a href="index.html">Home</a>
100 <a href="news.php">News</a>
101 <!-- <a href="features.html">Features</a>-->
102 <a class="here" href="doc.html">Documentation</a>
103 <a href="download.html">Download</a>
104 <a href="screenshots.html">Screenshots</a>
105 <a href="index.html#credits">Credits</a>
106 <a href="help.html">Help</a>
107
108 <div id="rss">
109 <a href="clonezilla-sysresccd.rss"><img src="images/rss-orange-11.png" width="30" height="14" border="0"/></a>
110 </div>
111 <!-- docline-top-->
112 <div id="docline-top"> <a href="annex-a-devices.html">&lt; PREV</a> <a href="doc.html">UP</a> <a href="">NEXT &gt;</a> </div>
113 </div>
114 <div id="contarea">
115 <div id="content">
116 <a name="backup-top"></a>
117
118
119 <!-- Intro -->
120
121 <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>
122
123 <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>
124
125 <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>
126
127 <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>
128
129 <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>
130
131 <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>
132
133 <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>
134
135 <p> So let's get down to it. </p>
136
137
138 <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>
139
140 <p> vi has two working modes (well, that's not entirely true, but let's just keep it simple). </p>
141
142 <ol>
143 <li>Command Mode<br>
144 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>
145 <li>Input Mode<br>
146 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>
147 </ol>
148
149
150 <!-- note -->
151 <div align="center"><table class="note" border="0" cellpadding="20"><tr><td valign="top"><img src="images/info.png"></td><td>
152 In case you can't remember which mode you are in,<br>
153 just type <b>&lt;ESC&gt;</b> (that's <b>Escape</b>) to get back to<br>
154 Command Mode and take it from there.</td></tr></table></div>
155
156 <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>
157
158 <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>
159
160 <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>
161
162 <p> The commands you will need are: </p>
163
164 <table border="1" cellpadding="10" align="center">
165 <!--not-on-txt-->
166 <tr><td><b>Command</b></td>
167 <td><b>Effect</b></td></tr>
168 <!--endnot-on-txt-->
169 <tr><td colspan="2"><b>Save / Exit (Extended Commands)<b/></td></tr>
170 <tr><td>:w</td>
171 <td>Save file</td></tr>
172 <tr><td>:wq</td>
173 <td>Save file and exit</td></tr>
174 <tr><td>:q</td>
175 <td>Exit the program</td></tr>
176 <tr><td>:q!</td>
177 <td>Exit without saving</td></tr>
178 <tr><td>:e!</td>
179 <td>Reload the file (revert to saved)</td></tr>
180 <tr><td colspan="2"><b>Inserting test<b/></td></tr>
181 <tr><td>i</td>
182 <td>Enter <b>Insert Mode</b>. Typing starts before current cursor position</td></tr>
183 <tr><td>a</td>
184 <td>Enter <b>Insert Mode</b>. Typing starts after current cursor position</td></tr>
185 <tr><td>o</td>
186 <td>Enter <b>Insert Mode</b>. Typing starts on a new line</td></tr>
187 <tr><td>O</td>
188 <td>Enter <b>Insert Mode</b>. Typing starts on a new line above the current one</td></tr>
189 <tr><td>ESC</td>
190 <td>Exit <b>Insert Mode</b> - enter <b>Command Mode</b></td></tr>
191 <tr><td colspan="2"><b>Deleting text<b/></td></tr>
192 <tr><td>x</td>
193 <td>Delete the character under the cursor</td></tr>
194 <tr><td>dd</td>
195 <td>Delete the whole line</td></tr>
196 <tr><td>d^</td>
197 <td>Delete to the beginning of the line (starting from cursor position)</td></tr>
198 <tr><td>d$</td>
199 <td>Delete to the end of the line (starting from cursor position)</td></tr>
200 <tr><td colspan="2"><b>Changing test<b/></td></tr>
201 <tr><td>cw</td>
202 <td>Change a word (starting from cursor position)</td></tr>
203 <tr><td>c^</td>
204 <td>Change text to the beginning of the line (starting from cursor position)</td></tr>
205 <tr><td>c$</td>
206 <td>Change text to the end of the line (starting from cursor position)</td></tr>
207 <tr><td colspan="2"><b>Replacing test<b/></td></tr>
208 <tr><td>r</td>
209 <td>Replace the character under cursor. Just press the desired character after <b>r</b></td></tr>
210 <tr><td>R</td>
211 <td>Replace text until <b>&lt;ESC&gt;</b> is pressed. Just start typing after pressing <b>R</b></td></tr>
212 <tr><td colspan="2"><b>Undo / Redo<b/></td></tr>
213 <tr><td>u</td>
214 <td>Undo last action</td></tr>
215 <tr><td>Ctrl-R</td>
216 <td>Redo last action</td></tr>
217 </table>
218
219 </div>
220
221
222 <!--<a name="template-top"></a>-->
223
224 <div id="footer">
225 <div id="docline-bottom"> <a href="annex-a-devices.html">&lt; PREV</a> <a href="doc.html">UP</a> <a href="">NEXT &gt;</a> </div>
226 <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.2.0" title="About Clonezilla-SysRescCD">Spiros Georgaras</a>, 2007-2011 &amp; <a href="mailto:&#115;&#097;&#110;&#100;&#103;&#116;&#120;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;?subject=About Clonezilla-SysRescCD v 3.2.0 documentation" title="About Clonezilla-SysRescCD Documentation">Jyrki Vesterinen</a>, 2010-2011<br /><br/>
227 Hosted by <a href="http://hellug.gr/index.php/OSullogos/Tautothta?from=Main.HELLUG" target="_blank" title="Hellenic Linux User Group">HEL.L.U.G.</a></p>
228 </div>
229 </div>
230 <div id="warning" align="center">
231 WARNING<br>
232 This is the UNSTABLE version of Clonezilla-SysRescCD<br>
233 To access our current stable version, please click <a href="../index.html">here</a>
234 </div>
235 </body>
236 </html>

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26