annotate runtime/tutor/tutor.lv @ 14310:d8b3135ad9a4

Added tag v8.1.0170 for changeset 15530de011bc47df10c9f425e1c7073467e7d42a
author Christian Brabandt <cb@256bit.org>
date Sun, 08 Jul 2018 19:15:05 +0200
parents 34c8ec888122
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12559
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 ===============================================================================
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 = Ī s a p a m ā c ī b a V I M - Versija 1.7 =
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 ===============================================================================
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 Vim ir jaudīgs teksta redaktors ar pārāk daudzām komandām, lai to
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 aprakstītu tik īsā aprakstā kā šis. Šī pamācība ir paredzēta, lai
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 spētu iemācīties tik daudz, cik nepieciešams, lietojot Vim, kā plaša
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 pielietojuma teksta redaktoru.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 Atkarībā no tā, cik daudz laika veltīsiet eksperimentiem,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 šīs pamācības aptuvenais izpildīšanas laiks ir 25 — 30 minūtes.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 UZMANĪBU:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 Darbojoties ar komandām, jūs izmainīsiet šo tekstu, tāpēc izveidojiet šī
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 faila kopiju (ja jūs palaidāt "vimtutor" komandu, šī jau ir kopija).
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 Svarīgi atcerēties, ka šo pamācību ir paredzēts izpildīt praktiski!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 Ja jūs tikai lasīsiet šo tekstu, jūs komandas aizmirsīsiet!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 Tagad pārliecinieties, ka tastatūrai nav nospiesti SHIFT vai
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 CAPS-LOCK taustiņi un spiediet j taustiņu, līdz pilnībā redzat
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 1.1 nodarbības saturu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 1.1 nodarbība: KURSORA PĀRVIETOŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 ** Lai pārvietotu kursoru, spiediet taustiņus h, j, k, l **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 Lai atcerētos,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 izmantojiet vārdus: k "Kaugšup"
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 ^
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 pa "Heisi" h < > l pa "Labi"
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 v
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 j "Jejup"
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 1. Pārvietojiet kursoru pa ekrānu tik ilgi, kamēr pierodat.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 2. Turiet j taustiņu tik ilgi, kamēr ieslēdzas tā auto-atkārtošana.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 Un dodieties uz nākamo nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 PIEZĪME: Ja neesat pārliecināts par nospiesto taustiņu, spiediet <ESC>,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 lai atgrieztos normālajā režīmā, un spiediet vajadzīgo taustiņu atkal.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 PIEZĪME: Kursora vadībai var izmantot arī bultiņu taustiņus, bet ticiet —
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 iemācīties vadīt ar j, k, l, h taustiņiem ir daudz parocīgāk!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 1.2 nodarbība: IZIEŠANA NO VIM
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 !! PIEZĪME: Pirms izpildīt šīs nodarbības soļus, izlasiet visu instrukciju!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 1. Lai būtu drošs, ka esat normālajā režīmā, nospiediet <ESC> taustiņu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 2. Ievadiet komandu: :q! <ENTER>.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 Ievadot šo komandu, jūs iziesiet no redaktora nesaglabājot izmaiņas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 3. Ja palaidāt vim komandrindā, tad pēc tam atkal to izsauciet, ievadot
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 vimtutor <ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 4. Kad esat iegaumējis 1. — 3. soli, izpildiet tos, lai atgrieztos
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 redaktorā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 PIEZĪME: :q! <ENTER> komanda atceļ visas failā radītās izmaiņas. Pēc dažām
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 nodarbībām jūs uzzināsiet, kā izmaiņas varat saglabāt.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 5. Pārvietojiet kursoru, uz 1.3 nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 1.3 nodarbība: TEKSTA REDIĢĒŠANA – DZĒŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 ** Lai izdzēstu zem kursora atrodošos burtu, spiediet x **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 1. Pārvietojiet kursoru uz līniju ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 2. Lai izlabotu kļūdas, pārvietojiet kursoru uz vajadzīgo burtu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 3. Spiediet x taustiņu, lai izdzēstu nevajadzīgo burtu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 4. Atkārtojiet 2. līdz 4. soļus, līdz teksts ir pareizs.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 ---> Hiiipijiiii čččauuukstiiina celllofānu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 5. Kad augstāk parādītā rinda ir izlabota, dodieties uz 1.4. nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 PIEZĪME: Izpildot šo pamācību, centieties mācīties nevis domājot,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87 bet gan praktiski trenējot kustību atmiņu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 1.4 nodarbība: TEKSTA REDIĢĒŠANA — IEVIETOŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 ** Lai ievietotu tekstu, spiediet i **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95 1. Pārvietojiet kursoru uz pirmo līniju ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
96
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
97 2. Lai ierakstītu tekstu augšējā rindā tieši tādu pašu kā apakšējā,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 novietojiet kursoru tieši PĒC ievietojamā teksta.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
99
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
100 3. Spiediet i un ievadiet visu nepieciešamo tekstu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
101
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
102 4. Pēc katra papildinājuma, spiediet <ESC> lai atgrieztos normālajā režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
103 Atkārtojiet 2. līdz 4. soļus, līdz teksts ir pareizs.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
104
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
105 ---> Šaā lnij no tksta rūkt dai buti.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
106 Šajā līnijā no teksta trūkst daži burti.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
107
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
108 5. Kad esat apguvis šīs darbības, dodieties uz 1.5. nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
109
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
110
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
111 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
112 1.5 nodarbība: TEKSTA REDIĢĒŠANA — PIEVIENOŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
113
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
114 ** Lai pievienotu tekstu, spiediet A **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
115
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
116 1. Pārvietojiet kursoru uz pirmo līniju ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
117 Nav svarīgi, uz kura šīs rindas burta atrodas kursors.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
118
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
119 2. Spiediet A un pievienojiet iztrūkstošo tekstu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
120
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
121 3. Kad nepieciešamais teksts ir pievienots, spiediet <ESC>,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
122 lai atgrieztos normālajā režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
123
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
124 4. Pārvietojiet kursoru uz otro līniju ar atzīmi --->
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
125 un atkārtojiet 2. un 3. soļus.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
126
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
127 ---> Šajā līnijā tekstam
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
128 Šajā līnijā tekstam pietrūkst beigas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
129 ---> Šajā līnijā t
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
130 Šajā līnijā tekstam pietrūkst beigas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
131
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
132 5. Kad esat apguvis šīs darbības, dodieties uz 1.6. nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
133
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
134
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
135 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
136 1.6 nodarbība: FAILA SAGLABĀŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
137
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
138 ** Lai saglabātu failu un izietu no redaktora, spiediet :wq **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
139
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
140 !! PIEZĪME: Pirms izpildīt šo nodarbību, izlasiet visus tās soļus!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
141
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
142 1. Pārliecinieties, ka esat pareizi izpildījis visas iepriekšējās nodarbības.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
143
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
144 2. Ja neesat pārliecināts, izejiet no redaktora, kā 1.2. nodarbībā ar komandu:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
145 :q!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
146
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
147 3. Tad atkal palaidiet pamācību, un, ja nepieciešams, veiciet failā izmaiņas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
148
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
149 4. Saglabājiet faila izmaiņas, redaktorā ievadot :w tutor <ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
150 Izejiet no redaktora, ievadot komandu :wq <ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
151
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
152 5. Palaidiet atkal šo pamācību, terminālī ievadot komandu: vim tutor
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
153 Šajā komandā vārds "vim" izsauc teksta redaktoru, bet
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
154 vārds "tutor" ir faila nosaukums, kurā ir saglabāta izmainītā pamācība.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
155
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
156 5. Kad esat sapratis veicamās darbības, izpildiet tās.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
157
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
158 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
159 1. nodarbības APKOPOJUMS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
160
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
161
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
162 1. Kursoru pārvieto ar bultiņu vai arī h,j,k,l taustiņiem:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
163 h (pa kreisi) j (lejup) k (augšup) l (pa labi)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
164
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
165 2. Lai ar Vim rediģētu noteiktu failu, ievadiet komandu: vim fails <ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
166
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
167 3. Lai izietu no Vim ievadiet:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
168 <ESC> :q! <ENTER> lai pazaudētu izmaiņas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
169 <ESC> :wq <ENTER> lai saglabātu izmaiņas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
170
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
171 4. Lai izdzēstu burtu zem kursora, spiediet x
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
172
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
173 5. Lai ievietotu vai pievienotu tekstu, spiediet:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
174 i ievadāmais teksts <ESC> lai ievietotu pirms kursora
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
175 A pievienojamais teksts <ESC> lai pievienotu rindas beigās
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
176
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
177 PIEZĪME: <ESC> spiešana atgriezīs jūs normālajā režīmā, vai arī atcels
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
178 nepareizu vai daļēji ievadītu komandu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
179
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
180 Tagad dodieties uz 2. nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
181
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
182 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
183 2.1 nodarbība: DZĒŠANAS KOMANDAS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
184
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
185
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
186 ** Lai izdzēstu vārdu, spiediet dw **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
187
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
188 1. Nospiediet <ESC> lai pārliecinātos, ka esat normālajā režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
189
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
190 2. Pārvietojiet kursoru uz rindu ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
191
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
192 3. Pārvietojiet kursoru uz izdzēšamā vārda sākumu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
193
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
194 4. Ievadiet dw lai izdzēstu nepieciešamo vārdu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
195
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
196 PIEZĪME: Nospiežot d, ekrāna labajā apakšējā stūrī parādīsies d burts.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
197 Tas ir tāpēc, ka Vim gaida nākamo komandu (burtu w).
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
198 Ja jūs redzat citu burtu, vai neredzat neko, esat kaut ko izdarījis
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
199 nepareizi. Tad spiediet <ESC> un sāciet no sākuma.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
200
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
201 ---> Šajā kuku teikumā ir tata daži lala vārdi, kuri mumu nav vajadzīgi.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
202
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
203 5. Izpildiet 3. — 4. soļus, līdz teksts ir pareizs un dodieties uz 2.2. nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
204
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
205
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
206 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
207 2.2 nodarbība: CITAS DZĒŠANAS KOMANDAS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
208
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
209
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
210 ** Lai izdzēstu līdz rindas beigām, spiediet d$ **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
211
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
212 1. Nospiediet <ESC> lai pārliecinātos, ka esat normālajā režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
213
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
214 2. Pārvietojiet kursoru uz rindu ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
215
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
216 3. Pārvietojiet kursoru līdz pirmā teikuma beigām (PĒC pirmā punkta).
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
217
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
218 4. Ievadiet d$ lai izdzēstu tekstu no kursora līdz rindas beigām.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
219
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
220 ---> Kāds ir ievadījis teikuma beigas divreiz. ievadījis teikuma beigas divreiz.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
221
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
222
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
223 5. Dodieties uz 2.3 nodarbību, lai labāk izprastu, kā tas notiek.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
224
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
225
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
226
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
227
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
228 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
229 2.3 nodarbība: OPERATORI UN KOMANDAS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
230
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
231
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
232 Daudzas tekstu mainošās komandas sastāv no operatora un kustības.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
233 Dzēšanas komanda, kuru izsauc ar d operatoru vispārīgā gadījumā ir sekojoša:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
234
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
235 d kustība
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
236
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
237 Kur:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
238 d - ir dzēšanas operators.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
239 kustība - ir operators, kas nosaka dzēšanas veidu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
240
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
241 Biežāk izplatītās kustības ir:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
242 w - līdz nākamā vārda sākumam, NEIESKAITOT tā pirmo burtu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
243 e - līdz tekošā vārda beigām, IESKAITOT pēdējo burtu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
244 $ - līdz rindas beigām, IESKAITOT tās pēdējo burtu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
245
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
246 Piemēram, ievadot de tiks izdzēsts teksts no kursora līdz rindas beigām.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
247
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
248 PIEZĪME: Ievadot kustības komandu normālajā režīmā, tā pārvietos kursoru uz
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
249 norādīto vietu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
250
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
251 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
252 2.4 nodarbība: KUSTĪBAS SKAITA IZMANTOŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
253
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
254
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
255 ** Pirms kustības ievadot skaitli, tā tiks atkārtota norādās reizes. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
256
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
257 1. Pārvietojiet kursoru uz līniju ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
258
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
259 2. Ievadiet 2w lai pārvietotu kursoru par 2 vārdiem uz priekšu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
260
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
261 3. Ievadiet 3e lai pārvietotu kursoru par 3 vārdiem atpakaļ.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
262
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
263 4. Ievadiet 0 (nulli), lai pārvietotu kursoru uz rindas sākumu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
264
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
265 5. Atkārtojiet 2. — 3. soļus ar dažādiem skaitļiem.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
266
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
267 ---> Šī ir rinda ar vārdiem, kurā jūs varat pārvietoties.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
268
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
269 6. Dodieties uz nodarbību 2.5.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
270
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
271
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
272
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
273
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
274 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
275 2.5 nodarbība: SKAITĻA IZMANTOŠANA DZĒŠANAI
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
276
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
277
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
278 ** Ievadot skaitli pirms operatora, tas tiks atkārtots norādītās reizes. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
279
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
280 Pirms augšminētajām dzēšanas un pārvietošanās darbībām
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
281 var ievadīt skaitli, lai norādītu cik reizes to izpildīt, formā:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
282 d skaitlis kustība
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
283
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
284 1. Pārvietojiet kursoru uz pirmo vārdu ar LIELAJIEM BURTIEM rindā ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
285
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
286 2. Ievadiet komandu d2w lai izdzēstu divus vārdus ar LIELAJIEM BURTIEM
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
287
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
288 3. Atkārtojiet pirmo soli, dzēšanas komandai norādot dažādus skaitļus,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
289 lai izdzēstu visus vārdus ar LIELAJIEM BURTIEM
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
290
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
291 ---> šajā ABC DE rindā FGHI JK LMN OP ir jāizdzēš liekie Q RS TUV vārdi
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
292
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
293
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
294
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
295
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
296
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
297 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
298 2.6 nodarbība: DARBĪBAS AR RINDĀM
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
299
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
300
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
301 ** Ievadiet dd lai izdzēstu visu teksta rindu. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
302
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
303 Tā kā veselas rindas izdzēšana ir izplatīta darbība, Vi dizaineri nolēma
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
304 tās dzēšanu realizēt ar dubultu d ievadīšanu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
305
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
306 1. Pārvietojiet kursoru uz otro rindu ar atzīmi --->
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
307 2. Ievadiet dd lai izdzēstu rindu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
308 3. Pārvietojiet kursoru uz ceturto rindu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
309 4. Ievadiet 2dd lai izdzēstu divas rindas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
310
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
311 ---> 1) Astoņi kustoņi,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
312 ---> 2) astoņi kustoņi,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
313 ---> 3) kas tos astoņus kustoņus pirks?
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
314 ---> 4) Zirgs.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
315 ---> 5) Astoņi kustoņi,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
316 ---> 6) astoņi kustoņi,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
317 ---> 7) kas tos astoņus kustoņus pirks?
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
318 ---> 8) Cirks.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
319
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
320
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
321 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
322 2.7 nodarbība: ATCELŠANAS KOMANDA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
323
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
324
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
325 ** Lai atceltu darbību, spiediet u **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
326 ** Lai atceltu visas darbības tekošajā rindā, spiediet U **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
327
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
328 1. Pārvietojiet kursoru uz rindu ar atzīmi ---> un novietojiet to uz
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
329 pirmās kļūdas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
330 2. Pārvietojiet kursoru un ievadiet x lai izdzēstu visus liekos burtus.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
331 3. Ievadiet u lai atceltu iepriekšējo komandu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
332 4. Šī darbība atcels iepriekšējo darbību, kuru veicāt, ievadot x
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
333 5. Ievadiet U lai atgrieztos sākuma stāvoklī.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
334 6. Ievadiet u vairākas reizes, lai atceltu U un iepriekšējās komandas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
335 7. Ievadiet CTRL-R t.i.:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
336 nospiediet CTRL un, to neatlaižot, Shift un to neatlaižot un r
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
337 vairākas reizes, lai atceltu atcelšanas darbības.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
338
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
339 ---> Iizlabojiet kļūudas šaajā riindā, aatceliet tās un aatceliet aatcelšanu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
340
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
341 8. Šīs ir svarīgas un noderīgas iespējas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
342 Tagad pārejiet uz 2. nodarbības apkopojumu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
343
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
344
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
345
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
346 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
347 2. nodarbības APKOPOJUMS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
348
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
349
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
350 1. Lai izdzēstu vārdu, uz kura atrodas kursors, ievada: dw
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
351 2. Lai izdzēstu rindu no kursora līdz tās beigām, ievada: d$
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
352 3. Lai izdzēstu visu rindu, ievada: dd
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
353 4. Lai atkārtotu kustības darbību, pirms tās ievada skaitli, piemēram:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
354 2w
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
355
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
356 5. Lai atkārtotu izmaiņu darbību, komandu formāts ir sekojošs:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
357 operators [skaitlis] kustība
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
358 kur:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
359 operators - ir veicamā darbība, piemēram, d lai dzēstu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
360 [skaitlis] - ir neobligāts darbības atkārtojumu skaits
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
361 kustība - pārvieto kursoru tik tālu, cik ir veicama darbība, piem:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
362 w lai pārvietotos par vienu vārdu,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
363 $ lai pārvietotos līdz rindas beigām u.tml.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
364
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
365 6. Lai pārvietotos uz rindas sākumu, ievada: 0 (nulli)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
366
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
367 7. Lai atceltu iepriekšējo darbību, ievada: u (mazo u)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
368 Lai atceltu visas rindā veiktās izmaiņas, ievada: U (Shift+U)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
369 Lai atceltu atcelšanas darbības, ievada: CTRL-R (Ctrl+Shift+r)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
370
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
371 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
372 3.1 nodarbība: IEVIETOŠANAS DARBĪBA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
373
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
374
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
375 ** Lai pēc kursora ievietotu iepriekš izdzēstu tekstu, spiediet p **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
376
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
377 1. Pārvietojiet kursoru uz pirmo rindu ar atzīmi --->
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
378
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
379 2. Ievadiet dd lai izdzēstu visu rindu un saglabātu to reģistrā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
380
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
381 3. Pārvietojiet kursoru uz c) rindu (virs vietas, kur būtu jāievieto
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
382 dzēstā rinda).
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
383
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
384 4. Spiediet p lai ievietotu reģistrā saglabāto rindu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
385
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
386 5. Atkārtojiet soļus 2 līdz 4 līdz rindas ir pareizajā secībā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
387
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
388 ---> d) Zirgs.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
389 ---> c) kas tos astoņus kustoņus pirks?
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
390 ---> b) astoņi kustoņi,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
391 ---> a) Astoņi kustoņi,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
392
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
393
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
394 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
395 3.2 nodarbība: AIZVIETOŠANAS KOMANDA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
396
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
397
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
398 ** Lai aizvietotu burtu ar citu, ievadiet r un nepieciešamo burtu. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
399
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
400 1. Pārvietojiet kursoru uz pirmo rindu ar atzīmi --->
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
401
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
402 2. Pārvietojiet kursoru, lai iezīmētu pirmo nepareizo burtu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
403
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
404 3. Ievadiet r un tad burtu, uz kuru iezīmēto ir nepieciešams nomainīt.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
405
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
406 4. Atkārtojiet soļus 2 un 3 līdz ir pirmā rinda atbilst otrajai rindai.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
407
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
408 ---> Iavadut šo rixdu, kuds ar nuspeedis napariizus teusteņus!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
409 ---> Ievadot šo rindu, kāds ir nospiedis nepareizus taustiņus!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
410
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
411 5. Tagad dodieties uz 3.3. nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
412
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
413 PIEZĪME: Atcerieties, ka jums ir jāmācās darbojoties,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
414 nevis vienkārši mēģinot atcerēties!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
415
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
416
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
417
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
418 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
419 3.3 nodarbība: IZMAIŅU DARBĪBA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
420
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
421
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
422 ** Lai izmainītu tekstu līdz vārda beigām, spiediet ce **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
423
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
424 1. Pārvietojiet kursoru uz pirmo rindu ar atzīmi --->
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
425
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
426 2. Novietojiet kursoru virs pirmā Š vārdā Šma.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
427
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
428 3. Ievadiet ce un izlabojiet vārdu uz pareizu (šajā gad. "Šīs").
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
429
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
430 4. Spiediet <ESC> un pārvietojiet kursoru uz nākamo maināmo vārdu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
431
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
432 5. Atkārtojiet soļus 3 un 4 līdz pirmā un otrā rinda ir vienādas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
433
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
434 ---> Šma rindas vamula nepieciešams šimahaļ, lietojot šašābiļabita darbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
435 ---> Šīs rindas vārdus nepieciešams izlabot, lietojot izmainīšanas darbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
436
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
437 Ievērojiet, ka pēc ce un vārda ievades jūs paliekat ievietošanas režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
438
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
439
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
440
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
441 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
442 3.4 nodarbība: CITAS MAINĪŠANAS DARBĪBAS AR c
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
443
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
444
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
445 ** Izmaiņu kustības operatoru lieto tieši tāpat kā dzēšanai. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
446
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
447 1. Izmaiņu kustības operators darbojas tāpat kā dzēšanai. Formāts ir:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
448
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
449 c [skaitlis] kustība
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
450
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
451 2. Var lietot tos pašus kustības operatorus w (vārds) un $ (rindas beigas).
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
452
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
453 3. Pārvietojiet kursoru uz pirmo rindu ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
454
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
455 4. Pārvietojiet kursoru uz pirmo kļūdu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
456
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
457 5. Ievadiet c$ rakstiet nomaināmo tekstu līdz rindas beigām un spiediet <ESC>.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
458
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
459 ---> Šī teksta beigas nepieciešams izlabot, lietojot c$ komandu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
460 ---> Šī teksta beigas nepieciešams izlabot, lietojot c$ šari-vari-traļi-muļi.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
461
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
462 PIEZĪME: Lai labotu nepareizi ievadītu tekstu, spiediet <BACKSPACE> taustiņu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
463
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
464 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
465 3. NODARBĪBAS APKOPOJUMS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
466
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
467
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
468 1. Lai ievietotu izdzēsto tekstu, spiediet p taustiņu. Ar to ievietosiet
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
469 dzēsto tekstu PĒC kursora. (Ja bija izdzēsta vesela rinda, tā tiks
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
470 ievietota rindā VIRS kursora.)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
471
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
472 2. Lai izmainītu burtu zem kursora, spiediet r un pēc tam
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
473 jums nepieciešamo rakstzīmi.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
474
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
475 3. Izmaiņu operators ļauj jums nomainīt tekstu no kursora līdz
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
476 kustības operatora norādītajai vietai. Piemēram,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
477 ievadot ce jūs izmaināt tekstu no kursora līdz VĀRDA beigām, bet
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
478 ievadot c$ jūs nomaināt tekstu no kursora līdz RINDAS beigām.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
479
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
480 4. Izmaiņu komandas formāts ir:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
481
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
482 c [skaitlis] kustība
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
483
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
484 Tagad dodieties uz nākamo nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
485
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
486
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
487
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
488 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
489 4.1 nodarbība: KURSORA VIETA FAILĀ UN FAILA STATUSS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
490
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
491 ** Lai noteiktu kursora atrašanās vietu failā un faila statusu, spiediet CTRL-g
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
492 Lai pārvietotu kursoru uz noteiktu faila rindu, spiediet G **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
493
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
494 PIEZĪME: Pirms pildīt šo uzdevumu, izlasiet visas tā darbības līdz beigām!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
495
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
496 1. Spiediet Ctrl taustiņu, un neatlaižot to, spiediet g saīsināti CTRL-g.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
497 Redaktora ekrāna apakšā parādīsies statusa rinda, ar faila statusu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
498 un rindu kurā atrodas kursors, kā arī citu informāciju.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
499 Atcerieties šo vietu, lai izpildītu 3. darbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
500
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
501 PIEZĪME: Jūs varat redzēt kursora atrašanās vietu failā vienmēr ekrāna
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
502 labajā apakšējā stūrī, ja redaktoram ir ieslēgta ruler opcija.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
503 (Skatiet palīdzību par šo komandu, ievadot :help 'ruler')
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
504
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
505 2. Lai pārvietotu kursoru uz faila beigām, ievadiet G
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
506 Lai pārvietotu kursoru uz faila sākumu, ievadiet gg
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
507
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
508 3. Ievadiet iepriekš iegaumētās rindas numuru un tad ievadiet G
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
509 Ar šo jūs pārvietosiet kursoru atpakaļ rindā, kurā jūs sākāt
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
510 šo nodarbību.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
511
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
512 4. Atkārtojiet darbības 1. — 3. tik ilgi, kamēr droši atceraties šīs komandas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
513
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
514 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
515 4.2 nodarbība: MEKLĒŠANAS KOMANDA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
516
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
517
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
518 ** Lai meklētu tekstā, spiediet / un ievadiet meklējamo frāzi. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
519
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
520 1. Normālajā režīmā spiediet / taustiņu. Ievērojiet, ka kursors pārvietojas
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
521 uz redaktora apakšējo rindu, līdzīgi, kā nospiežot taustiņu :
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
522 lai ievadītu dažādas komandas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
523
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
524 2. Tad ievadiet vārdu kļūūūda un spiediet <ENTER>.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
525 Ar šo jūs izgaismosiet atrasto meklējamo redaktorā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
526
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
527 3. Lai atrastu nākošo vārdu, spiediet n taustiņu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
528 Lai pārvietotu kursoru uz nākamo atrasto vietu tekstā uz augšu,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
529 ievadiet N
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
530
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
531 4. Lai meklētu frāzi augšupejošā virzienā / vietā lietojiet ?
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
532
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
533 5. Lai atgrieztos uz vietu, kurā sākāt meklēšanu, spiediet CTRL-O
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
534 (spiediet Ctrl, tad, to neatlaižot spiediet arī o). To var turpināt,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
535 lai dotos tālāk atpakaļ, vai arī spiest CTRL-i, lai dotos uz priekšu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
536
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
537 ---> "kļūūūda" nav pareizs vārds; kļūda ir vienkārši kļūda.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
538
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
539 PIEZĪME: Ja ir atrasta pēdējā meklējamā frāze faila beigās vai sākumā,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
540 pēc nākamā meklējuma tiks atrasta pirmā/pēdējā faila sākumā/beigās,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
541 ja vien nav atslēgta wrapscan opcija.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
542
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
543 PIEZĪME: Ja vairs nevēlaties izgaismot meklējamo tekstu, spiediet /
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
544 un ievadiet nesakarīgu/neatrodamu frāzi. (VIM speciālisti parasti
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
545 piekārto savu taustiņu kombināciju šai darbībai.)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
546
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
547 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
548 4.3 nodarbība: SAISTĪTO IEKAVU MEKLĒŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
549
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
550
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
551 ** Lai atrastu saistīto ),], vai } iekavu, ievadiet % **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
552
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
553 1. Novietojiet kursoru uz iekavām (, [, { rindā ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
554
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
555 2. Ievadiet % simbolu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
556
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
557 3. Kursors pārvietosies uz izvēlētajai iekavai atbilstošo pretējo iekavu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
558
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
559 4. Ievadiet % lai pārvietotos atpakaļ uz atbilstošo pretējo iekavu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
560
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
561 5. Pārvietojiet kursoru uz cita veida iekavu (,),[,],{ or } un pārbaudiet,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
562 kas notiek atkārtoti ievadot %
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
563
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
564 ---> Šī ir (testa rinda ar dažādām (-veida, [-veida] un {-veida} iekavām.))
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
565
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
566
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
567 PIEZĪME: Šī iespēja ir ļoti noderīga, lai pārbaudītu nelīdzsvarotas iekavas
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
568 programmas kodā
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
569
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
570
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
571 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
572 4.4 nodarbība: AIZVIETOŠANAS KOMANDA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
573
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
574
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
575 ** Ievadiet :s/vecais/jaunais/g lai aizvietotu 'vecais' ar 'jaunais'. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
576
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
577 1. Novietojiet kursoru rindā ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
578
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
579 2. Ievadiet :s/ss/s<ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
580 Ievērojiet, ka šī komanda nomaina tikai pirmo atrasto frāzi.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
581
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
582 3. Tagad ievadiet :s/ss/s/g<ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
583 Ievērojiet, ka slēdzis g liek aizvietot frāzi visās atrastajās vietās.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
584
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
585 ---> visslabākaiss laikss vērot ziedus ir pavassariss.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
586
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
587 4. Aizvietošanas komandai var norādīt darbības diapazonu:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
588
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
589 ievadiet :#,#s/vecais/jaunais/g kur #,# ir diapazona sākuma un beigu rinda
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
590 ievadiet :%s/vecais/jaunais/g lai aizvietotu frāzi visā failā
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
591 ievadiet :%s/vecais/jaunais/gc lai aizvietotu visā failā ar uzaicinājumu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
592 apstiprināt katru aizvietošanu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
593
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
594 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
595 4.5 nodarbība: DARBĪBAS ATKĀRTOŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
596
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
597 ** Lai atkārtotu iepriekšējo darbību, spiediet . **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
598
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
599 Atšķirībā no citiem teksta redaktoriem, Vim par vienu darbību uzskata
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
600 vairāku ievadīto komandu virkni ārpus normālā režīma (t.i. ievietošanas,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
601 aizstāšanas u.tml.). Tas ļauj viegli atkārtot sarežģītas darbības, spiežot
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
602 . taustiņu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
603
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
604 1. Pārliecinieties, ka esat normālajā režīmā, spiežot <ESC>.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
605
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
606 2. Sameklējiet pirmo skaitli rindā ar --->, ievadot: /11
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
607
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
608 3. Ievadiet komandu 2sll un atgriezieties normālajā režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
609
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
610 4. Lai sameklētu nākamo skaitli un atkārtotu iepriekšējo aizstāšanas darbību,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
611 spiediet: n.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
612
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
613 ---> ba11e ce11e ha11e le11e ka11a mu11a nu11e ra11ijs šte11e ti11s ze11is
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
614 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
615 4. nodarbības APKOPOJUMS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
616
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
617 1. CTRL-G statusa rindā parāda faila nosaukumu, statusu un kursora atrašanās
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
618 vietu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
619 G pārvieto kursoru uz faila beigām.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
620 skaitlis G pārvieto kursoru uz norādīto rindu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
621 gg pārvieto kursoru uz faila sākumu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
622
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
623 2. Ievadot / un frāzi, to meklē failā uz priekšu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
624 Ievadot ? un frāzi, to meklē failā atpakaļ
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
625 Pēc pirmās atrastās frāzes, spiežot n sameklē nākamo frāzi tajā pašā virzienā
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
626 vai arī, spiežot N, sameklē nākamo frāzi pretējā virzienā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
627 CTRL-o pārvieto kursoru uz iepriekšējo izmaiņu vietu, CTRL-i uz nākamo vietu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
628 . atkārto iepriekšējo darbību, ko var apvienot ar meklēšanu: n. vai N.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
629
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
630 3. Ja kursors atrodas uz (,),[,],{, vai }, ievadot % kursors pārvietojas uz
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
631 pretējo iekavu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
632
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
633 4. Lai aizvietotu frāzi tekošajā rindā vienreiz, ievadiet: :s/vecais/jaunais
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
634 Lai aizvietotu visas frāzes tekošajā rindā, ievadiet: :s/vecais/jaunais/g
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
635 Lai aizvietotu visas frāzes starp norādītajām rindām: :#,#s/vecais/jaunais/g
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
636 Lai aizvietotu visas frāzes failā, ievadiet: :%s/vecais/jaunais/g
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
637 Lai aizvietotu visas frāzes failā ar apstiprinājumu: :%s/vecais/jaunais/gc
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
638
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
639 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
640 5.1 nodarbība: KĀ IZPILDĪT ĀRĒJU KOMANDU
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
641
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
642
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
643 ** Ievadiet :! un pēc tam sekojošo ārējo komandu. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
644
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
645 1. Nospiediet ierasto : lai parādītu uzaicinājumu statusa rindā
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
646
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
647 2. Šajā rindā ievadiet ! (izsaukuma zīmi). Tā norāda VIM, ka būs jāizpilda
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
648 ārēja (komandrindas čaulas) komanda
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
649
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
650 3. Pēc tam ievadiet, piemēram ls un spiediet <ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
651 Šī komanda ekrāna apakšējā daļā parādīs failu sarakstu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
652 Ja lietojat Windows, ls komandas vietā ievadiet dir
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
653
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
654 PIEZĪME: Izsaucamās komandas izpilda nospiežot <ENTER> taustiņu, kopš šī brīža
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
655 mēs to vairs īpaši neuzsvērsim. Lai aizvērtu komandas izvadīto saturu,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
656 arī jāspiež <ENTER> taustiņš.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
657
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
658
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
659 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
660 5.2 nodarbība: VAIRĀK PAR FAILU SAGLABĀŠANU
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
661
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
662 ** Lai saglabātu failu ar noteiktu nosaukumu, ievadiet :w NOSAUKUMS **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
663
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
664 1. Ievadiet :!ls (vai :!dir), lai apskatītu failu sarakstu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
665 Atcerieties, ka pēc komandu nosaukuma ievades jānospiež <ENTER>!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
666
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
667 2. Izdomājiet jaunu faila nosaukumu, piemēram, test
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
668
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
669 3. Tagad ievadiet: :w test1 (kur test ir jūsu izvēlētais faila nosaukums)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
670
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
671 4. Šī komanda saglabās vim pamācību failā test
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
672 Lai pārbaudītu, ievadiet :!ls vai :!dir un sameklējiet failu sarakstā
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
673
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
674 PIEZĪME: Ja jūs iziesiet no vim un palaidīsiet to ar komandu vim test
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
675 vim atvērs jūsu saglabāto test failu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
676
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
677 5. Tagad izdzēsiet šo failu, ievadot komandu: :!rm test
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
678 Vai, ja lietojat Windows, komandu: :!del test
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
679
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
680 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
681 5.3 nodarbība: TEKSTA DAĻĒJA SAGLABĀŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
682
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
683 ** Lai saglabātu tikai daļu no faila, ievadiet: v kustība :w fails **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
684
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
685 1. Pārvietojiet kursoru uz šo rindu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
686
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
687 2. Spiediet v un pārvietojiet kursoru līdz piektajam punktam.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
688
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
689 3. Spiediet : simbolu. Statusa rindā parādīsies :'<,'>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
690
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
691 4. Ievadiet w test kur test ir izvēlētais faila nosaukums.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
692 Pirms spiest <ENTER>, pārliecinieties, ka redzat :'<,'>w test
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
693
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
694 5. Vim saglabās iezīmēto tekstu failā test.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
695 Neizdzēsiet šo failu, mēs to izmantosim nākošajā nodarbībā!
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
696
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
697 PIEZĪME: Spiežot v VIM pārslēdzas vizuālā iezīmēšanas režīmā. Jūs varat izmantot
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
698 kursora pārvietošanas komandas, lai iezīmētu nepieciešamo tekstu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
699 Pēc teksta iezīmēšanas, jūs varat izmantot dažādus operatorus, lai
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
700 kaut ko darītu ar iezīmēto tekstu. Piemēram, spiežot d jūs izdzēsīsit
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
701 iezīmēto tekstu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
702
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
703 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
704 5.4 nodarbība: FAILU SATURA IEGŪŠANA UN APVIENOŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
705
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
706 ** Lai ievietotu faila saturu, ievadiet :r fails **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
707
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
708 1. Novietojiet kursoru tieši virs šīs rindas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
709
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
710 PIEZĪME: Pēc 2. soļa izpildes, jūs redzēsiet tekstu no 5.3 nodarbības.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
711 Pēc tam pārvietojiet kursoru uz leju, lai lasītu tālāk šīs
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
712 nodarbības saturu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
713
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
714 2. Iegūstiet test faila saturu, ievadot komandas :r test
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
715 kur test ir jūsu iepriekšējā nodarbībā saglabātais fails.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
716 Ielasītā faila saturs tiek ievietots zem kursora.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
717
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
718 3. Lai pārbaudītu, ka darbība ir izdevusies, pārliecinieties, ka 5.4
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
719 nodarbības aprakstā ir saturs no 5.3 nodarbības.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
720
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
721 PIEZĪME: Jūs varat ievadīt saturu failā, izpildot ārēju komandu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
722 Piemēram, ar komandu :r !ls
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
723 jūs ievietosiet failā tekošās mapes failu sarakstu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
724
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
725
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
726 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
727 5. nodarbības APKOPOJUMS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
728
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
729 1. :!komanda izpilda ārēju komandu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
730
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
731 Daži noderīgi piemēri:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
732 (MS-DOS) (Unix)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
733 :!dir :!ls - parāda mapes saturu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
734 :!del fails :!rm fails - izdzēš norādīto failu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
735
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
736 2. :w fails saglabā tekošo failu failā ar norādīto nosaukumu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
737
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
738 3. v kustība :w fails saglabā vizuāli iezīmēto tekstu norādītajā failā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
739
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
740 4. :r fails ielasa faila saturu tekošajā failā zem kursora.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
741
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
742 5. :r !ls ielasa izpildītās komandas atgriezto saturu failā zem kursora.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
743
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
744
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
745 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
746 6.1 nodarbība: ATVĒRŠANAS KOMANDA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
747
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
748 ** Ievadiet o lai ievadītu jaunu rindu virs kursora un pārietu ievades režīmā. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
749
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
750 1. Pārvietojiet kursoru uz rindu ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
751
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
752 2. Ievadiet mazo o lai ievadītu jaunu rindu virs kursora un pārslēgtos
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
753 ievades režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
754
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
755 3. Ievadiet kādu tekstu un spiediet <ESC>, lai izietu no ievades režīma.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
756
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
757 ---> Ievadot o izveidosiet rindu virs šīs un pāriesiet ievades režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
758
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
759 4. Lai izveidotu rindu ZEM kursora, ievadiet lielo O.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
760
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
761 ---> Ievadot O izveidosiet rindu zem šīs un pāriesiet ievades režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
762
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
763 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
764 6.2 nodarbība: PIEVIENOŠANAS KOMANDA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
765
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
766 ** Ievadiet a lai ievietotu jaunu tekstu PĒC kursora. **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
767
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
768 1. Pārvietojiet kursoru uz pirmo rindu ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
769
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
770 2. Spiediet e līdz kursors ir pirmā nepabeigtā vārda beigās.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
771
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
772 3. Ievadiet a (mazo a), lai pievienotu tekstu pēc kursora.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
773
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
774 4. Ievadiet tekstu, lai abas rindas ar atzīmi ---> sakrīt.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
775 Spiediet <ESC>, lai pārietu normālajā režīmā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
776
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
777 5. Ievadiet e, lai novietotu kursoru nākamā nepabiegtā vārda beigās,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
778 un atkārtojiet soļus 3 un 4.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
779
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
780 ---> Šī rin ju palīd praktiz tekst pievienoš vārd bei
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
781 ---> Šī rinda jums palīdzēs praktizēties teksta pievienošanā vārdu beigās.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
782
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
783 PIEZĪME: No normālā režīma pāriet uz ievades režīmu ievadot a, i, A un I.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
784 Atšķirība ir tikai tā, kur tiek uzsākta teksta ievade: a – pēc kursora,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
785 i — pirms kursora, A — rindas beigās, I — rindas sākumā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
786
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
787 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
788 6.3 nodarbība: VĒL VIENS AIZVIETOŠANAS VEIDS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
789
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
790 ** Lai aizvietotu vairāk kā vienu rakstzīmi, spiediet R **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
791
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
792 1. Pārvietojiet kursoru uz rindu ar atzīmi --->.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
793
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
794 2. Pārvietojiet kursoru uz pirmo no xxx
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
795
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
796 3. Spiediet R un ievadiet skaitli, kas norādīts apakšējā rindā tā,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
797 lai ievadītie cipari pārraksta xxx.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
798
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
799 4. Lai izietu no aizvietošanas režīma, spiediet <ESC>.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
800 Pārliecinieties, ka pārējais rindas saturs nav izmainīts.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
801
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
802 5. Atkārtojiet 2. — 4. soļa darbības, lai līdzīgi aizvietotu pārējos xxx.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
803
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
804 ---> Saskaitot xxx ar xxx iegūstam xxx.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
805 ---> Saskaitot 123 ar 456 iegūstam 579.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
806
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
807 PIEZĪME: Aizvietošanas režīms darbojas līdzīgi ievietošanas režīmam, ar
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
808 tikai ievadītās rakstzīmes aizvieto esošās.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
809
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
810 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
811 6.4 nodarbība: TEKSTA KOPĒŠANA UN IEVIETOŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
812
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
813 ** Lai kopētu tekstu, izmantojiet y, bet lai ievietotu — p **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
814
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
815 1. Pārvietojiet kursoru uz rindu ar atzīmi ---> un novietojiet kursoru
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
816 pēc "a)"
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
817
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
818 2. Ieslēdziet vizuālo režīmu, spiežot v un pārvietojiet kursoru līdz
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
819 "pirmais" (to neskaitot)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
820
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
821 3. Spiediet y lai iekopētu izcelto tekstu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
822
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
823 4. Pārvietojiet kursoru uz nākamās rindas beigām, spiežot j$
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
824
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
825 5. Spiediet p lai ievietotu nokopēto tekstu. Pēc tam spiediet <ESC>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
826
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
827 6. Ierakstiet otrās rindas beigās vārdu "otrais"
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
828
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
829 7. Līdzīgi, lietojot v y un p, nokopējiet vārdu "simtdivdesmitpiecgadnieks",
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
830 lai iegūtu rindu: šis ir otrais simtdivdesmitpiecgadnieks.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
831
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
832 ---> a) šis ir pirmais simtdivdesmitpiecgadnieks.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
833 b)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
834
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
835 PIEZĪME: y var lietot kopā ar pārvietošanās operatoru, piemēram,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
836 spiežot yw var nokopēt izvēlēto vārdu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
837 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
838 6.5 nodarbība: IESTATĪJUMU MAIŅA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
839
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
840 ** Iestatiet meklēšana un aizstāšana, neievērojot lielos/mazos burtus **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
841
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
842 1. Sameklējiet vārdu 'neievērot', ievadot: /neievērot <ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
843 Atkārtojiet meklēšanu, spiežot n
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
844
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
845 2. Iestatiet 'ic' (Neievērot lielos/mazos burtus) iestatījumu, ievadot: :set ic
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
846
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
847 3. Tagad sameklējiet 'neievērot' atkārtoti, spiežot n
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
848 Ievērojiet, ka tiek atrasti vārdi Neievērot un NEIEVĒROT.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
849
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
850 4. Iestatiet 'hlsearch' un 'incsearch' opcijas, ievadot: :set hls is
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
851
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
852 5. Ievadiet atkal sekojošo komandu, un skatieties, kas notiek: /neievērot <ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
853
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
854 6. Lai atceltu lielo/mazo burtu neievērošanu, ievadiet: :set noic
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
855
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
856 PIEZĪME: Lai atceltu atrasto vietu izcelšanu, ievadiet: :nohlsearch
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
857 PIEZĪME: Ja vēlaties meklēt gan lielos, gan mazos burtus vienā meklējumā,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
858 ievadiet papildu komandu \c
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
859 Piemēram: /neievērot\c <ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
860 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
861 6. nodarbības APKOPOJUMS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
862
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
863 Lai pārietu uz ievietošanas režīmu un:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
864
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
865 1. lai ievietotu jaunu rindu zem tekošās, ievadiet o
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
866 lai ievietotu jaunu rindu virs tekošās, ievadiet O
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
867
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
868 2. Lai ievietotu tekstu pēc kursora, ievadiet a
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
869 Lai ievietotu tekstu rindas beigās, ievadiet A
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
870
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
871 Normālajā režīmā:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
872
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
873 3. e komanda pārvieto kursoru uz vārda beigām.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
874
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
875 4. y komanda nokopē tekstu, bet p komanda ievieto to.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
876
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
877 5. R ieslēdz aizvietošanas režīmu, līdz tiek nospiests <ESC>.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
878
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
879 6. Ievadot ":set xxx" iestata "xxx" opciju. Dažas no tām ir sekojošas:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
880 'ic' 'ignorecase' meklējot neievēro lielos/mazos burtus.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
881 'is' 'incsearch' uzreiz meklē daļēji ievadīto frāzi.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
882 'hls' 'hlsearch' izgaismo atrastās frāzes.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
883 Var norādīt gan īso, gan garo opcijas nosaukumu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
884
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
885 7. Lai opciju izslēgtu, pievieno priedēkli "no". Piemēram, :set noic
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
886
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
887 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
888 7.1 nodarbība: PALĪDZĪBAS IEGŪŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
889
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
890
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
891 ** Iebūvētās palīdzības izmantošana **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
892
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
893 Vim ir plaša iebūvētā palīdzības sistēma. Lai sāktu to lietot, ievadiet vieno
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
894 no sekojošām komandām:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
895 - spiediet <HELP> taustiņu (ja jūsu tastatūrā tāds pastāv)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
896 - spiediet <F1> taustiņu (ja jūsu tastatūrai ir tāds)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
897 - ievadiet :help <ENTER>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
898
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
899 Izlasiet palīdzības aprakstu, lai saprastu, kā tas darbojas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
900 Ievadiet CTRL-W CTRL-W lai pārslēgtos uz citu logu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
901 Ievadiet :q <ENTER> lai aizvērtu palīdzības logu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
902
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
903 Jūs varat atrast konkrētu palīdzību par jebkuru komandu, ievadot:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
904 ":help" komanda. Piemēram (neaizmirstiet komandas beigās nospiest <ENTER>):
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
905
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
906 :help w
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
907 :help c_CTRL-D
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
908 :help insert-index
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
909 :help user-manual
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
910 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
911 7.2 nodarbība: IZVEIDOJIET SĀKŠANAS SKRIPTU
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
912
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
913 ** Ieslēdziet Vim iespējas **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
914
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
915 Vim ir daudz plašākas iespējas, nekā Vi, bet vairums no tām,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
916 pēc noklusēšanas, nav ieslēgtas. Lai tās ieslēgtu, izveidojiet "vimrc" failu.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
917
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
918 1. Atkarībā no lietotās operētājsistēmas, atveriet "vimrc" failu sekojoši:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
919 :e ~/.vimrc Unix-veidīgā (t.sk. MacOS un Linux)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
920 :e $VIM/_vimrc VMS-veidīgā (t.sk. MS-Windows)
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
921
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
922 2. Ielasiet "vimrc" šablona faila saturu, ievadot:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
923 :r $VIMRUNTIME/vimrc_example.vim
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
924
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
925 3. Saglabājiet šablona saturu savā iestatījumu failā:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
926 :w
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
927
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
928 Kad nākamo reizi atvērsiet Vim, tajā tiks izmantota sintakses izgaismošana.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
929 Jūs varat ievietot arī citas iestatījumu iespējas savā "vimrc" failā.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
930 Papildu informācijai ievadiet :help vimrc-intro
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
931
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
932 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
933 7.3 nodarbība: AUTOMĀTISKĀ PABEIGŠANA
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
934
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
935 ** Automātisko pabeigšanu komandrindā izsauc ar CTRL-D un <TAB> **
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
936
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
937 1. Pārliecinieties, ka Vim ir ar Vi nesavietojamā režīmā: :set nocp
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
938
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
939 2. Apskatiet tekošās mapes saturu Vim, ievadot: :!ls vai :!dir
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
940
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
941 3. Ievadiet komandas sākumu ar: :e
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
942
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
943 4. Spiediet CTRL-D un Vim parādīs visas komandas, kuras sākas ar "e".
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
944
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
945 5. Spiediet <TAB> un Vim automātiski pabeigs komandu uz ":edit".
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
946
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
947 6. Spiediet atstarpes taustiņu un sāciet ievadīt faila nosaukumu,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
948 piemēram: :edit FIL
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
949
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
950 7. Spiediet <TAB> un Vim pabeigs faila nosaukumu,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
951 ja norādītais sākums ir unikāls.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
952
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
953 PIEZĪME: Pabeigšana strādā dažādām komandām.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
954 Vienkārši mēģiniet spiest CTRL-D un <TAB>.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
955 Šī iespēja var būt īpaši noderīga, ievadot :help .
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
956
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
957 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
958 7. nodarbības APKOPOJUMS
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
959
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
960
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
961 1. Lai atvērtu palīdzības logu, ievadiet :help vai spiediet <F1> vai <Help>
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
962
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
963 2. Lai atvērtu palīdzību par "komanda", ievadiet :help komanda
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
964
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
965 3. Lai pārslēgtos uz citu logu, spiediet: CTRL-W CTRL-W
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
966
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
967 4. Lai aizvērtu tekošo logu, ievadiet: :q
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
968
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
969 5. Izveidojiet savu "vimrc" sākšanas skriptu ar saviem iestatījumiem.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
970
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
971 6. Ievadot : komanda spiediet CTRL-D, lai apskatītu iespējamos pabeigšanas
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
972 veidus. Lai pabeigtu komandu, spiediet <TAB> .
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
973
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
974
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
975
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
976
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
977 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
978
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
979 Ar šo Vim ievads ir pabeigts. Tajā tika sniegts īss Vim redaktora apraksts,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
980 ar kuru pietiek, lai Vim lietotu vienkāršām darbībām.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
981 Vim iespējas ir daudz plašākas, un tajā ir daudz vairāk komandu. Lai apskatītu
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
982 tās, ievadiet: ":help user-manual".
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
983
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
984 Tālākai apmācībai tiek rekomendētas sekojošas grāmatas:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
985
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
986 Vim - Vi Improved, Steve Oualline, New Riders
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
987
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
988 Šī grāmata ir tieši par Vim, un ir ļoti ieteicama iesācējiem.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
989 Daudzi piemēri un attēli no tās pieejami: http://iccf-holland.org/click5.html
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
990
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
991 Otra, vecāka grāmata ir par Vi, nevis Vim, bet arī ir ļoti noderīga:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
992
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
993 Learning the Vi Editor, Linda Lamb, O'Reilly & Associates Inc.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
994
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
995 Tajā ir visplašākais Vi iespēju apraksts, grāmatas sestajā laidienā ir
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
996 aprakstītas arī Vim iespējas.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
997
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
998 Šīs pamācības variantu angļu valodā izveidoja:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
999
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1000 * Michael C. Pierce,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1001 * Robert K. Ware,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1002 * Charles Smith,
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1003 * Bram Moolenaar.
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1004
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1005 Pamācību latviešu valodā tulkoja:
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1006
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1007 * Valdis Vītoliņš
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1008
34c8ec888122 Update runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1009 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~