annotate runtime/tutor/tutor.sk @ 834:5117153003bd v7.0e

updated for version 7.0e
author vimboss
date Sun, 16 Apr 2006 18:30:08 +0000
parents 3fc0f57ecb91
children 5a7843c57316
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 ===============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 = V i t a j t e v o V I M T u t o r i a l i - Verzia 1.5 =
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 ===============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 Vim je veľmi výkonný editor, ktorý má príliž veľa príkazov na to aby
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 mohli byt všetky popísané vo výuke akou je táto. Táto výuka
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 popisuje dostatočné množstvo príkazov nato aby bolo možné používať
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 Vim ako viacúčelový editor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 Približný čas potrebný na prebratie tejto výuky je 25-30 minút,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 závisí na tom, koľko je stráveného času s preskúšavaním.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 Príkazy v lekciách modifikujú text. Vytvor kópiu tohto súboru aby
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 sa mohlo precvičovať na ňom (pri štarte "vimtutor" je toto kópia).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 Je dôležité zapamätať si, že táto výuka je vytvorená pre výuku
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 používaním. To znamená, že je potrebné si príkazy vyskúšať, aby bolo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 učenie správne. Ak len čitas text, príkazy zabudneš!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 Presvedč sa, že Shift-Lock NIEJE stlačený a stlačt klávesu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 j niekoľko krát, aby sa kurzor posunul natoľko, že lekcia 1.1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 celkom zaplní obrazovku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 Lekcia 1.1: POHYB KURZOROM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 ** Pre pohyb kurzorum stlač klávesy h,j,k,l ako je znázornené. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 ^
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 k Funkcia: Klávesa h je naľavo a vykoná pohyb doľava.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 < h l > Klávesa l je napravo a vykoná pohyb doprava.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 j Klávesa j vyzerá ako šípka dole
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 v
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 1. Pohybuj kurzorom po obrazovke, kým si na to nezvykneš.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 2. Drž stlačenú klávesu pre pohyb dole (j), kým sa jej funkcia nezopakuje.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 ---> Teraz sa už vieš pohybovať na nasledujúcu lekciu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 3. Použitím klávesy pre pohyb dole prejdi na Lekciu 1.2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 Poznámka: Ak si niesi istý tým čo si napísal, stlač <ESC>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 na prechod do normálneho módu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 Poznámka: Kurzorové klávesy sú tiež funkčné. Ale používaním hjkl sa budeš
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 schopný pohybovať rýchlejšie, keď si zvykneš ich používať.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 LEKCIA 1.2: SPÚŠŤANIE A ZATVÁRANIE VIMU
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 !! POZNÁMKA: Pred vykonaním týchto krokov si prečítaj celú túto lekciu !!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 1. Stlač klávesu <ESC> (aby si sa učite nachádzal v normálnom móde)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 2. Napíš: :q! <ENTER>.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 ---> Tým ukončíš prácu s editorom BEZ uloženia zmien, ktoré si vykonal.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 Ak chceš uložiť vykonané zmeny a ukončiť prácu s editorom napíš:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 :wq <ENTER>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 3. Keď sa dostaneš na príkazový riadok, napíš príkaz, ktorým sa dostaneš
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 speť do tejto výuky. To môže byť: vimtutor <ENTER>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 Zvyčajne sa používa: vim tutor <ENTER>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 ---> 'vim' znamená spustenie editora vim, 'tutor' je názov súboru, ktorý
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 chceš editovať.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 4. Ak si si tieto kroky spoľahlivo zapamätal, vykonaj kroky 1 až 3, pre
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 ukončenie a znovu spustenie editora. Potom presuň kurzor dole na
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 lekciu 1.3.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 Lekcia 1.3: EDITÁCIA TEXTU - MAZANIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 ** Stlačenie klávesy x v normálnom móde zmaže znak na mieste kurzora. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 1. Presuň kurzor nižšie na riadok označený značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 2. Aby si mohol odstrániť chyby, pohybuj kurzorom kým neprejde na znak,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 ktorý chceš zmazať.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 3. Stlač klávesu x aby sa zmazal nechcený znak.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 4. Zopakuj kroky 2 až 4 až kým veta nieje správna.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 ---> Kraava skoočilla ccezz mesiiac.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 5. Ak je veta správna, prejdi na lekciu 1.4.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 POZNÁMKA: Neskúšaj si zapametäť obsah tejto výuky, ale sa uč používaním.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 Lekcia 1.4: EDITÁCIA TEXTU - VKLADANIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 ** Stlačenie klávesy i v normálnom móde umožňuje vkladanie textu. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 1. Presuň kurzor nižšie na prvý riadok za značku --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 2. Pre upravenie prvého riadku do rovnakého tvaru ako je druhý riadok,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 presuň kurzor na prvý znak za misto, kde má byť text vložený.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 3. Stlač klávesu i a napíš potrebný text.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 4. Po opravení každej chyby, stlač <ESC> pre návrat do normálneho módu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 Zopakuj kroky 2 až 4 kým nieje veta správna.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 ---> Tu je text chýbajúci tejto.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 ---> Tu je nejaký text chýbajúci od tejto čiary.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 5. Keď sa dostatočne naučíš vkladať text, prejdi na nasledujúce zhrnutie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 ZHRNUTIE LEKCIE 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 1. Kurzor sa pohybuje použitím kláves so šípkami alebo klávesmi hjkl.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 h (do lava) j (dole) k (hore) l (doprava)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 2. Pre spustenie Vimu (z príkazového riadku) napíš: vim FILENAME <ENTER>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 3. Na ukončenie Vimu napíš: <ESC> :q! <ENTER> pre zrušenie všetkých zmien
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 alebo napíš: <ESC> :wq <ENTER> pre uloženie zmien.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 4. Na zmazanie znaku na mieste kurzora napíš v normálnom móde: x
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 5. Pre vloženie textu na mieste kurzora v normálnom móde napíš:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 i vkladaný text <ESC>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 POZNÁMKA: Stlačenie <ESC> ťa premiestní do normálneho módu alebo zruší
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 nejaký nechcený a čiastočne dokončený príkaz.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 Teraz pokračuj lekciou 2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 Lekcia 2.1: Mazacie príkazy
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 ** Napísanie príkazu dw zmaže znaky do konca slova. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 1. Stlač <ESC> aby si bol bezpečne v normálnom móde.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 2. Presuň kurzor nižšie na riadok označený značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 3. Presuň kurzor na začiatok slova, ktoré je potrebné zmazať.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 4. Napíš dw aby slovo zmizlo.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 POZNÁMKA: Písmená dw sa zobrazia na poslednom riadku obrazovky tak ako ich
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 píšeš. Ak píšeš niečo zle, stlač <ESC> a začni znova.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 ---> Tu je niekoľko slov zábava, ktoré nie patria list do tejto vety.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 5. Zopakuj kroky 3 až 4 kým veta nieje správna a prejdi na lekciu 2.2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 Lekcia 2.2: VIAC MAZACÍCH PRÍKAZOV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 ** Napísanie príkazu d$ zmaže znaky do konca riadku **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 1. Stlač <ESC> aby si bol bezpečne v normálnom móde.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 2. Presuň kurzor nižšie na riadok označený značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 3. Presuň kurzor na koniec správnej vety (ZA prvú bodku).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 4. Napíš d$ aby sa zmazali znaky do konca riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 ---> Niekto napísal koniec tohto riadku dvakrát. koniec tohot riadku dvakrát.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 5. Prejdi na lekciu 2.3 pre pochopenie toho čo sa stalo.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 Lekcia 2.3: ROZŠIROVACIE PRÍKAZY A OBJEKTY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 Formát mazacieho príkazu d je nasledovný:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 [číslo] d objekt ALEBO d [číslo] objekt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 Kde:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 číslo - udáva koľko krát sa príkaz vykoná (voliteľné, implicitne=1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 d - je príkaz pre mazanie
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 objekt - udáva na čom sa príkaz vykonáva (vypísané nižšie)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 Krátky výpis objektov:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 w - od kurzora do konca slova, vrátanie medzier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 e - od kurzora do konca slova, BEZ medzier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 $ - od kurzora do konca riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 POZNÁMKA: Ak stlačíš klávesu objektu v normálnom móde bez príkazu, kurzor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 sa presunie na miesto špecifikované vo výpise objektov.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 Lekcia 2.4: VÝNIMKA V 'PRÍKAZOVOM OBJEKTE'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 ** Napísanie príkazu dd zmaže celý riadok. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 Vzhľadom na frekvenciu mazania celého riadku, sa autori Vimu rozhodli,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 že bude jednoduchšie mazať celý riadok napísaním dvoch písmen d.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 1. Presuň kurzor na druhý riadok v texte na spodu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 2. Napíš dd aby si zmazal riadok.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 3. Prejdi na štvrtý riadok.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 4. Napíš 2dd (pametaj si číslo-príkaz-objekt) aby si zmazal dva riadky.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 1) Ruže sú červené,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 2) Blato je zábavné,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 3) Fialky sú modré,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 4) Mám auto,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 5) Hodinky ukazujú čas,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 6) Cukor je sladký,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 7) A to si ty.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 Lekcia 2.5: PRÍKAZ UNDO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 ** Stlač u pre vrátenie posledného príkazu, U pre úpravu celého riadku. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 1. Presuň kurzor nižšie na riadok označený značkou ---> a premiestni ho na
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 prvú chybu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 2. Napíš x pre zmazanie prvého nechceného riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 3. Teraz napíš u čím vrátíš späť posledne vykonaný príkaz.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 4. Teraz oprav všetky chyby na riadku použitím príkazu x .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 5. Teraz napíš veľké U čím vrátíš riadok do pôvodného stavu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 6. Teraz napíš u niekoľko krát, čím vrátíš späť príkaz U.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 7. Teraz napíš CTRL-R (drž klávesu CTRL stlačenú kým stláčaš R) niekoľko
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 krát, čím vrátíš späť predtým vrátené príkazy (redo).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 ---> Opprav chybby nna toomto riadku a zmeeň ich pommocou undo.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 8. Tieto príkazy sú často používané. Teraz prejdi na zhrnutie lekcie 2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 LEKCIA 2 ZHRNUTIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 1. Pre zmazanie znakov od kurzora do konca slova napíš: dw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 2. Pre zmazanie znakov od kurzora do konca riadku napíš: d$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 3. Pre zmazanie celého riadku napíš: dd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 4. Formát pre píkaz v norálnom móde je:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 [číslo] príkaz objekt ALEBO príkaz [číslo] objekt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 kde:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 číslo - udáva koľko krát sa príkaz zopakuje
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 príkaz - udáva vykonávaný príkaz, ako napríklad d pre mazanie
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 objekt - udáva rozsah príkazu, ako napríklad w(slovo),
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 $ (do konca riadku), atď.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 5. Pre vrátenie späť predošlej operácie napíš: u (malé u)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 Pre vrátenie všetkých úprav na riadku napíš: U (veľké U)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 Pre vrátenie vrátených úprav napíš: CTRL-R
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 Lekcia 3.1: PRÍKAZ VLOŽIŤ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 ** Napísanie príkazu p vloží psledný výmaz za kurzor. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 1. Presuň kurzor nižšie na prvý riadok textu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284 2. Napíš dd čím zmažeš riadok a uložíš ho do buffera editora Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 3. Presuň kurzor vyššie tam, kam zmazaný riadok patrí.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 4. Ak napíšeš v normálnom móde p zmazaný riadk sa vloží.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 5. Zopakuj kroky 2 až 4, kým riadky niesú v správnom poradí.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 d) Tiež sa dokážeš vzdelávať?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 b) Fialky sú modré,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 c) Inteligencia sa vzdeláva,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295 a) Ruže sú červené,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 Lekcia 3.2: PRÍKAZ NAHRADENIA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 ** Napísaním r a znaku sa nahradí znak na mieste kurzora. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
305 1. Presuň kurzor nižšie na prví riadok textu označeného značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
307 2. Presuň kurzor na začiatok prvej chyby.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 3. napíš r a potom znak, ktorý nahradí chybu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311 4. Zopakuj kroky 2 a 3, kým prvý riadok nieje správny.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 ---> Kaď bol tento riasok píaaný, niekro stlašil nesprábne klávesy!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 ---> Keď bol tento riadok písaný, niekto stlačil nesprávne klávesy!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 5. Teraz prejdi na lekciu 3.2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 POZNÁMKA: Pamätaj si, že naučiť sa môžeš len používanim, nie pamätaním.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 Lekcia 3.3. PRÍKAZ ÚPRAVY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326 ** Ak chceš zmeniť časť slova alebo celé slovo, napíš cw . **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328 1. Presuň kurzor nižšie na prvý riadok označený značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330 2. Umiestni kurzor na písmeno o v slove rosfpl.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332 3. Napíš cw a oprav slovo (v tomto prípade napíš 'iadok'.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334 4. Stlač <ESC> a prejdi na ďalšiu chybu (prvý znak, ktorý treba zmeniť.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 5. Zopakuj kroky 3 a 4, kým prvá veta nieje rovnaká ako druhá.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 ---> Tento rosfpl má niekoľko skic, ktoré je pirewvbí zmeniť piyťučán príkazu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 ---> Tento riadok má niekoľko slov, ktoré je potrebné zmeniť použitím príkazu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 Poznámka, že cw nielen nahrádza slovo, ale ťa aj premiestní do vkladania.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346 Lekcia 3.4: VIAC ZMIEN POUŽITÍM c
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 ** Príkaz pre úpravy sa používa s rovnakými objektami ako pre mazanie **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351 1. Príkaz pre úpravy pracuje rovnako ako pre mazanie. Formát je:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353 [číslo] c objekt ALEBO c [číslo] objekt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 2. Objekty sú rovnaké, ako napríklad w (slovo), $ (koniec riadku), atď.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 3. Presuň kurzor nižšie na prvý riadok označený značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
358
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359 4. Presuň kurzor na prvú chybu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361 5. napíš c$ aby si mohol upraviť zvyšok riadku podľa druhého
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 a stlač <ESC>.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 ---> Koniec tohto riadku potrebuje pomoc, aby bol ako druhy.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 ---> Koniec tohto riadku potrebuje opraviť použitím príkazu c$ .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370 LEKCIA 3 ZHRNUTIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 1. Na vloženie textu, ktorý už bol zmazaný, napíš p . To vloží zmazaný
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374 text ZA kurzor (ak bol riadok zmazaný prejde na riadok pod kurzorom).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376 2. Pre naradenie znaku na mieste kurzora, napíš r a potom znak, ktorý
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377 nahradí pôvodný znak.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
378
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379 3. Príkaz na upravenie umožňuje zmeniť špecifikovaný objekt od kurzora
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
380 až po koniec objektu. napr. Napíš cw čím zmníš text od pozície
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381 kurzora do konca slova, c$ zmení text do konca riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 4. Format pre nahradenie je:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
385 [číslo] c objekt ALEBO c [číslo] objekt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 Teraz prejdi na nalsedujúcu lekciu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
389
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
393 Lekcia 4.1: POZÍCIA A STATUS SÚBORU
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
394
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
396 ** Stlač CTRL-g pre zobrazenie svojej pozície v súbore a statusu súboru.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397 Stlač SHIFT-G pre prechod na riadok v súbore. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
399 Poznámka: Prečítaj si celú túto lekciu skôr ako začneš vykonávať kroky!!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401 1. Drž stlačenú klávesu Ctrl a stlač g . Na spodu obrazovky sa zobrazí
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 stavový riadok s názvom súboru a riadkom na ktorom práve si. Zapamätaj
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403 si si číslo riadku pre krok 3.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 2. Stlač Shift-G čím sa dostaneš na spodok súboru.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407 3. Napíš číslo riadku na ktorom si sa nachádzal a stlač Shift-G. To ťa
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 vráti na riadok, na ktorom si prvý krát stlačil Ctrl-g.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 (Keď píšeš čísla, tieto sa nezobrazujú na obrazovke.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
411 4. Ak sa cítíš schopný vykonať teto kroky, vykonaj kroky 1 až 3.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
412
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
413
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
414
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
415 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
416 Lekcia 4.2: PRÍKAZ VYHĽADÁVANIA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
419 ** Napíš / nasledované reťazcom pre vyhľadanie príslušného reťazca. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421 1. Napíš znak / v normálnom móde. Poznámka, že tento znak sa spolu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422 s kurzorom zobrazí v dolnej časti obrazovky ako s : príkazom.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424 2. Teraz napíš 'errroor' <ENTER>. To je slovo, ktoré chceš vyhľadať.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426 3. Pre vyhľadanie ďalšieho výskytu rovnakého reťazca, stlač jednoducho n.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 Pre vyhľadanie ďalšieho výskytu rovnakého reťazca opačným smerom,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 napíš Shift-N.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 4. Ak chceš vyhľadať reťazec v spätnom smere, použí príkaz ? miesto
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431 príkazu /.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 ---> Keď vyhľadávanie dosiahne koniec tohto súboru, bude pokračovať na
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 začiatku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 "errroor" nie je spôsob ako nahradiť error; errroor je error.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 POZNÁMKA: Keď vyhľadávanie dosiahne koniec súboru, bude pokračovať na jeho
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439 začiatku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443 Lekcia 4.3: VYHĽADÁVANIE ZODPOVEDAJÚCICH ZÁTAVORIEK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446 ** Napíš % pre vyhľadanie príslušného znaku ),], alebo } . **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 1. Premiestni kurzor na hocaký zo znakov (, [, alebo { v riadku nižšie
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449 označeného značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451 2. Teraz napíš znak % .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453 3. Kurzor sa premiestni na zodpovedajúcu zátvorku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455 4. Napíš % pre presun kurzoru späť na otvárajúcu zátvorku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 ---> Toto ( je testovací riadok s ('s, ['s ] a {'s } v riadku. ))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459 Poznámka: Toto je veľmi výhodné použíť pri ladení programu s chýbajúcimi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
460 uzatvárajúcimi zátvorkami.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466 Lekcia 4.4: SPOSOB AKO ZMENIŤ CHYBY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469 ** Napíš :s/starý/nový/g pre nahradenie slova 'starý' za slovo 'nový'. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471 1. Presuň kurzor nižšie na riadok označený značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 2. Napíš :s/thee/the <ENTER> . Poznamka, že tento príkaz zmení len prvý
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 výskyt v riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476 3. Teraz napíš :s/thee/the/g čo znamená celkové nahradenie v riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
477 Toto nahradí všetky výskyty v riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479 ---> Thee best time to see thee flowers in thee spring.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 4. Pre zmenu všetkých výskytov daného reťazca medzi dvomi ridakami,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482 napíš :#,#s/starý/nový/g kde #,# sú čísla dvoch riadkov.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 napíš :%s/starý/nový/g pre zmenu všetkých výskytov v celom riadku
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
485
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489 LEKCIA 4 ZHRNUTIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
491
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
492 1. Ctrl-g vypíše tvoju pozíciu v súbore a status súboru.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493 Shift-g ťa premiestni na koniec riadku. Číslo riadku nasledované
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
494 Shift-g ťa presunie na dané číslo riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
495
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496 2. Napísanie / nasledované reťazcom vyhľadá reťazec smerom DOPREDU.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497 Napísanie ? nasledované reťazcom vyhľada reťazec smerom DOZADU.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498 Napísanie n po vyhľadávaní, vyhľadá nasledujúci výskyt reťazca
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499 v rovnakom smere, pričom Shift-N vyhľadá v opačnom smere.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
500
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501 3. Napísanie % keď kurzor je na (,),[,],{, alebo } nájde zodpovdajúcu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
502 párú zátvorku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
503
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
504 4. Pre nahradenie nového za prvý starý v riadku napíš :s/nový/starý
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505 Pre nahradenie nového za všetky staré v riadku napíš :s/nový/starý/g
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506 Pre nahradenie reťazcov medzi dvoma riadkami 3 napíš :#,#/nový/starý/g
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
507 Pre nahradenie všetkých výskytov v súbore napíš :%s/starý/nový/g
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
508 Pre potvrdenie každého nahradenia pridaj 'c' :%s/nový/starý/gc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
509
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
510
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
511 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
512 Lekcia 5.1 AKO SPUSTIŤ VONKAJŠÍ PRÍKAZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
513
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
514
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515 ** Napíš príkaz :! nasledovaný vonkajším príkazom pre spustenie príkazu **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
517 1. Napíš obvyklý píkaz : ktorý nastaví kurzor na spodok obrazovky.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
518 To umožní napísať príkaz.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
519
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
520 2. Teraz napíš ! (výkričník). To umožní spustiť hociaký vonkajší príkaz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
521 z príkazového riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
522
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
523 3. Ako príklad napíš ls za ! a stlač <ENTER>. Tento príkaz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
524 zobrazí obsah tvojho adresára rovnako ako na príkazovom riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
525 Alebo použi :!dir ak ls nefunguje.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
526
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
527 Poznámka: Takto je možné spustiť hociaký vonkajší príkaz.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
528 Poznámka: Všetky príkazy : musia byť dokončené stlačením <ENTER>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
529
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
530
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
531
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
532
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
533 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
534 Lekcia 5.2: VIAC O UKLADANÍ SÚBOROV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
535
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
536
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
537 ** Pre uloženie zmien v súbore, napíš :w FILENAME. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
538
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
539 1. Napíš :!dir alebo :!ls pre výpis aktuálneho adresára.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
540 Už vieš, že musíš za týmto stlačiť <ENTER> .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
541
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
542 2. Vyber názov súboru, ktorý EŠTE neexistuje.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
543
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
544 3. Teraz napíš: :w TEST (kde TEST je názov vybratého súboru.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
545
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
546 4. To uloží celý súbor (Vim Tutor) pod názovm TEST.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
547 Pre overenie napíš :!dir , čím zobrazíš obsah adresára.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
548
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
549 Poznámka: že ak ukončíš prácu s editorom Vim a znovu ho spustíš s názvom
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
550 súboru TEST, súbor bude kópia výuky, keď si ho uložil.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
551
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
552 5. Teraz odstráň súbor napísaním (MS-DOS): :!del TEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
553 alebo (Unix): :!rm TEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
554
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
555
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
556 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
557 Lekcia 5.3 VÝBEROVÝ PRÍKAZ PRE ULOŽENIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
558
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
559
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
560 ** Pre uloženie časti súboru, napíš :#,# w FILENAME **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
561
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
562 1. Znovu napíš :!dir alebo :!ls pre zobrazenie obsahu aktuálneho
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
563 adresára a vyber vhodný súbor ako TEST.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
564
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
565 2. Presuň kurzor na vrch tejto strany a napíš Ctrl-g pre vyhľadanie čísla
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
566 tohto riadku. PAMETAJ SI TOTO ČÍSLO!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
567
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
568 3. Teraz prejdi na spodok strany a napíš Ctrl-g znovu. ZAPAMETAJ SI ČÍSLO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
569 AJ TOHTO RIADKU!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
570
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
571 4. Pre uloženie LEN časti súboru, napíš :#,# w TEST kde #,# sú dve čísla
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
572 zapamätaných riadkov (vrch, spodok) a TEST je názov súboru.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
573
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
574 5. Znova sa pozri, či tam ten súbor je pomocou príkazu :!dir ale
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
575 NEODSTRAŇUJ ho.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
576
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
577
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
578
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
579 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
580 Lekcia 5.4: VÝBER A ZLUČOVANIE SÚBOROV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
581
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
582
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
583 ** Pre vloženie obsahu súboru, napíš :r FILENAME **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
584
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
585 1. Napíš :!dir aby si sa presvedčil, že súbor TEST stále existuje.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
586
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
587 2. Presuň kurzor na vrch tejto strany.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
588
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
589 POZNÁMKA: Po vykonaní kroku 3 uvidíš Lekciu 5.3. Potom sa presuň dole
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
590 na túto lekciu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
591
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
592 3. Teraz vlož súbor TEST použitím príkazu :r TEST kde TEST je názov
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
593 súboru.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
594
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
595 POZNÁMKA: Súbor, ktorý si vložil sa vloží od miesta, kde sa nachádza kurzor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
596
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
597 4. Pre kontrolu vloženia súboru, presuň kurzor späť a všimni si, že teraz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
598 máš dve kópie lekcie 5.3, originál a súborovú verziu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
599
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
601
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
602 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
603 LEKCIA 5 ZHRNUTIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
604
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
605
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
606 1. :!príkaz spustí vonkajší príkaz.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
607
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
608 Niektoré využiteľné príklady sú:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
609 (MS_DOS) (UNIX)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
610 :!dir :!ls - zobrazí obsah adresára
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
611 :!del FILENAME :!rm FILENAME - odstráni súbor FILENAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
612
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
613 2. :w FILENAME uloží aktuálny súbor na disk pod menom FILENAME.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
614
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
615 3. :#,#w FILENAME uloží riadky od # do # do súboru FILENAME.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
616
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
617 4. :r FILENAME vyberie z disku súbor FILENAME a vloží ho do aktuálneho
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
618 súboru za pozíciou kurzora.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
619
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
620
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
621
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
622
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
623
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
624
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
625
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
626 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
627 Lekcia 6.1: PRÍKAZ OTVORIŤ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
628
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
629
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
630 ** Napíš o pre vloženie riadku pod kurzor a prepnutie do vkladacieho módu **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
631
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
632 1. Presuň kurzor nižšie na riadok označený značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
633
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
634 2. Napíš o (malé písmeno) pre vloženie čistého riadku pod kurzorm
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
635 a prepnutie do vkladacieho módu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
636
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
637 3. Teraz skopíruj riadok označený ---> a stlač <ESC> pre ukončenie
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
638 vkladacieho módu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
639
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
640 ---> Po napísaní o sa kurzor premiestní na vložený riadok do vkladacieho
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
641 módu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
642
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
643 4. Pre otvorenie riadku nad kurzorom, jednotucho napíš veľké O , namiesto
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
644 malého o. Vyskúšaj si to na nasledujúcom riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
645 Vlož riadok nad týmto napísaním Shift-O, keď kurzor je na tomto riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
646
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
647
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
648
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
649 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
650 Lekcia 6.2: PRÍKAZ PRIDAŤ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
651
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
652
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
653 ** Napíš a pre vloženie textu ZA kurzor. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
654
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
655 1. Presuň kurzor nižšie na koniec prvého riadku označeného značkou --->
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
656 napísaním $ v normálnom móde.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
657
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
658 2. Napíš a (malé písmeno) pre pridanie textu ZA znakom na mieste
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
659 kurzora. (Veľké A pridá na koniec riadku.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
660
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
661 Poznámka: Toto obchádza písanie i , posledný znak, text na vloženie, <ESC>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
662 kurzor doprava, a nakoniec, x , na pridávanie na koniec riadku!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
663
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
664 3. Teraz dokonči prvý riadok. Poznámka, že pridávanie je vlastne rovnaké
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
665 ako vkladací mód, okrem miesta, kde sa text vkladá.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
666
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
667 ---> Tento riadok ti dovoľuje nácvik
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
668 ---> Tento riadok ti dovoľuje nácvik pridávania textu na koniec riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
669
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
670
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
671
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
672 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
673 Lekcia 6.3: INÝ SPOSOB NAHRADZOVANIA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
674
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
675
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
676 ** Napíš veľké R pre nahradenie viac ako jedného znaku. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
677
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
678 1. Presuň kurzor nižšie na prvý riadok označený značkou --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
679
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
680 2. Premiestni kurzor na začiatok prvého slova, ktoré je odlišné od druhého
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
681 riadku označeného ---> (slovo 'posledná').
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
682
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
683 3. Teraz napíš R a nahraď zvyšok textu na prvom riadku písaním cez starý
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
684 text tak, aby prvý riadok bol rovnaký ako druhý.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
685
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
686 ---> Na úpravu prvého riadku do tvaru ako je posledný na strane použi klávesy.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
687 ---> Na úpravu prvého riadku do tavru ako je druhý, napíš R a nový text.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
688
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
689 4. Poznámka, že ak stlačíš <ESC> pre ukončenie, všetok nezmenený text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
690 zostane.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
691
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
692
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
693
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
694 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
695 Lekcia 6.4: NASTAVENIE MOŽNOSTÍ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
696
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
697
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
698 ** Nastav možnosti, takže vyhľadávanie alebo nahradzovanie ignoruje
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
699 rozlišovanie **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
700
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
701
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
702 1. Vyhľadaj reťazec 'ignore' napísaním:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
703 /ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
704 Zopakuj vyhľadávanie niekoľko krát stlačením klávesy n
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
705
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
706 2. Nastav možnosť 'ic' (Ignore case) napísaním príkazu:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
707 :set ic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
708
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
709 3. Teraz vyhľadaj reťazec 'ingore' znova stlačením klávesy: n
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
710 Zopakuj vyhľadávanie niekoľko krát stlačením klávesy n
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
711
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
712 4. Nastav možnosťi 'hlsearch' a 'incsearch':
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
713 :set hls is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
714
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
715 5. Teraz spusti vyhľadávací príkaz znovu, a pozri čo sa stalo:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
716 /ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
717
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
718 6. Na odstránenie zvýraznenia výrazov napíš:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
719 :nohlsearch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
720
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
721 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
722 LEKCIA 6 ZHRNUTIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
723
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
724
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
725 1. Napísaním o sa otvorí nový riadok pod kurzorom a premiestni sa kurzor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
726 na vložený riadok do vkladacieho módu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
727 napísaním veľkého O sa otvorí riadok nad aktuálnym riadkom s kurzorom.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
728
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
729 2. Napíš a pre vkladanie textu ZA znak na pozícii kurzoru.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
730 Napísaním veľkého A sa text automatický pridáva na koniec riadku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
731
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
732 3. Napísanie veľkého R prepne do nahradzovacieho módu, kým nieje
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
733 stlačené <ESC> pre ukončenie nahradzovacieho módu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
734
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
735 4. Napísanie ":set xxx" nastaví možnosť "xxx".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
736
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
737
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
738
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
739
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
740
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
741
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
742
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
743
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
744 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
745 LEKCIA 7: PRÍKAZY ON-LINE NÁPOVEDY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
746
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
747
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
748 ** Používaj on-line systém nápovedy **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
749
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
750 Vim má obsiahly on-line systém nápovedy. Pre odštartovanie, vyskúšaj jeden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
751 z týchto troch:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
752 - stlač klávesu <HELP> (ak nejakú máš)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
753 - stlač klávesu <F1> (ak nejakú máš)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
754 - napíš :help <ENTER>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
755
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
756 Napíš :q <ENTER> čím zatvoríš okno nápovedy.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
757
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
758 Môžeš nájsť help ku hociakej téme pridaním argumentu ku príkazu ":help".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
759 Vyskúšaj tieto (nezabudni stlačiť <ENTER>):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
760
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
761 :help w
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
762 :help c_<T
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
763 :help insert-index
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
764 :help user-manual
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
765
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
766
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
767 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
768 LEKCIA 8: VYTVORENIE ŠTARTOVACIEHO SKRIPTU
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
769
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
770 ** Zapni funkcie editora Vim **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
771
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
772 Vim má omnoho viac funkcii než Vi, ale večšina z nich je implicitne
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
773 vypnutá. Pre používanie viac Vim funkcii vytvor "vimrc" súbor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
774
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
775 1. Začni editovať "vimrc" súbor, to závisí na použitom systéme:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
776 :edit ~/.vimrc pre Unix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
777 :edit $VIM/_vimrc pre MS-Windows
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
778
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
779 2. Teraz si prečítaj text príkladu "vimrc" súboru:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
780
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
781 :read $VIMRUNTIME/vimrc_example.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
782
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
783 3. Ulož súbor:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
784
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
785 :write
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
786
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
787 Pri nasledujúcom štarte editora Vim sa použije zvýrazňovanie syntaxe.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
788 Do "vimrc" súboru môžeš pridať všetky svoje uprednostňované nastavenia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
789
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
790 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
791
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
792 Toto vymedzuje výuku Vimu. Toto je určené pre strucný prehľad o editore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
793 Vim, úplne postačujúce pre ľahké a obstojné používanie tohto editora.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
794 Táto výuka je ďaleko od kompletnosti, pretože Vim má omnoho viacej príkazov.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
795 Ako ďalšie si prečítaj užívatľský manuál: ":help user-manual".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
796
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
797 Pre ďalšie čítanie a štúdium je odporúčaná kniha:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
798 Vim - Vi Improved - od Steve Oualline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
799 Vydavateľ: New Riders
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
800 Prvá kniha určená pre Vim. Špeciálne vhodná pre začiatočníkov.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
801 Obsahuje množstvo príkladov a obrázkov.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
802 Pozri na http://iccf-holland.org/click5.html
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
803
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
804 Táto kniha je staršia a je viac o Vi ako o Vim, ale je tiež odporúčaná:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
805 Learning the Vi Editor - od Linda Lamb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
806 Vydavateľ: O'Reilly & Associates Inc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
807 Je to dobrá kniha pre získanie vedomostí o práci s editorom Vi.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
808 Šieste vydanie obsahuje tiež informácie o editore Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
809
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
810 Táto výuka bola napísaná autormi Michael C. Pierce a Robert K. Ware,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
811 Colorado School of Mines s použitím myšlienok dodanými od Charles Smith,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
812 Colorado State University. E-mail: bware@mines.colorado.edu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
813
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
814 Modifikované pre Vim od Bram Moolenaar.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
815
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
816 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
817
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
818 Preklad do Slovenčiny: Ľuboš Čelko
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
819 e-mail: celbos@inmail.sk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
820 Last Change: 2004 Apr 29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
821 Encoding: iso8859-2