annotate runtime/tutor/tutor.ca.utf-8 @ 15396:325e4a8ba1b6 v8.1.0706

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