annotate runtime/tutor/tutor.ca @ 16780:491c01280a5d v8.1.1392

patch 8.1.1392: build failure in tiny version commit https://github.com/vim/vim/commit/682725c1415f50681877df60257115a966e2a3d4 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 25 20:10:37 2019 +0200 patch 8.1.1392: build failure in tiny version Problem: Build failure in tiny version. Solution: Define ex_popupclear to ex_ni if not implemented. Add UNUSED.
author Bram Moolenaar <Bram@vim.org>
date Sat, 25 May 2019 20:15:04 +0200
parents 4f7081eb1e26
children e69e7133c9cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 ===============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 = B e n v i n g u t s a l t u t o r d e l V I M - Versió 1.5 =
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 ===============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
5 El Vim és un editor potent i té moltes ordres, massa com per a
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
6 explicar-les totes un tutor com aquest. Aquest tutor està pensat per a
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
7 ensenyar les ordres bàsiques que us permetin fer servir el Vim com a
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
8 editor de propòsit general.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
10 El temps aproximat de completar el tutor és d'uns 25 o 30 minuts
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 depenent de quant temps dediqueu a experimentar.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
13 Feu una còpia d'aquest fitxer per a practicar-hi (si heu començat amb
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
14 el programa vimtutor això que esteu llegint ja és una còpia).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
16 És important recordar que aquest tutor està pensat per a ensenyar
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
17 practicant, és a dir que haureu d'executar les ordres si les voleu
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 aprendre. Si només llegiu el text el més probable és que les oblideu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 Ara assegureu-vos que la tecla de bloqueig de majúscules no està
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
21 activada i premeu la tecla j per a moure el cursor avall, fins que la
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
22 lliçó 1.1 ocupi completament la pantalla.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
23
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
25 Lliçó 1.1: MOURE EL CURSOR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
28 ** Per a moure el cursor premeu les tecles h, j, k, l tal com s'indica. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 ^
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
30 k Pista: La h és a l'esquerra i mou el cursor cap a l'esquerra.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
31 < h l > La l és a la dreta i mou el cursor cap a la dreta.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
32 j La j sembla una fletxa cap avall.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 v
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 1. Moveu el cursor per la pantalla fins que us sentiu confortables.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 2. Mantingueu premuda la tecla avall (j) una estona.
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
37 ---> Ara ja sabeu com moure-us fins a la següent lliçó.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 3. Usant la tecla avall, aneu a la lliçó 1.2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
41 Nota: Si no esteu segurs de la tecla que heu premut, premeu <ESC> per a
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
42 tornar al mode Normal. Llavors torneu a teclejar l'ordre que volíeu.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
44 Nota: Les tecles de moviment del cursor (fletxes) també funcionen. Però
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
45 usant hjkl anireu més ràpid un cop us hi hagueu acostumant.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
48 Lliçó 1.2: ENTRAR I SORTIR DEL VIM
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 !! NOTA: Abans de seguir els passos següents llegiu *tota* la lliçó!!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
53 1. Premeu <ESC> (per a estar segurs que esteu en el mode Normal).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
55 2. Teclegeu: :q! <ENTRAR>.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
57 ---> Amb això sortireu de l'editor SENSE desar els canvis que hagueu pogut
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 fer. Si voleu desar els canvis teclegeu:
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
59 :wq <ENTRAR>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
61 3. Quan vegeu l'introductor de l'intèrpret escriviu l'ordre amb la
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
62 qual heu arribat a aquest tutor. Podria ser: vimtutor <ENTRAR>
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
63 O bé: vim tutor <ENTRAR>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 ---> 'vim' és l'editor vim, i 'tutor' és el fitxer que voleu editar.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 4. Si heu memoritzat les ordres, feu els passos anteriors, de l'1 al 3,
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
68 per a sortir i tornar a entrar a l'editor. Llavors moveu el cursor
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
69 avall fins a la lliçó 1.3.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
71 Lliçó 1.3: EDITAR TEXT - ESBORRAR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
74 ** En mode Normal premeu x per a esborrar el caràcter sota el cursor. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
76 1. Moveu el cursor fins a la línia que hi ha més avall senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
78 2. Poseu el cursor a sobre el caràcter que cal esborrar per a corregir
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
79 els errors.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
81 3. Premeu la tecla x per a esborrar el caràcter.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 4. Repetiu els passos 2 i 3 fins que la frase sigui correcta.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
85 ---> Unna vaaca vva salttar perr sobbree la llluna.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 5. Ara que la línia és correcta, aneu a la lliçó 1.4.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 NOTA: Mentre aneu fent no tracteu de memoritzar, practiqueu i prou.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
94 Lliçó 1.4: EDITAR TEXT - INSERIR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
97 ** En mode Normal premeu i per a inserir text. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
99 1. Moveu el cursor avall fins la primera línia senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
101 2. Per a fer la primera línia igual que la segona poseu el cursor sobre
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
102 el primer caràcter POSTERIOR al text que s'ha d'inserir.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 3. Premeu la tecla i i escriviu el text que falta.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
106 4. Quan hageu acabat premeu <ESC> per tornar al mode Normal. Repetiu
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
107 els passos 2, 3 i 4 fins a corregir la frase.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 ---> Falten carctrs en aquesta .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 ---> Falten alguns caràcters en aquesta línia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 5. Quan us trobeu còmodes inserint text aneu al sumari de baix.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
117 LLIÇÓ 1 SUMARI
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 1. El cursor es mou amb les fletxes o bé amb les tecles hjkl.
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
121 h (esquerra) j (avall) k (amunt) l (dreta)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
123 2. Per a entrar al Vim (des de l'intèrpret) escriviu: vim FITXER <ENTRAR>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
125 3. Per a sortir teclegeu: <ESC> :q! <ENTRAR> per a descartar els canvis.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
126 O BÉ teclegeu: <ESC> :wq <ENTRAR> per a desar els canvis.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
128 4. Per a esborrar el caràcter de sota el cursor en el mode Normal premeu: x
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
130 5. Per a inserir text on hi ha el cursor, en mode Normal, premeu:
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
131 i escriviu el text <ESC>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
133 NOTA: La tecla <ESC> us porta al mode Normal o cancel·la una ordre que
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
134 estigui a mitges.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
136 Ara continueu a la lliçó 2.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
140 Lliçó 2.1: ORDRES PER ESBORRAR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
143 ** Teclegeu dw per a esborrar fins al final d'una paraula. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 1. Premeu <ESC> per estar segurs que esteu en mode normal.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
147 2. Moveu el cursor avall fins a la línia senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
149 3. Moveu el cursor fins al principi de la paraula que s'ha d'esborrar.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
151 4. Teclegeu dw per a fer desaparèixer la paraula.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 NOTA: Les lletres dw apareixeran a la línia de baix de la pantalla mentre
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 les aneu escrivint. Si us equivoqueu premeu <ESC> i torneu a començar.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
156 ---> Hi ha algunes paraules divertit que no pertanyen paper a aquesta frase.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
158 5. Repetiu el passos 3 i 4 fins que la frase sigui correcta i continueu
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
159 a la lliçó 2.2.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
163 Lliçó 2.2: MÉS ORDRES PER ESBORRAR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
166 ** Escriviu d$ per a esborrar fins al final de la línia. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
168 1. Premeu <ESC> per a estar segurs que esteu en el mode Normal.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
170 2. Moveu el cursor avall fins a la línia senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
172 3. Moveu el cursor fins al final de la línia correcta
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 (DESPRÉS del primer . ).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
175 4. Teclegeu d$ per a esborrar fins al final de la línia.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 ---> Algú ha escrit el final d'aquesta línia dos cops. línia dos cops.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
179 5. Aneu a la lliçó 2.3 per a entendre què està passant.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
186 Lliçó 2.3: SOBRE ORDRES I OBJECTES
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 El format de l'ordre d'esborrar d és el següent:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
191 [nombre] d objecte O BÉ d [nombre] objecte
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 On:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 nombre - és el nombre de cops que s'ha d'executar (opcional, omissió=1).
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
194 d - és l'ordre d'esborrar.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 objecte - és la cosa amb la qual operar (llista a baix).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 Una petita llista d'objectes:
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
198 w - des del cursor fins al final de la paraula, incloent l'espai.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 e - des del cursor fins al final de la paraula, SENSE incloure l'espai.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 $ - des del cursor fins al final de la línia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
202 NOTA: Per als aventurers: si teclegeu només l'objecte, en el mode Normal,
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
203 sense cap ordre, el cursor es mourà tal com està descrit a la llista
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
204 d'objectes.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
209 Lliçó 2.4: UNA EXCEPCIÓ A 'ORDRE-OBJECTE'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
212 ** Teclegeu dd per a esborrar tota la línia. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
214 Com que molt sovint s'han d'eliminar línies senceres, els programadors
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
215 del Vi van creure que seria més convenient teclejar dd per a esborrar
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
216 tota la línia.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 1. Moveu el cursor a la segona línia de la frase de baix.
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
219 2. Teclegeu dd per a esborrar la línia.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 3. Ara aneu a la quarta línia.
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
221 4. Teclegeu 2dd per a esborrar dues línies (recordeu nombre-ordre-objecte).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 1) Les roses són vermelles,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 2) El fang és divertit,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 3) Les violetes són blaves,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 4) Tinc un cotxe,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 5) Els rellotges diuen l'hora,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 6) El sucre és dolç,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 7) Igual que tu.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
232 Lliçó 2.5: L'ORDRE DESFER
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
235 ** Premeu u per a desfer els canvis, U per a restaurar tota la línia. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
237 1. Moveu el cursor sobre el primer error de línia de baix senyalada amb --->
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
238 2. Premeu x per a esborrar el caràcter no desitjat.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
239 3. Ara premeu u per a desfer l'última ordre executada.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 4. Aquest cop corregiu tots els errors de la línia amb l'ordre x.
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
241 5. Ara premeu U per a restablir la línia al seu estat original.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
242 6. Ara premeu u uns quants cops per a desfer U i les ordres anteriors.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 7. Ara premeu CONTROL-R (les dues tecles al mateix temps) uns quants cops
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
244 per a refer les ordres.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 ---> Correegiu els errors d'aqquesta línia i dessfeu-los aamb desfer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 8. Aquestes ordres són molt útils. Ara aneu al sumari de la lliçó 2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
253
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
255 LLIÇÓ 2 SUMARI
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
258 1. Per a esborrar del cursor al final de la paraula teclegeu: dw
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
260 2. Per a esborrar del cursor al final de la línia teclegeu: d$
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
262 3. Per a esborrar una línia sencera teclegeu: dd
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 4. El format de qualsevol ordre del mode Normal és:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
266 [nombre] ordre objecte O BÉ ordre [nombre] objecte
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 on:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 nombre - és quants cops repetir l'ordre
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 ordre - és què fer, com ara d per esborrar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 objecte - és amb què s'ha d'actuar, com ara w (paraula),
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
271 $ (fins a final de línia), etc.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
273 5. Per a desfer les accions anteriors premeu: u
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
274 Per a desfer tots el canvis en una línia premeu: U
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
275 Per a desfer l'ordre desfer premeu: CTRL-R
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
278 Lliçó 3.1: L'ORDRE 'POSAR'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
281 ** Premeu p per a inserir l'última cosa que heu esborrat
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
282 després del cursor. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 1. Moveu el cursor a la primera línia de llista de baix.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
287 2. Teclegeu dd per a esborrar la línia i desar-la a la memòria.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
289 3. Moveu el cursor a la línia ANTERIOR d'on hauria d'anar.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
291 4. En mode Normal, premeu p per a inserir la línia.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
293 5. Repetiu els passos 2, 3 i 4 per a ordenar les línies correctament.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295 d) Pots aprendre tu?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 b) Les violetes són blaves,
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
297 c) La intel·ligència s'aprèn,
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 a) Les roses són vermelles,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
301 Lliçó 3.2: L'ORDRE SUBSTITUIR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
304 ** Premeu r i un caràcter per a substituir el caràcter
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
305 de sota el cursor. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
307 1. Moveu el cursor a la primera línia de sota senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 2. Moveu el cursor a sobre del primer caràcter equivocat.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
311 3. Premeu r i tot seguit el caràcter correcte per a corregir l'error.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 4. Repetiu els passos 2 i 3 fins que la línia sigui correcta.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
315 ---> Quen van escroure aquerta línia, algh va prémer tikles equivocades!
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
316 ---> Quan van escriure aquesta línia, algú va prémer tecles equivocades!
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 5. Ara continueu a la lliçó 3.2.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320 NOTA: Recordeu que heu de practicar, no memoritzar.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
324 Lliçó 3.3: L'ORDRE CANVIAR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
327 ** Per a canviar una part o tota la paraula, escriviu cw . **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
329 1. Moveu el cursor a la primera línia de sota senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 2. Poseu el cursor sobre la u de 'lughc'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
333 3. Teclegeu cw i corregiu la paraula (en aquest cas, escrivint 'ínia'.)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 4. Premeu <ESC> i aneu al següent error.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337 5. Repetiu els passos 3 i 4 fins que les dues frases siguin iguals.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 ---> Aquesta lughc té algunes paradskl que s'han de cdddf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 ---> Aquesta línia té algunes paraules que s'han de canviar.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 Noteu que cw no només canvia la paraula, també us posa en mode d'inserció.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
347 Lliçó 3.4: MÉS CANVIS AMB c
7
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 ** L'ordre canviar s'usa amb els mateixos objectes que l'ordre esborrar. **
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 1. L'ordre canviar funciona igual que la d'esborrar. El format és:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
354 [nombre] c objecte O BÉ c [nombre] objecte
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
356 2. Els objectes són els mateixos, w (paraula), $ (final de línia), etc.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
358 3. Moveu el cursor fins la primera línia senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360 4. Avanceu fins al primer error.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 5. Premeu c$ per fer la línia igual que la segona i premeu <ESC>.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 ---> El final d'aquesta línia necessita canvis per ser igual que la segona.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 ---> El final d'aquesta línia s'ha de corregir amb l'ordre c$.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
370 LLIÇÓ 3 SUMARI
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
373 1. Per a tornar a posar el text que heu esborrat, premeu p . Això posa
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
374 el text esborrat DESPRÉS del cursor (si heu esborrat una línia anirà
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
375 a parar a la línia SEGÜENT d'on hi ha el cursor).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
377 2. Per a substituir el caràcter de sota el cursor, premeu r i tot
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
378 seguit el caràcter que ha de reemplaçar l'original.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
380 3. L'ordre canviar permet canviar l'objecte especificat, des del cursor
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381 fins el final de l'objecte. Per exemple, cw canvia el que hi ha des
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
382 del cursor fins al final de la paraula, i c$ fins al final de
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
383 línia.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
385 4. El format de l'ordre canviar és:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
387 [nombre] c objecte O BÉ c [nombre] objecte
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
389 Ara aneu a la següent lliçó.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
393 Lliçó 4.1: SITUACIÓ I ESTAT DEL FITXER
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
394
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
396 ** Premeu CTRL-g per a veure la situació dins del fitxer i el seu estat.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
397 Premeu SHIFT-g per a anar a una línia determinada. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
399 Nota: No proveu res fins que hagueu llegit TOTA la lliçó!!
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
401 1. Mantingueu premuda la tecla Control i premeu g . A la part de baix
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
402 de la pàgina apareixerà un línia amb el nom del fitxer i la línia en
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
403 la qual us trobeu. Recordeu el número de la línia pel Pas 3.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
405 2. Premeu Shift-g per a anar al final de tot del fitxer.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
407 3. Teclegeu el número de la línia on éreu i després premeu Shift-g. Això
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 us tornarà a la línia on éreu quan heu premut per primer cop Ctrl-g.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 (Quan teclegeu el número NO es veurà a la pantalla.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
411 4. Ara executeu els passos de l'1 al 3.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
412
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
413
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
414
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
415 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
416 Lliçó 4.2: L'ORDRE CERCAR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
419 ** Premeu / seguit de la frase que vulgueu cercar. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421 1. En el mode Normal premeu el caràcter / . Noteu que el cursor apareix
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
422 a la part de baix de la pantalla igual que amb l'ordre : .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424 2. Ara escriviu 'errroor' <ENTRAR>. Aquesta és la paraula que voleu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425 cercar.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
427 3. Per a tornar a cercar la mateixa frase, premeu n . Per a cercar la
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
428 mateixa frase en direcció contraria, premeu Shift-n .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 4. Si voleu cercar una frase en direcció ascendent, useu l'ordre ? en
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431 lloc de /.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 ---> "errroor" no és com s'escriu error; errroor és un error.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
435 Nota: Quan la cerca arribi al final del fitxer continuarà a l'inici.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
439 Lliçó 4.3: CERCA DE PARÈNTESIS
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
442 ** Premeu % per cercar el ), ], o } corresponent. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
444 1. Poseu el cursor a qualsevol (, [, o { de la línia senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446 2. Ara premeu el caràcter % .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 3. El cursor hauria d'anar a la clau o parèntesis corresponent.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
450 4. Premeu % per a tornar el cursor al primer parèntesi.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 ---> Això ( és una línia amb caràcters (, [ ] i { } de prova. ))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
454 Nota: Això és molt útil per a trobar errors en programes informàtics!
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
460
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
462 Lliçó 4.4: UNA MANERA DE CORREGIR ERRORS
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
465 ** Escriviu :s/vell/nou/g per a substituir 'vell' per 'nou'. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
467 1. Moveu el cursor a la línia de sota senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
469 2. Escriviu :s/laa/la <ENTRAR>. Aquesta ordre només canvia la primera
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470 coincidència que es trobi a la línia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
472 3. Ara escriviu :s/laa/la/g per a fer una substitució global. Això
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 canviarà totes les coincidències que es trobin a la línia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
475 ---> laa millor època per a veure laa flor és laa primavera.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
477 4. Per a canviar totes les coincidències d'una cadena entre dues línies,
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478 escriviu :#,#s/vell/nou/g on #,# són els nombres de les línies.
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
479 Escriviu :%s/vell/nou/g per a substituir la cadena a tot el fitxer.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
485 LLIÇÓ 4 SUMARI
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488 1. Ctrl-g mostra la posició dins del fitxer i l'estat del mateix.
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
489 Shift-g us porta al final del fitxer. Un número seguit de Shift-g us
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
490 porta a la línia corresponent.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
491
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
492 2. L'ordre / seguida d'una frase cerca la frase cap ENDAVANT.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
493 L'ordre ? seguida d'una frase cerca la frase cap ENDARRERE.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
494 Després d'una cerca premeu n per a trobar la pròxima coincidència en
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
495 la mateixa direcció, o Shift-n per a cercar en la direcció contrària.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
497 3. L'ordre % quan el cursor es troba en un (, ), [, ], {, o } troba la
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498 parella corresponent.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
500 4. Per a substituir el primer 'vell' per 'nou' en una línia :s/vell/nou
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
501 Per a substituir tots els 'vell' per 'nou' en una línia :s/vell/nou/g
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
502 Per a substituir frases entre les línies # i # :#,#s/vell/nou/g
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
503 Per a substituir totes les coincidències en el fitxer :%s/vell/nou/g
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
504 Per a demanar confirmació cada cop afegiu 'c' :%s/vell/nou/gc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
507 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
508 Lliçó 5.1: COM EXECUTAR UNA ORDRE EXTERNA
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
509
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
510
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
511 ** Teclegeu :! seguit d'una ordre externa per a executar-la. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
512
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
513 1. Premeu el familiar : per a col·locar el cursor a la part de baix de
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
514 la pantalla. Això us permet entrar una ordre.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516 2. Ara teclegeu el caràcter ! (signe d'exclamació). Això us permet
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
517 executar qualsevol ordre de l'intèrpret del sistema.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
518
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
519 3. Per exemple, escriviu ls i tot seguit premeu <ENTRAR>. Això us
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
520 mostrarà el contingut del directori, tal com si estiguéssiu a la
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
521 línia d'ordres. Proveu :!dir si ls no funciona.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
522
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
523 Nota: D'aquesta manera és possible executar qualsevol ordre externa.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
524
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
525 Nota: Totes les ordres : s'han d'acabar amb la tecla <ENTRAR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
526
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
527
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
528
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
529
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
530 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
531 Lliçó 5.2: MÉS SOBRE L'ESCRIPTURA DE FITXERS
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
532
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
533
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
534 ** Per a desar els canvis fets, escriviu :w FITXER. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
535
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
536 1. Escriviu :!dir o bé :!ls per a obtenir un llistat del directori.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
537 Ja sabeu que heu de prémer <ENTRAR> després d'això.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
538
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
539 2. Trieu un nom de fitxer que no existeixi, com ara PROVA.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
540
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
541 3. Ara feu: :w PROVA (on PROVA és el nom que heu triat.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
542
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
543 4. Això desa el text en un fitxer amb el nom de PROVA. Per a comprovar-ho
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
544 escriviu :!dir i mireu el contingut del directori.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
545
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
546 Note: Si sortiu del Vim i entreu una altra vegada amb el fitxer PROVA, el
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
547 fitxer serà una còpia exacta del tutor que heu desat.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
548
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
549 5. Ara esborreu el fitxer teclejant (MS-DOS): :!del PROVA
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
550 o bé (Unix): :!rm PROVA
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
551
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
552
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
553 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
554 Lliçó 5.3: UNA ORDRE SELECTIVA PER A DESAR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
555
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
556
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
557 ** Per a desar una part del fitxer, escriviu :#,# w FITXER **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
558
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
559 1. Un altre cop, feu :!dir o :!ls per a obtenir un llistat del
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
560 directori i trieu un nom de fitxer adequat com ara PROVA.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
561
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
562 2. Moveu el cursor a dalt de tot de la pàgina i premeu Ctrl-g per
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
563 saber el número de la línia. RECORDEU AQUEST NÚMERO!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
564
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
565 3. Ara aneu a baix de tot de la pàgina i torneu a prémer Ctrl-g.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
566 RECORDEU AQUEST NÚMERO TAMBÉ!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
567
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
568 4. Per a desar NOMÉS una secció en un fitxer, escriviu :#,# w PROVA on
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
569 #,# són els dos números que heu recordat (dalt, baix) i PROVA el nom
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
570 del fitxer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
571
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
572 5. Comproveu que el fitxer nou hi sigui amb :!dir però no l'esborreu.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
573
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
574
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
575
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
576 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
577 Lliçó 5.4: OBTENIR I AJUNTAR FITXERS
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
578
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
579
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
580 ** Per a inserir el contingut d'un fitxer, feu :r FITXER **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
581
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
582 1. Assegureu-vos, amb l'ordre :!dir , que el fitxer PROVA encara hi és.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
583
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
584 2. Situeu el cursor a dalt de tot d'aquesta pàgina.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
585
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
586 NOTA: Després d'executar el Pas 3 veureu la lliçó 5.3. Tireu cap avall
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
587 fins a aquesta lliçó un altre cop.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
588
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
589 3. Ara obtingueu el fitxer PROVA amb l'ordre :r PROVA on PROVA és el
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
590 nom del fitxer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
591
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
592 NOTA: El fitxer que obtingueu s'insereix en el lloc on hi hagi el cursor.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
593
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
594 4. Per a comprovar que s'ha obtingut el fitxer tireu enrere i mireu com
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
595 ara hi ha dues còpies de la lliçó 5.3, l'original i la del fitxer.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
596
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
597
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
598
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
599 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
600 LLIÇÓ 5 SUMARI
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
601
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
602
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
603 1. :!ordre executa una ordre externa.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
604
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
605 Alguns exemples útils:
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
606 (MS-DOS) (Unix)
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
607 :!dir :!ls - mostra un llistat del directori
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
608 :!del FITXER :!rm FITXER - esborra el fitxer FITXER
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
609
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
610 2. :w FITXER escriu el fitxer editat al disc dur, amb el nom FITXER.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
611
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
612 3. :#,#w FITXER desa les línies de # a # en el fitxer FITXER.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
613
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
614 4. :r FITXER llegeix el fitxer FITXER del disc dur i l'insereix en el
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
615 fitxer editat a la posició on hi ha el cursor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
616
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
617
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
618
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
619
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
620
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
621
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
622 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
623 Lliçó 6.1: L'ORDRE OBRIR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
624
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
625
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
626 ** Premeu o per a obrir una línia i entrar en mode inserció. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
627
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
628 1. Moveu el cursor a la línia de sota senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
629
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
630 2. Premeu o (minúscula) per a obrir una línia a BAIX del cursor i
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
631 situar-vos en mode d'inserció.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
632
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
633 3. Copieu la línia senyalada amb ---> i premeu <ESC> per a tornar al mode
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
634 normal.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
635
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
636 ---> Després de prémer o el cursor se situa a la línia nova en mode inserció.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
637
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
638 4. Per a obrir una línia a SOBRE del cursor, premeu la O majúscula, en lloc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
639 de la minúscula. Proveu-ho amb la línia de sota.
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
640 Obriu una línia sobre aquesta prement Shift-o amb el cursor en aquesta línia.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
641
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
642
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
643
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
644
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
645 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
646 Lliçó 6.2: L'ORDRE AFEGIR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
647
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
648
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
649 ** Premeu a per a afegir text DESPRÉS del cursor. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
650
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
651 1. Moveu el cursor al final de la primera línia de sota senyalada
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
652 amb ---> prement $ en el mode Normal.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
653
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
654 2. Premeu la lletra a (minúscula) per a afegir text DESPRÉS del caràcter
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
655 sota el cursor. (La A majúscula afegeix text al final de la línia.)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
656
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
657 Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
658 la tecla <ESC>, cursor a la dreta, i finalment x , només per afegir
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
659 text a final de línia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
660
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
661 3. Ara completeu la primera línia. Tingueu en compte que aquesta ordre
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
662 és exactament igual que la d'inserir, excepte pel que fa al lloc on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
663 s'insereix el text.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
664
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
665 ---> Aquesta línia us permetrà practicar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
666 ---> Aquesta línia us permetrà practicar afegir text a final de línia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
667
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
668 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
669 Lliçó 6.3: UNA ALTRA MANERA DE SUBSTITUIR
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
670
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
671
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
672 ** Teclegeu una R majúscula per a substituir més d'un caràcter. **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
673
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
674 1. Moveu el cursor a la línia de sota senyalada amb --->.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
675
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
676 2. Poseu el cursor al principi de la primera paraula que és diferent
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
677 respecte a la segona línia senyalada amb ---> (la paraula "l'última").
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
678
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
679 3. Ara premeu R i substituïu el que queda de text a la primera línia
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
680 escrivint sobre el text vell, per a fer-la igual que la segona.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
681
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
682 ---> Per a fer aquesta línia igual que l'última useu les tecles.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
683 ---> Per a fer aquesta línia igual que la segona, premeu R i el text nou.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
684
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
685 4. Tingueu en compte que en prémer <ESC> per a sortir, el text que no
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
686 s'hagi alterat es manté.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
687
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
688
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
689
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
690
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
691 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
692 Lliçó 6.4: ESTABLIR OPCIONS
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
693
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
694 ** Feu que les ordres cercar o substituir ignorin les diferències
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
695 entre majúscules i minúscules **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
696
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
697 1. Cerqueu la paraula 'ignorar' amb: /ignorar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
698 Repetiu-ho uns quants cops amb la tecla n.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
699
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
700 2. Establiu l'opció 'ic' (ignore case) escrivint:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
701 :set ic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
702
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
703 3. Ara cerqueu 'ignorar' un altre cop amb la tecla n.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
704 Repetiu-ho uns quants cops més.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
705
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
706 4. Establiu les opcions 'hlsearch' i 'incsearch':
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
707 :set hls is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
708
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
709 5. Ara torneu a executar una ordre de cerca, i mireu què passa:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
710 /ignorar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
711
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
712 6. Per a treure el ressaltat dels resultats, feu:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
713 :nohlsearch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
714 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
715 LLIÇÓ 6 SUMARI
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
716
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
717
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
718 1. L'ordre o obre una línia a SOTA la del cursor i mou el cursor a la nova
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
719 línia, en mode Inserció.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
720 La O majúscula obre la línia a SOBRE la que hi ha el cursor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
721
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
722 2. Premeu una a per a afegir text DESPRÉS del caràcter a sota del cursor.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
723 La A majúscula afegeix automàticament el text a final de línia.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
724
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
725 3. L'ordre R majúscula us posa en mode substitució fins que premeu <ESC>.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
726
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
727 4. Escriviu ":set xxx" per a establir l'opció "xxx"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
728
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
729
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
730
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
731
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
732
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
733
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
734
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
735
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
736
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
737 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
738 LLIÇÓ 7: ORDRES D'AJUDA
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
739
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
740
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
741 ** Utilitzeu el sistema intern d'ajuda **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
742
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
743 El Vim té un extens sistema d'ajuda. Per a llegir una introducció proveu una
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
744 d'aquestes tres coses:
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
745 - premeu la tecla <AJUDA> (si la teniu)
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
746 - premeu la tecla <F1> (si la teniu)
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
747 - escriviu :help <ENTRAR>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
748
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
749 Teclegeu :q <ENTRAR> per a tancar la finestra d'ajuda.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
750
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
751 Podeu trobar ajuda sobre pràcticament qualsevol tema passant un argument
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
752 a l'ordre ":help". Proveu el següent (no oblideu prémer <ENTRAR>):
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
753
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
754 :help w
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
755 :help c_<T
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
756 :help insert-index
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
757 :help user-manual
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
758
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
759
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
760 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
761 LLIÇÓ 8: CREAR UN SCRIPT D'INICI
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
762
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
763 ** Activeu funcions automàticament **
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
764
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
765 El Vim té moltes més funcions que el Vi, però moltes estan desactivades
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
766 per defecte. Per a començar a utilitzar més funcions heu de crear un
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
767 fitxer "vimrc".
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
768
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
769 1. Comenceu a editar el fitxer "vimrc", depenent del sistema
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
770 :edit ~/.vimrc per Unix
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
771 :edit $VIM/_vimrc per MS-Windows
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
772
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
773 2. Llegiu el fitxer "vimrc" d'exemple:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
774
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
775 :read $VIMRUNTIME/vimrc_example.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
776
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
777 3. Deseu el fitxer amb:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
778
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
779 :write
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
780
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
781 El pròxim cop que executeu el Vim usarà ressaltat de sintaxi. Podeu
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
782 afegir els ajustos que vulgueu en aquest fitxer "vimrc".
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
783 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
784
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
785 Aquí conclou el Tutor del Vim. És una breu introducció a l'editor Vim,
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
786 suficient perquè el pugueu començar a fer servir. No és complet perquè
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
787 el Vim té moltes ordres. Per a llegir el manual de l'usuari, feu:
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
788 ":help user-manual".
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
789
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
790 Per a un estudi més a fons us recomanem el següent llibre:
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
791 Vim - Vi Improved - de Steve Oualline
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
792 Editorial: New Riders
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
793 És el primer llibre dedicat completament al Vim, especialment útil per a
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
794 usuaris novells. Conté molts exemples i diagrames.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
795 Vegeu http://iccf-holland.org/click5.html
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
796
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
797 Aquest altre és més vell i tracta més sobre el Vi que sobre el Vim:
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
798 Learning the Vi Editor - de Linda Lamb
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
799 Editorial: O'Reilly & Associates Inc.
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
800 És un bon llibre per a aprendre qualsevol cosa que desitgeu sobre el Vi.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
801 La sisena edició també inclou informació sobre el Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
802
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
803 Aquest tutorial ha estat escrit per Michael C. Pierce i Robert K. Ware,
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
804 Colorado School of Mines amb la col·laboració de Charles Smith, Colorado
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
805 State University. E-mail: bware@mines.colorado.edu.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
806
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
807 Modificat pel Vim per Bram Moolenaar.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
808
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
809 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~