annotate runtime/tutor/tutor.pl @ 575:f1d46f948241 v7.0163

updated for version 7.0163
author vimboss
date Tue, 06 Dec 2005 20:04:44 +0000
parents 8ff7fd162d3c
children 23f82b5d2814
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 ===============================================================================
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
2 = W i t a j w t u t o r i a l u V I M - a - Wersja 1.7. =
7
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 to potężny edytor, który posiada wiele poleceń, zbyt dużo by
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 wyjaśnić je wszystkie w tym tutorialu. Ten przewodnik ma nauczyć
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 Cię posługiwać się wystarczająco wieloma komendami byś mógł łatwo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 używać Vim-a jako edytora ogólnego przeznaczenia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 Czas potrzebny na ukończenie tutoriala to 25 do 30 minut i zależy
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
11 od tego jak wiele czasu spędzisz na eksperymentowaniu.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
12
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
13 UWAGA:
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
14 Polecenia wykonywane w czasie lekcji zmodyfikują tekst. Zrób
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
15 wcześniej kopię tego pliku do ćwiczeń (jeśli zacząłeś komendą
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
16 "vimtutor" to już pracujesz na kopii).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 Ważne jest, byś pamiętał, że przewodnik ten został zaprojektowany do
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 nauki poprzez ćwiczenia. To oznacza, że musisz wykonywać polecenia
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 by nauczyć się ich prawidłowo. Jeśli będziesz jedynie czytał tekst
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 szybko zapomnisz wiele poleceń!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 Teraz upewnij się, że nie masz wciśniętego CapsLocka i wciskaj j
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 tak długo dopóki Lekcja 1.1. nie wypełni całkowicie ekranu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
27 Lekcja 1.1.: PORUSZANIE SIĘ KURSOREM
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 ** By wykonać ruch kursorem, wciśnij h, j, k, l jak pokazano. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 ^
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 k Wskazówka: h jest po lewej
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 < h l > l jest po prawej
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 j j wygląda jak strzałka w dół
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 v
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 1. Poruszaj kursorem dopóki nie będziesz pewien, że pamiętasz polecenia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 2. Trzymaj j tak długo aż będzie się powtarzał.
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
39 Teraz wiesz jak dojść do następnej lekcji.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 3. Używając strzałki w dół przejdź do następnej lekcji.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 Uwaga: Jeśli nie jesteś pewien czegoś co wpisałeś, wciśnij <ESC> by wrócić do
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 trybu Normal. Wtedy powtórz polecenie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 Uwaga: Klawisze kursora także powinny działać, ale używając hjkl będziesz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 w stanie poruszać się o wiele szybciej jak się tylko przyzwyczaisz.
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
48 Naprawdę!
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
51 Lekcja 1.2.: WYCHODZENIE Z VIM-a
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 !! UWAGA: Przed wykonaniem jakiegokolwiek polecenia przeczytaj całą lekcję.!!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 1. Wciśnij <ESC> (aby upewnić się, że jesteś w trybie Normal).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 2. Wpisz: :q!<ENTER>.
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
57 To spowoduje wyjście z edytora PORZUCAJĄC wszelkie zmiany jakie
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 zdążyłeś zrobić. Jeśli chcesz zapamiętać zmiany i wyjść
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 wpisz: :wq<ENTER>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 3. Kiedy widzisz znak zachęty powłoki wpisz komendę, żeby wrócić
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
62 do tutoriala. Czyli: vimtutor<ENTER>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 4. Jeśli chcesz zapamiętać polecenia, wykonaj kroki 1. do 3. aby
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
65 wyjść i wrócić do edytora.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
66
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
67 UWAGA: :q!<ENTER> porzuca wszelkie zmiany jakie zrobiłeś. W następnych
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
68 lekcjach dowiesz się jak je zapamiętywać.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
69
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
70 5. Przenieś kursor do lekcji 1.3.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
71
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
74 Lekcja 1.3.: EDYCJA TEKSTU - KASOWANIE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
76 ** Wciśnij x aby usunąć znak pod kursorem. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 1. Przenieś kursor do linii poniżej oznaczonej --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 2. By poprawić błędy, naprowadź kursor na znak do usunięcia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 3. Wciśnij x aby usunąć niechciany znak.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 4. Powtarzaj kroki 2. do 4. dopóki zdanie nie jest poprawne.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 ---> Kkrowa prrzeskoczyła prrzez ksiiężycc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 5. Teraz kiedy zdanie jest poprawione przejdź do Lekcji 1.4.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 UWAGA: Ucz się przez ćwiczenie, nie wkuwanie.
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
95
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
97 Lekcja 1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
100 ** Wciśnij i aby wstawić tekst. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 1. Przenieś kursor do pierwszej linii poniżej oznaczonej --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 2. Aby poprawić pierwszy wiersz, ustaw kursor na pierwszym znaku PO tym
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 gdzie tekst ma być wstawiony.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 3. Wciśnij i a następnie wpisz konieczne poprawki.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 4. Po poprawieniu błędu wciśnij <ESC> by wrócić do trybu Normal.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 Powtarzaj kroki 2. do 4. aby poprawić całe zdanie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 ---> W tej brkje trochę .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 ---> W tej linii brakuje trochę tekstu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 5. Kiedy czujesz się swobodnie wstawiając tekst przejdź do
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 podsumowania poniżej.
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
120 Lekcja 1.5.: EDYCJA TEKSTU - APPENDING (dodawanie)
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
121
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
122
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
123 ** Wciśnij A by dodać tekst. **
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
124
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
125 1. Przenieś kursor do pierwszej linii poniżej oznaczonej --->.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
126 Nie ma znaczenia, który to będzie znak.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
127
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
128 2. Wciśnij A i wpisz odpowiednie dodatki.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
129
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
130 3. Kiedy tekst został dodany, wciśnij <ESC> i wróć do trybu Normalnego.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
131
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
132 4. Przenieś kursor do drugiej linii oznaczonej ---> i powtórz kroki 2 i 3
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
133 aby poprawić zdanie.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
134
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
135 ---> Brakuje tu tro
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
136 Brakuje tu trochę tekstu.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
137 ---> Tu też trochę bra
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
138 Tu też trochę brakuje.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
139
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
140 5. Kiedy już utrwaliłeś ćwiczenie przejdź do lekcji 1.6.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
141
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
142 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
143 Lekcja 1.6.: EDYCJA PLIKU
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
144
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
145
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
146 ** Użyj :wq aby zapisać plik i wyjść. **
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
147
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
148 !! UWAGA: zanim wykonasz jakiekolwiek polecenia przeczyaj całą lekcję !!
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
149
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
150 1. Zakończ tutorial tak jak w lekcji 1.2.: :q!
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
151
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
152 2. W powłoce wydaj polecenie: vim tutor<ENTER>
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
153 "vim" jest poleceniem uruchamiającym edytor Vimm. 'tutor' to nazwa pliku
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
154 jaki chcesz edytować. Użyj pliku jaki może zostać zmieniony.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
155
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
156 3. Dodaj i usuń tekst tak jak się nauczyłeś w poprzednich lekcjach.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
157
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
158 4. Zapisz plik ze zmianami w opuść Vima: :wq<ENTER>
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
159
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
160 5. Uruchom ponownie vimtutor i przejdź do podsumowania lekcji.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
161
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
162 6. Po przeczytaniu wszystkich kroków i zrozumieniu ich: wykonaj je.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
163
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
164
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
165 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 LEKCJA 1. PODSUMOWANIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 1. Poruszasz kursorem używając "strzałek" i klawiszy hjkl .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 h (w lewo) j (w dół) k (do góry) l (w prawo)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
171 2. By wejść do Vim-a (z powłoki) wpisz:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 vim NAZWA_PLIKU<ENTER>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 3. By wyjść z Vim-a wpisz:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 <ESC> :q!<ENTER> by usunąc wszystkie zmiany.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 LUB: <ESC> :wq<ENTER> by zmiany zachować.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
178 4. By usunąć znak pod kursorem wciśnij: x
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
180 5. By wstawić tekst przed kursorem lub dodać:
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
181 i wpisz tekst <ESC> wstawi przed kursorem
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
182 A wpisz tekst <ESC> doda na końcu linii
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 UWAGA: Wciśnięcie <ESC> przeniesie Cię z powrotem do trybu Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 lub odwoła niechciane lub częściowo wprowadzone polecenia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 Teraz możemy kontynuować i przejść do Lekcji 2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 Lekcja 2.1.: POLECENIE DELETE (usuwanie)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
192 ** Wpisz dw by usunąc wyraz. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 1. Wciśnij <ESC> by upewnić się, że jesteś w trybie Normal.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 2. Przenieś kursor do linii poniżej oznaczonej --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 3. Przesuń kursor na początek wyrazu, które chcesz usunąć.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 4. Wpisz dw by usunąc wyraz.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
202 UWAGA: Litera d pojawi się na dole ekranu. Vim czeka na wpisanie w .
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
203 Jeśli zobaczysz inny znak wpisałeś coś źle, wciśnij <ESC> i zacznij
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
204 od początku.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 ---> Jest tu parę papier wyrazów, które kamień nie należą do nożyce tego zdania.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 5. Powtarzaj kroki 3. i 4. dopóki zdanie nie będzie poprawne, potem
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 przejdź do Lekcji 2.2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 Lekcja 2.2.: WIĘCEJ POLECEŃ USUWAJĄCYCH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 ** Wpisz d$ aby usunąć tekst do końca linii. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 1. Wciśnij <ESC> aby się upewnić, że jesteś w trybie Normal.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 2. Przenieś kursor do linii poniżej oznaczonej --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 3. Przenieś kursor do końca poprawnego zdania (PO pierwszej . ).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 4. Wpisz d$ aby usunąć resztę linii.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 ---> Ktoś wpisał koniec tego zdania dwukrotnie. zdania dwukrotnie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 5. Przejdź do Lekcji 2.3. by zrozumieć co się stało.
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
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
235 Lekcja 2.3.: O OPERATORACH I RUCHACH
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
238 Wiele poleceń zmieniających tekst są złożone z operatora i ruchu.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
239 Format dla polecenia usuwającego z operatorem d jest taki:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
241 d ruch
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 Gdzie:
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
244 d - operator usuwania.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
245 ruch - na czym polecenie będzie wykonywane (lista poniżej).
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
246
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
247 Krótka lista ruchów:
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
248 w - do początku następnego wyrazu WYŁĄCZAJĄC pierwszy znak.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
249 e - do końca bieżącego wyrazu, WŁĄCZAJĄC ostatni znak.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
250 $ - do końca linii, WŁĄCZAJĄC ostatni znak.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
251
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
252 W ten sposób wpisanie de usunie znaki od kursora do końca wyrazu.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
253
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
254 UWAGA: Wpisanie tylko ruchu w trybie Normal bez operatora przeniesie kursor
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
255 tak jak to określono.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
256
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
257 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
258 Lekcja 2.4.: UŻYCIE MNOŻNIKA DLA RUCHU
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
259
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
261 ** Wpisanie liczby przed ruchem powtarza ruch odpowiednią ilość razy. **
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
262
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
263 1. Przenieś kursor na początek linii poniżej zaznaczonej --->.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
264
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
265 2. Wpisz 2w aby przenieść kursor o dwa wyrazy do przodu.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
266
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
267 3. Wpisz 3e aby przenieść kursor do końca trzeciego wyrazu w przód.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
269 4. Wpisz 0 (zero) aby przenieść kursor do początku linii.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
270
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
271 5. Powtórz kroki 2. i 3. z innymi liczbami.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
272
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
273
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
274 ---> To jest zwykły wiersz z wyrazami po których możesz się poruszać.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
275
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
276 6. Przejdź do lekcji 2.5.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
281 Lekcja 2.5.: UŻYCIE MNOŻNIKA BY WIĘCEJ USUNĄĆ
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
284 ** Wpisanie liczby z operatorem powtarza go odpowiednią ilość razy. **
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
285
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
286 W wyżej wspomnianej kombinacji operatora usuwania i ruchu podaj mnożnik
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
287 przed ruchem by więcej usunąć:
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
288 d liczba ruch
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
289
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
290 1. Przenieś kursor do pierwszego wyrazu KAPITALIKAMI w linii zaznaczonej --->.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
291
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
292 2. Wpisz 2dw aby usunąć dwa wyrazy KAPITALIKAMI.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
293
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
294 3. Powtarzaj kroki 1. i 2. z innymi mnożnikami aby usunąć kolejne wyrazy
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
295 KAPITALIKAMI jednym poleceniem
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
297 ---> ta ASD WE linia QWE ASDF ZXCV FG wyrazów została ERT FGH CF oczyszczona.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
298
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
299 UWAGA: Mnożnik pomiędzy operatorem d i ruchem działa podobnie do ruchu bez
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
300 operatora.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
301
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
302
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
303 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
304 Lekcja 2.6.: OPEROWANIE NA LINIACH
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
305
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
306
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
307 ** Wpisz dd aby usunąć całą linię. **
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
308
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
309 Z powodu częstości usuwania całych linii, projektanci VI zdecydowali, że
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
310 będzie łatwiej wpisać dwa razy d aby usunąć linię.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312 1. Przenieś kursor do zdania poniżej.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 2. Wpisz dd aby usunąc wiersz.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 3. Teraz przenieś się do czwartego wiersza.
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
315 4. Wpisz 2dd aby usunąc dwia wiersze.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
317 ---> 1) Róże są czerwone,
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
318 ---> 2) Błoto jest fajne,
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
319 ---> 3) Fiołki są niebieskie,
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
320 ---> 4) Mam samochód,
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
321 ---> 5) Zegar podaje czas,
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
322 ---> 6) Cukier jest słodki,
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
323 ---> 7) I ty też.
7
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
327 Lekcja 2.7.: POLECENIE UNDO (cofnij)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330 ** Wciśnij u aby cofnąć skutki ostatniego polecenia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 U zaś, by cofnąć skutki dla całej linii. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333 1. Przenieś kursor do zdania poniżej oznaczonego ---> i umieść go na
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334 pierwszym błędzie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 2. Wpisz x aby usunąć pierwszy niechciany znak.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 3. Teraz wciśnij u aby cofnąć skutki ostatniego polecenia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337 4. Tym razem popraw wszystkie błędy w linii używając polecenia x .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 5. Teraz wciśnij wielkie U aby przywrócić linię do oryginalnego stanu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 6. Teraz wciśnij u kilka razy by cofnąć U i poprzednie polecenia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 7. Teraz wpsz CTRL-R (trzymaj równocześnie wciśnięte klawisze CTRL i R)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 kilka razy, by cofnąć cofnięcia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 ---> Poopraw blędyyy w teej liniii i zaamiień je prrzez coofnij.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345 8. To są bardzo pożyteczne polecenia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 Przejdź teraz do podsumowania Lekcji 2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350 LEKCJA 2. PODSUMOWANIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
353 1. By usunąć znaki od kursora do następnego wyrazu wpisz: dw
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354 2. By usunąć znaki od kursora do końca linii wpisz: d$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 3. By usunąć całą linię: dd
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
356 4. By powtórzyć ruch poprzedź go liczbą: 2w
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
357 5. Format polecenia zmiany to:
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
358 operator [liczba] ruch
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
359 gdzie:
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
360 operator - to co trzeba zrobić (np. d dla usuwania)
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
361 [liczba] - opcjonalne, ile razy powtórzyć ruch
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
362 ruch - przenosi nad tekstem do operowania, takim jak w (wyraz),
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 $ (do końca linii), etc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
365 6. By przejść do początku linii użyj zera: 0
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
366 7. By cofnąć poprzednie polecenie, wpisz: u (małe u)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367 By cofnąć wszystkie zmiany w linii wpisz: U (wielkie U)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368 By cofnąć cofnięcia wpisz: CTRL-R
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
370
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
371
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 Lekcja 3.1.: POLECENIE PUT (wstaw)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
376 ** Wpisz p by wstawić ostatnie usunięcia za kursorem. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
378 1. Przenieś kursor do pierwszej linii ---> poniżej.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
380 2. Wpisz dd aby usunąć linię i przechować ją w rejestrze Vim-a.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
382 3. Przenieś kursor do linii c), POWYŻEJ tej gdzie usunięta linia powinna
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 się znajdować.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
385 4. Wciśnij p by wstawić linię poniżej kursora.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387 5. Powtaj kroki 2. do 4. aż znajdą się w odpowiednim porządku.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
389 ---> d) Jak dwa aniołki.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
390 ---> b) Na dole fiołki,
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
391 ---> c) A my się kochamy,
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
392 ---> a) Na górze róże,
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
393
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 Lekcja 3.2.: POLECENIE REPLACE (zastąp)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
399 ** Wpisz rx aby zastąpić znak pod kursorem na x . **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401 1. Przenieś kursor do pierwszej linii poniżej oznaczonej --->
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403 2. Ustaw kursor na pierwszym błędzie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
405 3. Wpisz r a potem znak jaki powinien go zastąpić.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
407 4. Powtarzaj kroki 2. i 3. dopóki pierwsza linia nie będzie taka jak druga.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 ---> Kjedy ten wiersz bił wstókiwany ktoś wciznął perę złych klawirzy!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410 ---> Kiedy ten wiersz był wstukiwany ktoś wcisnął parę złych klawiszy!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
411
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
412 5. Teraz czas na Lekcję 3.3.
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 UWAGA: Pamiętaj by uczyć się ćwicząc, a nie pamięciowo.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
416
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
419 Lekcja 3.3.: OPERATOR CHANGE (zmień)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
421 ** By zmienić do końca wyrazu wpisz ce . **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423 1. Przenieś kursor do pierwszej linii poniżej oznaczonej --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425 2. Umieść kursor na u w lunos.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
427 3. Wpisz ce i popraw wyraz (w tym wypadku wstaw inia ).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
429 4. Wciśnij <ESC> i przejdź do następnej planowanej zmiany.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431 5. Powtarzaj kroki 3. i 4. dopóki pierwsze zdanie nie będzie takie same
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 jak drugie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 ---> Ta lunos ma pire słów, które tżina zbnic użifajonc pcmazu zmień.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 ---> Ta linia ma parę słów, które trzeba zmienić używając polecenia zmień.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
437 Zauważ, że ce nie tylko zamienia wyraz, ale także zmienia tryb na
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 Insert (wprowadzanie).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
440
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 Lekcja 3.4.: WIĘCEJ ZMIAN UŻYWAJĄC c
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
445 ** Polecenie change używa takich samych ruchów jak delete. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
447 1. Operator change działa tak samo jak delete. Format wygląda tak:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
449 c [liczba] ruch
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
451 2. Ruchy są także takie same, np.: w (wyraz), $ (koniec linii), etc.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453 3. Przenieś się do pierwszej linii poniżej oznaczonej --->
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455 4. Ustaw kursor na pierwszym błędzie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 5. Wpisz c$ , popraw koniec wiersza i wciśnij <ESC>.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459 ---> Koniec tego wiersza musi być poprawiony aby wyglądal tak jak drugi.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
460 ---> Koniec tego wiersza musi być poprawiony używając polecenia c$ .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
462 UWAGA: Możesz używać <BS> aby poprawiać błędy w czasie pisania.
7
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 LEKCJA 3. PODSUMOWANIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468 1. Aby wstawić tekst, który został wcześniej usunięty wciśnij p . To
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469 polecenie wstawia skasowany tekst PO kursorze (jeśli cała linia
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470 została usunięta, zostanie ona umieszczona w linii poniżej kursora).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472 2. By zamienić znak pod kursorem wciśnij r a potem znak, który ma zastąpić
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 oryginalny.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
475 3. Operator change pozwala Ci na zastąpienie od kursora do miejsca gdzie
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
476 zabrałby cię ruch. Np. wpisz ce aby zamienić tekst od kursora do końca
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
477 wyrazu, c$ aby zmienić tekst do końca linii.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479 4. Format do polecenia change (zmień):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
481 c [liczba] obiekt
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 Teraz przejdź do następnej lekcji.
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
488 Lekcja 4.1.: POŁOŻENIE KURSORA ORAZ STATUS PLIKU
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490 ** Naciśnij CTRL-G aby zobaczyć swoje położenie w pliku i status
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
491 pliku. Naciśnij G aby przejść do linii w pliku. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
492
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493 UWAGA: Przeczytaj całą lekcję zanim wykonasz jakieś polecenia!!!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
494
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
495 1. Przytrzymaj klawisz CTRL i wciśnij g . Używamy notacji CTRL-G.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
496 Na dole strony pojawi się pasek statusu z nazwą pliku i pozycją w pliku.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
497 Zapamiętaj numer linii dla potrzeb kroku 3.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
499 UWAGA: Możesz też zobaczyć pozycję kursora w prawym, dolnym rogu ekranu.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
500 Dzieje się tak kiedy ustawiona jest opcja 'ruler' (wyjaśnione w lekcji 6.).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
502 2. Wciśnij G aby przejść na koniec pliku.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
503 Wciśnij gg aby przejść do początku pliku.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
504
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
505 3. Wpisz numer linii, w której byłeś a potem G . To przeniesie cię
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
506 z powrotem do linii, w której byłeś kiedy wcisnąłeś CTRL-G.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
507
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
508 4. Jeśli czujesz się wystarczająco pewnie, wykonaj kroki 1-3.
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 Lekcja 4.2.: POLECENIE SZUKAJ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
512
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
513
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
514 ** Wpisz / a następnie wyrażenie aby je znaleźć. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516 1. W trybie Normal wpisz / . Zauważ, że znak ten, oraz kursor pojawią
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
517 się na dole ekranu tak samo jak polecenie : .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
518
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
519 2. Teraz wpisz błond<ENTER> . To jest słowo, którego chcesz szukać.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
520
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
521 3. By szukać tej samej frazy ponownie, po prostu wciśnij n .
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
522 Aby szukać tej frazy w przeciwnym, kierunku wciśnij N .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
523
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
524 4. Jeśli chcesz szukać frazy do tyłu, użyj polecenia ? zamiast / .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
525
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
526 5. Aby wrócić gdzie byłeś wciśnij CTRL-O. Powtarzaj by wrócić dalej. CTRL-I
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
527 idzie do przodu.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
528
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
529 UWAGA: 'błond' to nie jest metoda by przeliterować błąd; 'błond' to błąd.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
530 UWAGA: Kiedy szukanie osiągnie koniec pliku będzie kontynuowało od początku
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
531 o ile opcja 'wrapscan' nie została przestawiona.
7
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 Lekcja 4.3.: W POSZUKIWANIU PARUJĄCYCH NAWIASÓW
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 ** Wpisz % by znaleźć pasujący ),], lub } . **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
538
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
539 1. Umieść kursor na którymś z (, [, lub { w linii poniżej oznaczonej --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
540
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
541 2. Teraz wpisz znak % .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
542
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
543 3. Kursor powinien się znaleźć na parującym nawiasie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
544
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
545 4. Wciśnij % aby przenieść kursor z powrotem do parującego nawiasu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
546
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
547 5. Przenieś kursor do innego (,),[,],{ lub } i zobacz co robi % .
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
548
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
549 ---> To ( jest linia testowa z (, [, ] i {, } . ))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
550
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
551 UWAGA: Ta funkcja jest bardzo użyteczna w debuggowaniu programu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
552 z niesparowanymi nawiasami!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
553
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
557 Lekcja 4.4.: POLECENIE SUBSTITUTE (zamiana)
7
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 ** Wpisz :s/stary/nowy/g aby zamienić 'stary' na 'nowy'. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
561
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
562 1. Przenieś kursor do linii poniżej oznaczonej --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
563
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
564 2. Wpisz :s/czaas/czas<ENTER> . Zauważ, że to polecenie zmienia
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
565 tylko pierwsze wystąpienie 'czaas' w linii.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
566
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
567 3. Teraz wpisz :s/czaas/czas/g . Dodane g oznacza zamianę (substytucję)
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
568 globalnie w całej linii. Zmienia wszystkie wystąpienia 'czaas' w linii.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
569
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
570 ---> Najlepszy czaas na zobaczenie najładniejszych kwiatów to czaas wiosny.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
571
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
572 4. Aby zmienić wszystkie wystąpienia łańcucha znaków pomiędzy dwoma liniami,
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
573 wpisz: :#,#s/stare/nowe/g gdzie #,# są numerami linii ograniczających
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
574 region gdzie ma nastąpić zamiana.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
575 wpisz :%s/stare/nowe/g by zmienić wszystkie wystąpienia w całym pliku.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
576 wpisz :%s/stare/nowe/gc by zmienić wszystkie wystąpienia w całym
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
577 pliku, prosząc o potwierdzenie za każdym razem
7
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 LEKCJA 4. PODSUMOWANIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
581
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
582 1. CTRL-G pokaże Twoją pozycję w pliku i status pliku. SHIFT-G przenosi
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
583 cię do końca pliku.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
584 G przenosi do końca pliku.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
585 liczba G przenosi do linii [liczba].
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
586 gg przenosi do pierwszej linii.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
587
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
588 2. Wpisanie / a następnie łańcucha znaków szuka łańcucha DO PRZODU.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
589 Wpisanie ? a następnie łańcucha znaków szuka łańcucha DO TYŁU.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
590 Po wyszukiwaniu wciśnij n by znaleźć następne wystąpienie szukanej
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
591 frazy tym samym kierunku lub N by szukać w kierunku przeciwnym.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
592 CTRL-O przenosi do starszych pozycji, CTRL-I do nowszych.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
593
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
594 3. Wpisanie % gdy kursor znajduje się na (,),[,],{, lub } lokalizuje
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
595 parujący znak.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
596
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
597 4. By zamienić pierwszy stary na nowy w linii wpisz :s/stary/nowy
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
598 By zamienić wszystkie stary na nowy w linii wpisz :s/stary/nowy/g
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
599 By zamienić frazy pomiędzy dwoma liniami # wpisz :#,#s/stary/nowy/g
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
600 By zamienić wszystkie wystąpienia w pliku wpisz :%s/stary/nowy/g
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
601 By Vim prosił Cię o potwierdzienie dodaj 'c' :%s/stary/nowy/gc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
602 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
603 Lekcja 5.1.: JAK WYKONAĆ POLECENIA ZEWNĘTRZNE
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 ** Wpisz :! a następnie zewnętrzne polecenie by je wykonać. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
607
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
608 1. Wpisz znajome polecenie : by ustawić kursor na dole ekranu. To pozwala
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
609 na wprowadzenie polecenia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
610
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
611 2. Teraz wstaw ! (wykrzyknik). To umożliwi Ci wykonanie dowolnego
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
612 zewnętrznego polecenia powłoki.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
613
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
614 3. Jako przykład wpisz ls za ! a następnie wciśnij <ENTER>. To polecenie
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
615 pokaże spis plików w Twoim katalogu, tak jakbyś był przy znaku zachęty
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
616 powłoki. Możesz też użyć :!dir jeśli ls nie działa.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
617
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
618 Uwaga: W ten sposób można wykonać wszystkie polecenia powłoki.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
619 Uwaga: Wszystkie polecenia : muszą być zakończone <ENTER>.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
620 Od tego momentu nie zawsze będziemy o tym wspominać.
7
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 Lekcja 5.2.: WIĘCEJ O ZAPISYWANIU PLIKÓW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
627
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
628
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
629 ** By zachować zmiany w tekści wpisz :w NAZWA_PLIKU . **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
630
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
631 1. Wpisz :!dir lub :!ls by zobaczyć spis plików w katalogu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
632 Już wiesz, że musisz wcisnąć <ENTER> po tym.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
633
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
634 2. Wybierz nazwę pliku jaka jeszcze nie istnieje, np. TEST.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
635
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
636 3. Teraz wpisz: :w TEST (gdzie TEST jest nazwą pliku jaką wybrałeś.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
637
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
638 4. To polecenie zapamięta cały plik (Vim Tutor) pod nazwą TEST.
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
639 By to sprawdzić wpisz :!dir lub :!ls , żeby znowu zobaczyć listę plików.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
640
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
641 Uwaga: Zauważ, że gdybyś teraz wyszedł z Vim-a, a następnie wszedł ponownie
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
642 komendą vim TEST , plik byłby dokładną kopią tutoriala kiedy go
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
643 zapisywałeś.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
644
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
645 5. Teraz usuń plik wpisując: :!rm TEST
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
649 Lekcja 5.3.: WYBRANIE TEKSTU DO ZAPISU
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
650
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
651
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
652 ** By zachować część pliku wpisz v ruch :w NAZWA_PLIKU **
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
653
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
654 1. Przenieś kursor do tego wiersza.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
655
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
656 2. Wciśnij v i przenieś kursor do punktu 5. Zauważ, że tekst został
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
657 podświetlony.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
658
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
659 3. Wciśnij znak : . Na dole ekranu pojawi się :'<,'> .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
660
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
661 4. Wpisz w TEST , gdzie TEST to nazwa pliku, który jeszcze nie istnieje.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
662 Upewnij się, że widzisz :'<,'>w TEST zanim wciśniesz Enter.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
663
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
664 5. Vim zapisze wybrane linie do pliku TEST. Użyj :!dir lub :!ls , żeby to
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
665 zobaczyć. Jeszcze go nie usuwaj! Użyjemy go w następnej lekcji.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
666
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
667 UWAGA: Wciśnięcie v zaczyna tryb Wizualny. Możesz poruszać kursorem by
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
668 zmienić rozmiary zaznaczenia. Możesz też użyć operatora by zrobić coś
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
669 z tekstem. Na przykład d usuwa tekst.
7
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 Lekcja 5.4.: WSTAWIANIE I ŁĄCZENIE PLIKÓW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
673
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
674
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
675 ** By wstawić zawartość pliku wpisz :r NAZWA_PLIKU **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
676
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
677 1. Umieść kursor tuż powyżej tej linii.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
678
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
679 UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 5.3. Potem przejdź
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
680 do DOŁU by zobaczyć ponownie tę lekcję.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
681
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
682 2. Teraz wczytaj plik TEST używając polecenia :r TEST , gdzie TEST
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
683 jest nazwą pliku.
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
684 Wczytany plik jest umieszczony poniżej linii z kursorem.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
685
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
686 3. By sprawdzić czy plik został wczytany cofnij kursor i zobacz, że
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
687 teraz są dwie kopie Lekcji 5.3., oryginał i kopia z pliku.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
688
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
689 UWAGA: Możesz też wczytać wyjście zewnętrznego polecenia. Na przykład
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
690 :r !ls wczytuje wyjście polecenia ls i umieszcza je pod kursorem.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
691
7
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 LEKCJA 5. PODSUMOWANIE
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 1. :!polecenie wykonuje polecenie zewnętrzne.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
699
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
700 Użytecznymi przykładami są:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
701
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
702 :!dir - pokazuje spis plików w katalogu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
703
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
704 :!rm NAZWA_PLIKU - usuwa plik NAZWA_PLIKU.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
705
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
706 2. :w NAZWA_PLIKU zapisuje obecny plik Vim-a na dysk z nazwą NAZWA_PLIKU.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
707
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
708 3. v ruch :w NAZWA_PLIKU zapisuje Wizualnie wybrane linie do NAZWA_PLIKU.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
709
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
710 4. :r NAZWA_PLIKU wczytuje z dysku plik NAZWA_PLIKU i wstawia go do
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
711 bieżącego pliku poniżej kursora.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
712
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
713 5. :r !dir wczytuje wyjście polecenia dir i umieszcza je poniżej kursora.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
714
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
715
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
716
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
717 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
718 Lekcja 6.1.: POLECENIE OPEN (otwórz)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
719
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
720
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
721 ** Wpisz o by otworzyć linię poniżej kursora i przenieść się do
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
722 trybu Insert (wprowadzanie). **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
723
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
724 1. Przenieś kursor do linii poniżej oznaczonej --->.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
725
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
726 2. Wpisz o (małe) by otworzyć linię PONIŻEJ kursora i przenieść się
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
727 do trybu Insert (wprowadzanie).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
728
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
729 3. Wpisz trochę tekstu i wciśnij <ESC> by wyjść z trybu Insert (wprowadzanie).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
730
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
731 ---> Po wciśnięciu o kursor znajdzie się w otwartej linii w trybie Insert.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
732
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
733 4. By otworzyć linię POWYŻEJ kursora wciśnij wielkie O zamiast małego
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
734 o . Wypróbuj to na linii poniżej.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
735
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
736 ---> Otwórz linię powyżej wciskając SHIFT-O gdy kursor będzie na tej linii.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
737
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
738
7
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 Lekcja 6.2.: POLECENIE APPEND (dodaj)
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 ** Wpisz a by dodać tekst ZA kursorem. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
745
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
746 1. Przenieś kursor do początku pierwszej linii poniżej oznaczonej --->
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
747
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
748 2. Wciskaj e dopóki kursor nie będzie na końcu li .
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
749
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
750 3. Wpisz a (małe) aby dodać tekst ZA znakiem pod kursorem.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
751
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
752 4. Dokończ wyraz tak jak w linii poniżej. Wciśnij <ESC> aby opuścić tryb
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
753 Insert.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
754
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
755 5. Użyj e by przejść do kolejnego niedokończonego wyraze i powtarzaj kroki
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
756 3. i 4.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
757
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
758 ---> Ta li poz Ci ćwi dodaw teks do koń lin
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
759 ---> Ta linia pozwoli Ci ćwiczyć dodawanie tekstu do końca linii.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
760
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
761 Uwaga: a , i and A prowadzą do trybu Insert, jedyną różnicą jest miejsce
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
762 gdzie nowe znaki będą dodawane.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
763 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
764 Lekcja 6.3.: INNA WERSJA REPLACE (zamiana)
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 ** Wpisz wielkie R by zamienić więcej niż jeden znak. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
768
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
769 1. Przenieś kursor do pierwszej linii poniżej oznaczonej --->. Przenieś
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
770 kursor do pierwszego xxx .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
771
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
772 2. Wciśnij R i wpisz numer poniżej w drugiej linii, tak, że zastąpi on
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
773 xxx.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
774
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
775 3. Wciśnij <ESC> by opuścić tryb Replace. Zauważ, że reszta linii pozostaje
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
776 niezmieniona.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
777
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
778 5. Powtarzaj kroki by wymienić wszystkie xxx.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
779
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
780 ---> Dodanie 123 do xxx daje xxx.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
781 ---> Dodanie 123 do 456 daje 579.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
782
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
783 UWAGA: Tryb Replace jest jak tryb Insert, ale każdy znak usuwa istniejący
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
784 znak.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
785
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
786 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
787 Lekcja 6.4.: KOPIOWANIE I WKLEJANIE TEKSTU
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
788
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
789
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
790 ** użyj operatora y aby skopiować tekst i p aby go wkleić **
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
791
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
792 1. Przejdź do linii oznaczonej ---> i umieśc kursor za "a)".
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
793
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
794 2. Wejdź w tryb Visual v i przenieś kursor na początek "pierwszy".
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
795
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
796 3. Wciśnij y aby yankować (kopiować) podświetlony tekst.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
797
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
798 4. Przenieś kursor do końca następnej linii: j$
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
799
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
800 5. Wciśnij p aby wpakować (paste) tekst. Dodaj: a drugi<ESC> .
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
801
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
802 6. Użyj trybu Visual aby wybrać " element.", yankuj go y , przejdź do końca
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
803 następnej linii j$ i upakuj tam tekst z p .
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
804
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
805 ---> a) to jest pierwszy element.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
806 b)
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
807 Uwaga: możesz użyć y jako operatora; yw kopiuje jeden wyraz.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
808
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
809 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
810 Lekcja 6.5.: USTAWIANIE OPCJI
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
811
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
812
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
813 ** Ustawianie opcji tak by szukaj lub substytucja ignorowały wielkość liter **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
814
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
815 1. Szukaj 'ignore' wpisując: /ignore<ENTER>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
816 Powtórz szukanie kilka razy naciskając klawisz n .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
817
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
818 2. Ustaw opcję 'ic' (Ignore case -- ignoruj wielkość liter) poprzez
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
819 wpisanie: :set ic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
820
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
821 3. Teraz szukaj 'ignore' ponownie wciskując: n
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
822 Zauważ, że Ignore i IGNORE także są teraz znalezione.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
823
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
824 4. Ustaw opcje 'hlsearch' i 'incsearch': :set hls is
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
825
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
826 5. Teraz wprowadź polecenie szukaj ponownie i zobacz co się zdarzy:
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
827 /ignore<ENTER>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
828
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
829 6. Aby wyłączyć ignorowanie wielkości liter: :set noic
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
830
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
831 Uwaga: Aby usunąć podświetlanie dopasowań wpisz: :nohlsearch
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
832 Uwaga: Aby ignorować wielkość liter dla jednego wyszukiwania: /ignore\c<ENTER>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
833 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
834 LEKCJA 6. PODSUMOWANIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
835
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
836
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
837 1. Wpisanie o otwiera linię PONIŻEJ kursora.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
838 Wpisanie wielkiego O otwiera linię POWYŻEJ kursora.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
839 2. Wpisz a by wstawić tekst ZA znakiem na, którym jest kursor.
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
840 Wpisanie wielkiego A dodaje tekst na końcu linii.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
841 3. Polecenie e przenosi do końca wyrazu.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
842 4. Operato y yankuje (kopiuje) tekst, p pakuje (wkleja, paste) go.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
843 5. Wpisanie wielkiego R wprowadza w tryb Replace (zamiana) dopóki
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
844 nie zostanie wciśnięty <ESC>.
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
845 6. Wpisanie ":set xxx" ustawia opcję "xxx". Nietkóre opcje:
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
846 'ic' 'ignorecase' ignoruj wielkość znaków
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
847 'is' 'incsearch' pokaż częściowe dopasowania
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
848 'hls' 'hlsearch' podświetl wszystkie dopasowania
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
849 Możesz użyć zarówno długiej jak i krótkiej formy.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
850 7. Dodaj "no" aby wyłączyć opcję: :set noic
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
851
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
852
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
853
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
854
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
855
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
856 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
857 LEKCJA 7.1. JAK UZYSKAĆ POMOC
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
858
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
859 ** Użycie systemu pomocy on-line **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
860
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
861 Vim posiada bardzo dobry system pomocy on-line. By zacząć spróbuj jednej
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
862 z trzech możliwości:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
863 - wciśnij klawisz <HELP> (jeśli takowy posiadasz)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
864 - wciśnij klawisz <F1> (jeśli takowy posiadasz)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
865 - wpisz :help<ENTER>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
866
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
867 Przeczytaj tekst w oknie pomocy aby dowiedzieć się jak działa pomoc.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
868 wpisz CTRL-W CTRL-W aby przeskoczyć z jednego okna do innego
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
869 wpisz :q<ENTER> aby zamknąć okno pomocy.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
870
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
871 Możesz też znaleźć pomoc na każdy temat podając argument polecenia ":help".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
872 Spróbuj tych (nie zapomnij wcisnąć <ENTER>):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
873
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
874 :help w
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
875 :help c_CTRL-D
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
876 :help insert-index
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
877 :help user-manual
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
878 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
879 LEKCJA 7.2. TWORZENIE SKRYPTU STARTOWEGO
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
880
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
881 ** Włącz możliwości Vim-a **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
882
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
883 Vim ma o wiele więcej możliwości niż Vi, ale większość z nich jest domyślnie
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
884 wyłączona. Jeśli chcesz włączyć te możliwości na starcie musisz utworzyć
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
885 plik "vimrc".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
886
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
887 1. Początek edycji pliku "vimrc" zależy od Twojego systemu:
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
888 :edit ~/.vimrc dla Uniksa
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
889 :edit $VIM/_vimrc dla MS-Windows
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
890 2. Teraz wczytaj przykładowy plik "vimrc":
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
891 :read $VIMRUNTIME/vimrc_example.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
892 3. Zapisz plik:
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
893 :w
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
894
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
895 Następnym razem gdy zaczniesz pracę w Vimie będzie on używać podświetlania
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
896 składni. Możesz dodać wszystkie swoje ulubione ustawienia do tego pliku
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
897 "vimrc".
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
898 Aby uzyskać więcej informacji wpisz :help vimrc-intro
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
899
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
900 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
901 Lekcja 7.3.: UZUPEŁNIANIE
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
902
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
903
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
904 ** Uzupełnianie linii poleceń z CTRL-D i <TAB> **
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
905
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
906 1. Upewnij się, że Vim nie jest w trybie kompatybilności: :set nocp
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
907
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
908 2. Zerknij jakie pliki są w bieżącm katalogu: :!ls lub :!dir
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
909
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
910 3. Wpisz początek polecenia: :e
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
911
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
912 4. Wciśnij CTRL-D i Vim pokaże listę poleceń jakie zaczynają się na "e".
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
913
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
914 5. Wciśnij <TAB> i Vim uzupełni polecenie do ":edit".
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
915
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
916 6. Dodaj spację i zacznij wpisywać nazwę istniejącego pliku: :edit FIL
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
917
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
918 7. Wciśnij <TAB>. Vim uzupełni nazwę (jeśli jest niepowtarzalna).
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
919
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
920 UWAGA: Uzupełnianie działa dla wielu poleceń. Spróbuj wcisnąć CTRL-D i <TAB>.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
921 Użyteczne zwłaszcza przy :help .
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
922 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
923 Lekcja 7. PODSUMOWANIE
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
924
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
925
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
926 1. Wpisz :help lub wciśnij <F1> lub <Help> aby otworzyć okno pomocy.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
927
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
928 2. Wpisz :help cmd aby uzyskać pomoc o cmd .
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
929
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
930 3. Wpisz CTRL-W CTRL-W aby przeskoczyć do innego okna.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
931
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
932 4. Wpisz :q aby zamknąć okno pomocy.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
933
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
934 5. Utwórz plik startowy vimrc aby zachować wybrane ustawienia.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
935
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
936 6. Po poleceniu : , wciśnij CTRL-D aby zobaczyć możliwe uzupełnienia.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
937 Wciśnij <TAB> aby użyć jednego z nich.
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
938
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
939
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
940
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
941
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
942
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
943
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
944 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
945
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
946 Tutaj się kończy tutorial Vim-a. Został on pomyślany tak aby dać krótki
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
947 przegląd jego możliwości, wystarczający byś mógł go używać. Jest on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
948 daleki od kompletności ponieważ Vim ma o wiele, wiele więcej poleceń.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
949
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
950 Dla dalszej nauki rekomendujemy książkę:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
951 Vim - Vi Improved - autor Steve Oualline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
952 Wydawca: New Riders
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
953 Pierwsza ksiązka całkowicie poświęcona Vim-owi. Użyteczna zwłaszcza dla
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
954 początkujących. Zawiera wiele przykładów i ilustracji.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
955 Zobacz http://iccf-holland.org./click5.html
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
956
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
957 Ta książka jest starsza i bardziej o Vi niż o Vim-ie, ale także warta
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
958 polecenia:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
959 Learning the Vi Editor - autor Linda Lamb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
960 Wydawca: O'Reilly & Associates Inc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
961 To dobra książka by dowiedzieć się niemal wszystkiego co chciałbyś zrobić
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
962 z Vi. Szósta edycja zawiera też informacje o Vim-ie.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
963
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
964 Po polsku wydano:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
965 Edytor vi. Leksykon kieszonkowy - autor Arnold Robbins
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
966 Wydawca: Helion 2001 (O'Reilly).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
967 ISBN: 83-7197-472-8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
968 http://helion.pl/ksiazki/vilek.htm
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
969 Jest to książeczka zawierająca spis poleceń vi i jego najważniejszych
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
970 klonów (między innymi Vim-a).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
971
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
972 Edytor vi - autorzy Linda Lamb i Arnold Robbins
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
973 Wydawca: Helion 2001 (O'Reilly) - wg 6 ang. wydania
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
974 ISBN: 83-7197-539-2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
975 http://helion.pl/ksiazki/viedyt.htm
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
976 Rozszerzona wersja Learning the Vi Editor w polskim tłumaczeniu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
977
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
978 Ten tutorial został napisany przez Michaela C. Pierce'a i Roberta K. Ware'a,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
979 Colorado School of Mines korzystając z pomocy Charlesa Smitha,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
980 Colorado State University.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
981 E-mail: bware@mines.colorado.edu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
982
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
983 Zmodyfikowane dla Vim-a przez Brama Moolenaara.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
984
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
985 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
986
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
987 Przetłumaczone przez Mikołaja Machowskiego,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
988 Sierpień 2001,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
989 rev. Marzec 2002
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
990 2nd rev. Wrzesień 2004
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
991 Wszelkie uwagi proszę kierować na: mikmach@wp.pl