annotate runtime/tutor/tutor.es.utf-8 @ 4986:048c69ebe8ee v7.3.1238

updated for version 7.3.1238 Problem: Crash in Python interface on 64 bit machines. Solution: Change argument type of PyString_AsStringAndSize. (Taro Muraoka, Jun Takimoto)
author Bram Moolenaar <bram@vim.org>
date Mon, 24 Jun 2013 20:32:57 +0200
parents 7bc41231fbc7
children 1e8ebf870720
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 i e n v e n i d o a l t u t o r d e V I M - Versión 1.4 =
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
3 ===============================================================================
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
4
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
5 Vim es un editor muy potente que dispone de muchos mandatos, demasiados
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
6 para ser explicados en un tutor como éste. Este tutor está diseñado
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
7 para describir suficientes mandatos para que usted sea capaz de
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
8 aprender fácilmente a usar Vim como un editor de propósito general.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
9
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
10 El tiempo necesario para completar el tutor es aproximadamente de 25-30
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
11 minutos, dependiendo de cuanto tiempo se dedique a la experimentación.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
12
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
13 Los mandatos de estas lecciones modificarán el texto. Haga una copia de
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
14 este fichero para practicar (con «vimtutor» esto ya es una copia).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
15
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
16 Es importante recordar que este tutor está pensado para enseñar con
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
17 la práctica. Esto significa que es necesario ejecutar los mandatos
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
18 para aprenderlos adecuadamente. Si únicamente se lee el texto, se
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
19 olvidarán los mandatos.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
20
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
21 Ahora, asegúrese de que la tecla de bloqueo de mayúsculas no está
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
22 activada y pulse la tecla j lo suficiente para mover el cursor
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
23 de forma que la Lección 1.1 ocupe completamente la pantalla.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
25 Lección 1.1: MOVIMIENTOS DEL CURSOR
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
26
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
27 ** Para mover el cursor, pulse las teclas h,j,k,l de la forma que se indica. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
28 ^
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
29 k Indicación: La tecla h está a la izquierda y mueve a la izquierda.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
30 < h l > La tecla l está a la derecha y mueve a la derecha.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
31 j La tecla j parece una flecha que apunta hacia abajo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
32 v
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
33
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
34 1. Mueva el cursor por la pantalla hasta que se sienta cómodo con ello.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
35
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
36 2. Mantenga pulsada la tecla j hasta que se repita «automágicamente».
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
37 ---> Ahora ya sabe como llegar a la lección siguiente.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
38
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
39 3. Utilizando la tecla abajo, vaya a la Lección 1.2.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
40
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
41 Nota: Si alguna vez no está seguro sobre algo que ha tecleado, pulse <ESC>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
42 para situarse en modo Normal. Luego vuelva a teclear la orden que deseaba.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
43
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
44 Nota: Las teclas de movimiento del cursor también funcionan. Pero usando
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
45 hjkl podrá moverse mucho más rápido una vez que se acostumbre a ello.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
46
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
47 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
48 Lección 1.2: ENTRANDO Y SALIENDO DE VIM
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
49
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
50 ¡¡ NOTA: Antes de ejecutar alguno de los pasos siguientes lea primero
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
51 la lección entera!!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
52
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
53 1. Pulse la tecla <ESC> (para asegurarse de que está en modo Normal).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
54
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
55 2. Escriba: :q! <INTRO>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
56
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
57 ---> Esto provoca la salida del editor SIN guardar ningún cambio que se haya
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
58 hecho. Si quiere guardar los cambios y salir escriba:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
59 :wq <INTRO>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
60
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
61 3. Cuando vea el símbolo del sistema, escriba el mandato que le trajo a este
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
62 tutor. Éste puede haber sido: vimtutor <INTRO>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
63 Normalmente se usaría: vim tutor <INTRO>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
64
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
65 ---> 'vim' significa entrar al editor, 'tutor' es el fichero a 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 ha memorizado estos pasos y se se siente con confianza, ejecute los
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
68 pasos 1 a 3 para salir y volver a entrar al editor. Después mueva el
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
69 cursor hasta la Lección 1.3.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
70 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
71 Lección 1.3: EDICIÓN DE TEXTO - BORRADO
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
72
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
73 ** Estando en modo Normal pulse x para borrar el carácter sobre el cursor. **j
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
74
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
75
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
76 1. Mueva el cursor a la línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
77
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
78 2. Para corregir los errores, mueva el cursor hasta que esté bajo el
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
79 carácter que va aser borrado.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
80
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
81 3. Pulse la tecla x para borrar el carácter sobrante.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
82
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
83 4. Repita los pasos 2 a 4 hasta que la frase sea la correcta.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
84
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
85 ---> La vvaca saltóó soobree laa luuuuna.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
86
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
87 5. Ahora que la línea esta correcta, continúe con la Lección 1.4.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
88
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
89
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
90 NOTA: A medida que vaya avanzando en este tutor no intente memorizar,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
91 aprenda practicando.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
92
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
93 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
94 Lección 1.4: EDICIÓN DE TEXTO - INSERCIÓN
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
95
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
96 ** Estando en modo Normal pulse i para insertar texto. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
97
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
98
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
99 1. Mueva el cursor a la primera línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
100
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
101 2. Para que la primera línea se igual a la segunda mueva el cursor bajo el
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
102 primer carácter que sigue al texto que ha de ser insertado.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
103
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
104 3. Pulse i y escriba los caracteres a añadir.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
105
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
106 4. A medida que sea corregido cada error pulse <ESC> para volver al modo
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
107 Normal. Repita los pasos 2 a 4 para corregir la frase.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
108
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
109 ---> Flta texto en esta .
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
110 ---> Falta algo de texto en esta línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
111
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
112 5. Cuando se sienta cómodo insertando texto pase al resumen que esta más
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
113 abajo.
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
117 RESUMEN DE LA LECCIÓN 1
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
118
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
119
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
120 1. El cursor se mueve utilizando las teclas de las flechas o las teclas hjkl.
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
121 h (izquierda) j (abajo) k (arriba) l (derecha)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
122
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
123 2. Para acceder a Vim (desde el símbolo del sistema %) escriba:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
124 vin FILENAME <INTRO>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
125
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
126 3. Para salir de Vim escriba: <ESC> :q! <INTRO> para eliminar todos
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
127 los cambios.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
128
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
129 4. Para borrar un carácter sobre el cursor en modo Normal pulse: x
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
130
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
131 5. Para insertar texto en la posición del cursor estando en modo Normal:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
132 pulse i escriba el texto pulse <ESC>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
133
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
134 NOTA: Pulsando <ESC> se vuelve al modo Normal o cancela un mandato no deseado
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
135 o incompleto.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
136
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
137 Ahora continúe con la Lección 2.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
138
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
140 Lección 2.1: MANDATOS PARA BORRAR
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
141
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
142
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
143 ** Escriba dw para borrar hasta el final de una palabra **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
144
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
145
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
146 1. Pulse <ESC> para asegurarse de que está en el modo Normal.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
147
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
148 2. Mueva el cursor a la línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
149
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
150 3. Mueva el cursor al comienzo de una palabra que desee borrar.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
151
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
152 4. Pulse dw para hacer que la palabra desaparezca.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
153
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
154
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
155 NOTA: Las letras dw aparecerán en la última línea de la pantalla cuando
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
156 las escriba. Si escribe algo equivocado pulse <ESC> y comience de nuevo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
157
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
158
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
159 ---> Hay algunas palabras pásalo bien que no pertenecen papel a esta frase.
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
163 Lección 2.2: MÁS MANDATOS PARA BORRAR
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
164
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
165
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
166 ** Escriba d$ para borrar hasta el final de la línea. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
167
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
168
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
169 1. Pulse <ESC> para asegurarse de que está en el modo Normal.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
170
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
171 2. Mueva el cursor a la línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
172
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
173 3. Mueva el cursor al final de la línea correcta (DESPUÉS del primer . ).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
174
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
175 4. Escriba d$ para borrar hasta el final de la línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
176
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
177 ---> Alguien ha escrito el final de esta línea dos veces. esta línea dos veces.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
178
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
179
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
186 Lección 2.3: SOBRE MANDATOS Y OBJETOS
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 formato del mandato de borrar d es como sigue:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
190
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
191 [número] d objeto O d [número] objeto
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
192 donde:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
193 número - es cuántas veces se ha de ejecutar el mandato (opcional, defecto=1).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
194 d - es el mandato para borrar.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
195 objeto - es sobre lo que el mandato va a operar (lista, abajo).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
196
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
197 Una lista corta de objetos:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
198 w - desde el cursor hasta el final de la palabra, incluyendo el espacio.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
199 e - desde el cursor hasta el final de la palabra, SIN incluir el espacio.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
200 $ - desde el cursor hasta el final de la línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
201
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
202 NOTE: Para los aventureros, pulsando sólo el objeto estando en modo Normal
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
203 sin un mandato moverá el cursor como se especifica en la lista de objetos.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
204
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 Lección 2.4: UNA EXCEPCIÓN AL 'MANDATO-OBJETO'
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
209
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
210 ** Escriba dd para borrar una línea entera. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
211
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
212 Debido a la frecuencia con que se borran líneas enteras, los diseñadores
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
213 de Vim decidieron que sería más fácil el escribir simplemente dos des en
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
214 una fila para borrar una línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
215
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
216 1. Mueva el cursor a la segunda línea de la lista de abajo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
217 2. Escriba dd para borrar la línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
218 3. Muévase ahora a la cuarta línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
219 4. Escriba 2dd (recuerde número-mandato-objeto) para borrar las dos
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
220 líneas.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
221
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
222 1) Las rosas son rojas,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
223 2) El barro es divertido,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
224 3) El cielo es azul,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
225 4) Yo tengo un coche,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
226 5) Los relojes marcan la hora,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
227 6) El azucar es dulce,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
228 7) Y así eres tu.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
229
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
230 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
231 Lección 2.5: EL MANDATO DESHACER
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
232
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
233
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
234 ** Pulse u para deshacer los últimos mandatos,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
235 U para deshacer una línea entera. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
236
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
237 1. Mueva el cursor a la línea de abajo señalada con ---> y sitúelo bajo el
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
238 primer error.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
239 2. Pulse x para borrar el primer caráter erróneo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
240 3. Pulse ahora u para deshacer el último mandato ejecutado.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
241 4. Ahora corrija todos los errores de la línea usando el mandato x.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
242 5. Pulse ahora U mayúscula para devolver la línea a su estado original.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
243 6. Pulse ahora u unas pocas veces para deshacer lo hecho por U y los
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
244 mandatos previos.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
245 7. Ahora pulse CTRL-R (mantenga pulsada la tecla CTRL y pulse R) unas
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
246 pocas veces para volver a ejecutar los mandatos (deshacer lo deshecho).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
247
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
248 ---> Corrrija los errores dee esttta línea y vuuelva a ponerlos coon deshacer.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
249
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
250 8. Estos mandatos son muy útiles. Ahora pase al resumen de la Lección 2.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
251
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
252 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
253 RESUMEN DE LA LECCIÓN 2
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
254
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
255 1. Para borrar desde el cursor hasta el final de una palabra pulse: dw
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
256
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
257 2. Para borrar desde el cursor hasta el final de una línea pulse: d$
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
258
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
259 3. Para borrar una línea enter pulse: dd
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
260
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
261 4. El formato de un mandato en modo Normal es:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
262
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
263 [número] mandato objeto O mandato [número] objeto
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
264 donde:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
265 número - es cuántas veces se ha de ejecutar el mandato
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
266 mandato - es lo que hay que hacer, por ejemplo, d para borrar
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
267 objeto - es sobre lo que el mandato va a operar, por ejemplo
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
268 w (palabra), $ (hasta el final de la línea), etc.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
269
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
270 5. Para deshacer acciones previas pulse: u (u minúscula)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
271 Para deshacer todos los cambios de una línea pulse: U (U mayúscula)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
272 Para deshacer lo deshecho pulse: CTRL-R
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
273
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
274
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
275 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
276 Lección 3.1: EL MANDATO «PUT» (poner)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
277
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
278 ** Pulse p para poner lo último que ha borrado después del cursor. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
279
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
280 1. Mueva el cursor al final de la lista de abajo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
281
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
282 2. Escriba dd para borrar la línea y almacenarla en el buffer de Vim.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
283
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
284 3. Mueva el cursor a la línea que debe quedar por debajo de la
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
285 línea a mover.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
286
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
287 4. Estando en mod Normal, pulse p para restituir la línea borrada.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
288
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
289 5. Repita los pasos 2 a 4 para poner todas las líneas en el orden correcto.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
290
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
291 d) ¿Puedes aprenderla tu?
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
292 b) Las violetas son azules,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
293 c) La inteligencia se aprende,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
294 a) Las rosas son rojas,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
295
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
296 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
297 Lección 3.2: EL MANDATO «REPLACE» (remplazar)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
298
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
299
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
300 ** Pulse r y un carácter para sustituir el carácter sobre el cursor. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
301
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
302
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
303 1. Mueva el cursor a la primera línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
304
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
305 2. Mueva el cursor para situarlo bajo el primer error.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
306
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
307 3. Pulse r y el carácter que debe sustituir al erróneo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
308
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
309 4. Repita los pasos 2 y 3 hasta que la primera línea esté corregida.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
310
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
311 ---> ¡Cuendo esta línea fue rscrita alguien pulso algunas teclas equibocadas!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
312 ---> ¡Cuando esta línea fue escrita alguien pulsó algunas teclas equivocadas!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
313
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
314
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
315
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
316
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
317
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
318
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
319 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
320 Lección 3.3: EL MANDATO «CHANGE» (cambiar)
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 ** Para cambiar parte de una palabra o toda ella escriba cw . **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
324
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
325
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
326 1. Mueva el cursor a la primera línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
327
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
328 2. Sitúe el cursor en la u de lubrs.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
329
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
330 3. Escriba cw y corrija la palabra (en este caso, escriba 'ínea').
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
331
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
332 4. Pulse <ESC> y mueva el cursor al error siguiente (el primer carácter
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
333 que deba cambiarse).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
334
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
335 5. Repita los pasos 3 y 4 hasta que la primera frase sea igual a la segunda.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
336
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
337 ---> Esta lubrs tiene unas pocas pskavtad que corregir usem el mandato change.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
338 ---> Esta línea tiene unas pocas palabras que corregir usando el mandato change.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
339
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
340
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
341 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
342 Lección 3.4: MÁS CAMBIOS USANDO c
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
343
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
344 ** El mandato change se utiliza con los mismos objetos que delete. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
345
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
346 1. El mandato change funciona de la misma forma que delete. El formato es:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
347
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
348 [número] c objeto O c [número] objeto
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
349
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
350 2. Los objetos son tambiém los mismos, tales como w (palabra), $ (fin de
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
351 la línea), etc.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
352
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
353 3. Mueva el cursor a la primera línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
354
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
355 4. Mueva el cursor al primer error.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
356
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
357 5. Escriba c$ para hacer que el resto de la línea sea como la segunda
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
358 y pulse <ESC>.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
359
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
360 ---> El final de esta línea necesita alguna ayuda para que sea como la segunda.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
361 ---> El final de esta línea necesita ser corregido usando el mandato c$.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
362
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
363 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
364 RESUMEN DE LA LECCIÓN 3
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
365
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
366
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
367 1. Para sustituir texto que ha sido borrado, pulse p . Esto Pone el texto
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
368 borrado DESPUÉS del cursor (si lo que se ha borrado es una línea se
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
369 situará sobre la línea que está sobre el cursor).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
370
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
371 2. Para sustituir el carácter bajo el cursor, pulse r y luego el
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
372 carácter que sustituirá al original.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
373
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
374 3. El mandato change le permite cambiar el objeto especificado desde la
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
375 posición del cursor hasta el final del objeto; e.g. Pulse cw para
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
376 cambiar desde el cursor hasta el final de la palabra, c$ para cambiar
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
377 hasta el final de la línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
378
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
379 4. El formato para change es:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
380
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
381 [número] c objeto O c [número] objeto
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
382
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
383 Pase ahora a la lección siguiente.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
384
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
385
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
386 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
387 Lección 4.1: SITUACIÓN EN EL FICHERO Y SU ESTADO
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
388
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
389
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
390 ** Pulse CTRL-g para mostrar su situación en el fichero y su estado.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
391 Pulse MAYU-G para moverse a una determinada línea del fichero. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
392
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
393 Nota: ¡¡Lea esta lección entera antes de ejecutar alguno de los pasos!!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
394
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
395
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
396 1. Mantenga pulsada la tecla Ctrl y pulse g . Aparece una línea de estado
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
397 al final de la pantalla con el nombre del fichero y la línea en la que
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
398 está situado. Recuerde el número de la línea para el Paso 3.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
399
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
400 2. Pulse Mayu-G para ir al final del fichero.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
401
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
402 3. Escriba el número de la línea en la que estaba y despúes Mayu-G. Esto
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
403 le volverá a la línea en la que estaba cuando pulsó Ctrl-g.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
404 (Cuando escriba los números NO se mostrarán en la pantalla).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
405
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
406 4. Si se siente confiado en poder hacer esto ejecute los pasos 1 a 3.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
407
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
408 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
409 Lección 4.2: EL MANDATO «SEARCH» (buscar)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
410
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
411 ** Escriba / seguido de una frase para buscar la frase. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
412
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
413 1. En modo Normal pulse el carácter / . Fíjese que tanto el carácter /
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
414 como el cursor aparecen en la última línea de la pantalla, lo mismo
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
415 que el mandato : .
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
416
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
417 2. Escriba ahora errroor <INTRO>. Esta es la palabra que quiere buscar.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
418
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
419 3. Para repetir la búsqueda, simplemente pulse n .
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
420 Para busacar la misma frase en la dirección opuesta, pulse Mayu-N .
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
421
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
422 4. Si quiere buscar una frase en la dirección opuesta (hacia arriba),
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
423 utilice el mandato ? en lugar de / .
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
424
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
425 ---> Cuando la búsqueda alcanza el final del fichero continuará desde el
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
426 principio.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
427
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
428 «errroor» no es la forma de deletrear error; errroor es un error.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
429
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
430 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
431 Lección 4.3: BÚSQUEDA PARA COMPROBAR PARÉNTESIS
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
432
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
433 ** Pulse % para encontrar el paréntesis correspondiente a ),] o } . **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
434
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
435
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
436 1. Sitúe el cursor en cualquiera de los caracteres ), ] o } en la línea de
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
437 abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
438
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
439 2. Pulse ahora el carácter % .
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
440
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
441 3. El cursor debería situarse en el paréntesis (, corchete [ o llave {
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
442 correspondiente.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
443
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
444 4. Pulse % para mover de nuevo el cursor al paréntesis, corchete o llave
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
445 correspondiente.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
446
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
447 ---> Esto ( es una línea de prueba con (, [, ], {, y } en ella. )).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
448
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
449 Nota: ¡Esto es muy útil en la detección de errores en un programa con
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
450 paréntesis, corchetes o llaves disparejos.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
451
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
452 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
453 Lección 4.4: UNA FORMA DE CAMBIAR ERRORES
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
454
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
455
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
456 ** Escriba :s/viejo/nuevo/g para sustituir 'viejo' por 'nuevo'. **
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 1. Mueva el cursor a la línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
460
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
461 2. Escriba :s/laas/las/ <INTRO> . Tenga en cuenta que este mandato cambia
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
462 sólo la primera aparición en la línea de la expresión a cambiar.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
463
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
464 ---> Laas mejores épocas para ver laas flores son laas primaveras.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
465
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
466 4. Para cambiar todas las apariciones de una expresión ente dos líneas
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
467 escriba :#,#s/viejo/nuevo/g donde #,# son los números de las dos
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
468 líneas. Escriba :%s/viejo/nuevo/g para hacer los cambios en todo
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
469 el fichero.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
470
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
471
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
472
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
473
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
474
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
475 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
476 RESUMEN DE LA LECCIÓN 4
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
477
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
478
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
479 1. Ctrl-g muestra la posición del cursor en el fichero y su estado.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
480 Mayu-G mueve el cursor al final del fichero. Un número de línea
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
481 sewguido de Mayu-G mueve el cursor a la línea con ese número.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
482
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
483 2. Pulsando / seguido de una frase busca la frase hacia ADELANTE.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
484 Pulsando ? seguido de una frase busca la frase hacia ATRÁS.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
485 Después de una búsqueda pulse n para encontrar la aparición
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
486 siguiente en la misma dirección.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
487
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
488 3. Pulsando % cuando el cursor esta sobre (,), [,], { o } localiza
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
489 la pareja correspondiente.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
490
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
491 4. Para cambiar viejo por nuevo en una línea pulse :s/viejo/nuevo
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
492 Para cambiar todos los viejo por nuevo en una línea pulse :s/viejo/nuevo/g
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
493 Para cambiar frases entre dos números de líneas pulse :#,#s/viejo/nuevo/g
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
494 Para cambiar viejo por nuevo en todo el fichero pulse :%s/viejo/nuevo/g
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
495 Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
496
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
497
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
498 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
499 Lección 5.1: CÓMO EJECUTAR UN MANDATO EXTERNO
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
500
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
501
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
502 ** Escriba :! seguido de un mandato externo para ejecutar ese mandato. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
503
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
504
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
505 1. Escriba el conocido mandato : para situar el cursor al final de la
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
506 pantalla. Esto le permitirá introducir un mandato.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
507
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
508 2. Ahora escriba el carácter ! (signo de admiración). Esto le permitirá
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
509 ejecutar cualquier mandato del sistema.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
510
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
511 3. Como ejemplo escriba ls después del ! y luego pulse <INTRO>. Esto
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
512 le mostrará una lista de su directorio, igual que si estuviera en el
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
513 símbolo del sistema. Si ls no funciona utilice !:dir .
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
514
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
515 --->Nota: De esta manera es posible ejecutar cualquier mandato externo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
516
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
517 --->Nota: Todos los mandatos : deben finalizarse pulsando <INTRO>.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
518
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
519
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
520 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
521 Lección 5.2: MÁS SOBRE GUARDAR FICHEROS
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
522
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
523
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
524 ** Para guardar los cambios hechos en un fichero,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
525 escriba :w NOMBRE_DE_FICHERO. **
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 1. Escriba :!dir o :!ls para ver una lista de su directorio.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
529 Ya sabe que debe pulsar <INTRO> después de ello.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
530
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
531 2. Elija un nombre de fichero que todavía no exista, como TEST.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
532
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
533 3. Ahora escriba :w TEST (donde TEST es el nombre de fichero elegido).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
534
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
535 4. Esta acción guarda todo el fichero (Vim Tutor) bajo el nombre TEST.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
536 Para comprobarlo escriba :!dir de nuevo y vea su directorio.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
537
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
538 ---> Tenga en cuenta que si sale de Vim y entra de nuevo con el nombre de
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
539 fichero TEST, el fichero sería una copia exacta del tutor cuando lo
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
540 ha guardado.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
541
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
542 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
543 Lección 5.3: UN MANDATO DE ESCRITURA SELECTIVO
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
544
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
545 ** Para guardar parte del fuchero escriba :#,# NOMBRE_DEL_FICHERO **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
546
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
547
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
548 1. Escriba de nuevo, una vez más, :!dir o :!ls para obtener una lista
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
549 de su directorio y elija nombre de fichero adecuado, como TEST.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
550
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
551 2. Mueva el cursor al principio de la pantalla y pulse Ctrl-g para saber
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
552 el número de la línea correspondiente. ¡RECUERDE ESTE NÚMERO!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
553
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
554 3. Ahora mueva el cursor a la última línea de la pantalla y pulse Ctrl-g
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
555 de nuevo. ¡RECUERDE TAMBIÉN ESTE NÚMERO!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
556
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
557 4. Para guardar SOLAMENTE una parte de un fichero, escriba :#,# w TEST
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
558 donde #,# son los números que usted ha recordado (primera línea,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
559 última línea) y TEST es su nombre de dichero.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
560
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
561 5. De nuevo, vea que el fichero esta ahí con :!dir pero NO lo borre.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
562
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
563
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
564 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
565 Lección 5.4: RECUPERANDO Y MEZCLANDO FICHEROS
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
566
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
567 ** Para insertar el contenido de un fichero escriba :r NOMBRE_DEL_FICHERO **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
568
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
569 1. Escriba :!dir para asegurarse de que su fichero TEST del ejercicio
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
570 anterior está presente.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
571
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
572 2. Situe el cursor al principio de esta pantalla.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
573
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
574 NOTA: Después de ejecutar el paso 3 se verá la Lección 5.3. Luego muévase
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
575 hacia ABAJO para ver esta lección de nuevo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
576
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
577 3. Ahora recupere el fichero TEST utilizando el mandato :r TEST donde
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
578 TEST es el nombre del fichero.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
579
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
580 NOTA: El fichero recuperado se sitúa a partir de la posición del cursor.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
581
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
582 4. Para verificar que el fichero ha sido recuperado, mueva el cursor hacia
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
583 arriba y vea que hay dos copias de la Lección 5.3, la original y la
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
584 versión del fichero.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
585
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
586 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
587 RESUMEN DE LA LECCIÓN 5
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
588
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
589
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
590 1. :!mandato ejecuta un mandato externo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
591
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
592 Algunos ejemplos útiles son:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
593 :!dir - muestra el contenido de un directorio.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
594 :!del NOMBRE_DE_FICHERO - borra el fichero NOMBRE_DE FICHERO.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
595
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
596 2. :#,#w NOMBRE_DE _FICHERO guarda desde las líneas # hasta la # en el
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
597 fichero NOMBRE_DE_FICHERO.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
598
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
599 3. :r NOMBRE_DE _FICHERO recupera el fichero del disco NOMBRE_DE FICHERO
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
600 y lo inserta en el fichero en curso a partir de la posición del cursor.
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
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
604
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
605
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
606
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
607
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
608 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
609 Lección 6.1: EL MANDATO «OPEN» (abrir)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
610
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
611
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
612 ** Pulse o para abrir una línea debajo del cursor
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
613 y situarle en modo Insert **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
614
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
615
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
616 1. Mueva el cursor a la línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
617
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
618 2. Pulse o (minúscula) para abrir una línea por DEBAJO del cursor
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
619 y situarle en modo Insert.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
620
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
621 3. Ahora copie la línea señalada con ---> y pulse <ESC> para salir del
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
622 modo Insert.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
623
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
624 ---> Luego de pulsar o el cursor se sitúa en la línea abierta en modo Insert.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
625
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
626 4. Para abrir una línea por encima del cursor, simplemente pulse una O
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
627 mayúscula, en lugar de una o minúscula. Pruebe este en la línea siguiente.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
628 Abra una línea sobre ésta pulsando Mayu-O cuando el curso está en esta línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
629
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
630 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
631 Lección 6.2: EL MANDATO «APPEND» (añadir)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
632
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
633 ** Pulse a para insertar texto DESPUÉS del cursor. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
634
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
635
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
636 1. Mueva el cursor al final de la primera línea de abajo señalada con --->
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
637 pulsando $ en modo Normal.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
638
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
639 2. Escriba una a (minúscula) para añadir texto DESPUÉS del carácter
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
640 que está sobre el cursor. (A mayúscula añade texto al final de la línea).
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
641
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
642 Nota: ¡Esto evita el pulsar i , el último carácter, el texto a insertar,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
643 <ESC>, cursor a la derecha y, finalmente, x , sólo para añadir algo
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
644 al final de una línea!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
645
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
646 3. Complete ahora la primera línea. Nótese que append es exactamente lo
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
647 mismo que modo Insert, excepto por el lugar donde se inserta el texto.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
648
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
649 ---> Esta línea le permitirá praticar
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
650 ---> Esta línea le permitirá praticar el añadido de texto al final de una línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
651
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
652 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
653 Lección 6.3: OTRA VERSIÓN DE «REPLACE» (remplazar)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
654
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
655 ** Pulse una R mayúscula para sustituir más de un carácter. **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
656
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
657
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
658 1. Mueva el cursor a la primera línea de abajo señalada con --->.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
659
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
660 2. Sitúe el cursor al comienzo de la primera palabra que sea diferente
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
661 de las de la segunda línea marcada con ---> (la palabra 'anterior').
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
662
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
663 3. Ahora pulse R y sustituya el resto del texto de la primera línea
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
664 escribiendo sobre el viejo texto para que la primera línea sea igual
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
665 que la primera.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
666
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
667 ---> Para hacer que esta línea sea igual que la anterior use las teclas.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
668 ---> Para hacer que esta línea sea igual que la siguiente escriba R y el texto.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
669
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
670 4. Nótese que cuando pulse <ESC> para salir, el texto no alterado permanece.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
671
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
672
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
673
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
674 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
675 Lección 6.4: FIJAR OPCIONES
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
676
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
677 ** Fijar una opción de forma que una búsqueda o sustitución ignore la caja **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
678 (Para el concepto de caja de una letra, véase la nota al final del fichero)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
679
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
680
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
681 1. Busque 'ignorar' introduciendo:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
682 /ignorar
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
683 Repita varias veces la búsque pulsando la tecla n
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
684
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
685 2. Fije la opción 'ic' (Ignorar la caja de la letra) escribiendo:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
686 :set ic
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
687
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
688 3. Ahora busque 'ignorar' de nuevo pulsando n
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
689 Repita la búsqueda varias veces más pulsando la tecla n
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
690
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
691 4. Fije las opciones 'hlsearch' y 'insearch':
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
692 :set hls is
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
693
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
694 5. Ahora introduzca la orden de búsqueda otra vez, y vea qué pasa:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
695 /ignore
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
696
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
697 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
698 RESUMEN DE LA LECCIÓN 6
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
699
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
700
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
701 1. Pulsando o abre una línea por DEBAJO del cursor y sitúa el cursor en
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
702 la línea abierta en modo Insert.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
703 Pulsando una O mayúscula se abre una línea SOBRE la que está el cursor.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
704
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
705 2. Pulse una a para insertar texto DESPUÉS del carácter sobre el cursor.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
706 Pulsando una A mayúscula añade automáticamente texto al final de la
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
707 línea.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
708
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
709 3. Pulsando una R mayúscula se entra en modo Replace hasta que, para salir,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
710 se pulse <ESC>.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
711
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
712 4. Escribiendo «:set xxx» fija la opción «xxx»
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
713
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
714
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
715
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
716
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
717
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
718
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
719
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
720 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
721 Lección 7: MANDATOS PARA LA AYUDA EN LÍNEA
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
722
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
723 ** Utilice el sistema de ayuda en línea **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
724
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
725
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
726 Vim dispone de un sistema de ayuda en línea. Para activarlo, pruebe una
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
727 de estas tres formas:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
728 - pulse la tecla <AYUDA> (si dispone de ella)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
729 - pulse la tecla <F1> (si dispone de ella)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
730 - escriba :help <INTRO>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
731
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
732 Escriba :q <INTRO> para cerrar la ventana de ayuda.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
733
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
734 Puede encontrar ayuda en casi cualquier tema añadiendo un argumento al
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
735 mandato «:help» mandato. Pruebe éstos:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
736
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
737 :help w <INTRO>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
738 :help c_<T <INTRO>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
739 :help insert-index <INTRO>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
740
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
741
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
742 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
743
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
744 Aquí concluye el tutor de Vim. Está pensado para dar una visión breve del
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
745 editor Vim, lo suficiente para permitirle usar el editor de forma bastante
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
746 sencilla. Está muy lejos de estar completo pues Vim tiene muchísimos más
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
747 mandatos.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
748
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
749 Para lecturas y estudios posteriores se recomienda el libro:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
750 Learning the Vi Editor - por Linda Lamb
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
751 Editorial: O'Reilly & Associates Inc.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
752 Es un buen libro para llegar a saber casi todo lo que desee hacer con Vi.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
753 La sexta edición incluye también información sobre Vim.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
754
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
755 Este tutorial ha sido escrito por Michael C. Pierce y Robert K. Ware,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
756 Colorado School of Mines utilizando ideas suministradas por Charles Smith,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
757 Colorado State University.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
758 E-mail: bware@mines.colorado.edu.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
759
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
760 Modificado para Vim por Bram Moolenaar.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
761
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
762 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
763
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
764 Traducido del inglés por:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
765
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
766 Eduardo F. Amatria
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
767 Correo electrónico: eferna1@platea.pntic.mec.es
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
768
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
769 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~