annotate runtime/tutor/tutor.sv.utf-8 @ 10601:1b09db809d3f v8.0.0190

patch 8.0.0190: finding duplicate tags uses a slow linear search commit https://github.com/vim/vim/commit/810f9c361c83afb36b9f1cdadca2b93f1201d039 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 15 16:52:51 2017 +0100 patch 8.0.0190: finding duplicate tags uses a slow linear search Problem: Detecting duplicate tags uses a slow linear search. Solution: Use a much faster hash table solution. (James McCoy, closes https://github.com/vim/vim/issues/1046) But don't add hi_keylen, it makes hash tables 50% bigger.
author Christian Brabandt <cb@256bit.org>
date Sun, 15 Jan 2017 17:00:04 +0100
parents b9740fb41986
children e69e7133c9cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1619
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
1 ===============================================================================
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
2 = V ä l k o m m e n t i l l h a n d l e d n i n g e n i V i m - Ver. 1.5 =
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
3 ===============================================================================
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
4
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
5 Vim är en väldigt kraftfull redigerare som har många kommandon, alltför
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
6 många att förklara i en handledning som denna. Den här handledningen är
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
7 gjord för att förklara tillräckligt många kommandon så att du enkelt ska
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
8 kunna använda Vim som en redigerare för alla ändamål.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
9
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
10 Den beräknade tiden för att slutföra denna handledning är 25-30 minuter,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
11 beroende på hur mycket tid som läggs ned på experimentering.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
12
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
13 Kommandona i lektionerna kommer att modifiera texten. Gör en kopia av den
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
14 här filen att öva på (om du startade "vimtutor är det här redan en kopia).
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
15
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
16 Det är viktigt att komma ihåg att den här handledningen är konstruerad
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
17 att lära vid användning. Det betyder att du måste köra kommandona för att
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
18 lära dig dem ordentligt. Om du bara läser texten så kommer du att glömma
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
19 kommandona!
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
20
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
21 Försäkra dig nu om att din Caps-Lock tangent INTE är aktiv och tryck på
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
22 j-tangenten tillräckligt många gånger för att förflytta markören så att
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
23 Lektion 1.1 fyller skärmen helt.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
25 Lektion 1.1: FLYTTA MARKÖREN
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
26
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
27
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
28 ** För att flytta markören, tryck på tangenterna h,j,k,l som indikerat. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
29 ^
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
30 k Tips:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
31 < h l > h-tangenten är till vänster och flyttar till vänster.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
32 j l-tangenten är till höger och flyttar till höger.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
33 v j-tangenten ser ut som en pil ned.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
34 1. Flytta runt markören på skärmen tills du känner dig bekväm.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
35
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
36 2. Håll ned tangenten pil ned (j) tills att den repeterar.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
37 ---> Nu vet du hur du tar dig till nästa lektion.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
38
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
39 3. Flytta till Lektion 1.2, med hjälp av ned tangenten.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
40
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
41 Notera: Om du är osäker på någonting du skrev, tryck <ESC> för att placera dig
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
42 dig i Normal-läge. Skriv sedan om kommandot.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
43
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
44 Notera: Piltangenterna borde också fungera. Men om du använder hjkl så kommer
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
45 du att kunna flytta omkring mycket snabbare, när du väl vant dig vid
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
46 det.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
47
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
48 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
49 Lektion 1.2: STARTA OCH AVSLUTA VIM
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
50
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
51
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
52 !! NOTERA: Innan du utför någon av punkterna nedan, läs hela lektionen!!
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
53
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
54 1. Tryck <ESC>-tangenten (för att se till att du är i Normal-läge).
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
55
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
56 2. Skriv: :q! <ENTER>.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
57
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
58 ---> Detta avslutar redigeraren UTAN att spara några ändringar du gjort.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
59 Om du vill spara ändringarna och avsluta skriv:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
60 :wq <ENTER>
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
61
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
62 3. När du ser skal-prompten, skriv kommandot som tog dig in i den här
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
63 handledningen. Det kan vara: vimtutor <ENTER>
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
64 Normalt vill du använda: vim tutor <ENTER>
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
65
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
66 ---> 'vim' betyder öppna redigeraren vim, 'tutor' är filen du vill redigera.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
67
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
68 4. Om du har memorerat dessa steg och känner dig självsäker, kör då stegen
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
69 1 till 3 för att avsluta och starta om redigeraren. Flytta sedan ned
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
70 markören till Lektion 1.3.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
71 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
72 Lektion 1.3: TEXT REDIGERING - BORTTAGNING
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
73
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
74
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
75 ** När du är i Normal-läge tryck x för att ta bort tecknet under markören. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
76
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
77 1. Flytta markören till raden nedan med markeringen --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
78
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
79 2. För att rätta felen, flytta markören tills den står på tecknet som ska
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
80 tas bort. fix the errors, move the cursor until it is on top of the
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
81
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
82 3. Tryck på x-tangenten för att ta bort det felaktiga tecknet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
83
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
84 4. Upprepa steg 2 till 4 tills meningen är korrekt.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
85
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
86 ---> Kkon hoppadee övverr måånen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
87
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
88 5. Nu när raden är korrekt, gå till Lektion 1.4.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
89
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
90 NOTERA: När du går igenom den här handledningen, försök inte att memorera, lär
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
91 genom användning.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
92
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
93
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
94
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
95 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
96 Lektion 1.4: TEXT REDIGERING - INFOGNING
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
97
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
98
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
99 ** När du är i Normal-läge tryck i för att infoga text. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
100
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
101 1. Flytta markören till den första raden nedan med markeringen --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
102
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
103 2. För att göra den första raden likadan som den andra, flytta markören till
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
104 det första tecknet EFTER där text ska infogas.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
105
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
106 3. Tryck i och skriv in det som saknas.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
107
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
108 4. När du rättat ett fel tryck <ESC> för att återgå till Normal-läge.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
109 Upprepa steg 2 till 4 för att rätta meningen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
110
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
111 ---> Det sakns här .
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
112 ---> Det saknas lite text från den här raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
113
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
114 5. När du känner dig bekväm med att infoga text, gå till sammanfattningen
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
115 nedan.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
116
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
117
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
118
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
119 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
120 LEKTION 1 SAMMANFATTNING
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
121
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
122
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
123 1. Markören flyttas genom att använda piltangenterna eller hjkl-tangenterna.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
124 h (vänster) j (ned) k (upp) l (höger)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
125
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
126 2. För att starta Vim (från %-prompten) skriv: vim FILNAMN <ENTER>
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
127
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
128 3. För att avsluta Vim skriv: <ESC> :q! <ENTER> för att kasta ändringar.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
129 ELLER skriv: <ESC> :wq <ENTER> för att spara ändringar.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
130
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
131 4. För att ta bort tecknet under markören i Normal-läge skriv: x
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
132
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
133 5. För att infoga text vid markören i Normal-läge skriv:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
134 i skriv in text <ESC>
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
135
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
136 NOTERA: Genom att trycka <ESC> kommer du att placeras i Normal-läge eller
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
137 avbryta ett delvis färdigskrivet kommando.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
138
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
139 Fortsätt nu med Lektion 2.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
140
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
141
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
142 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
143 Lektion 2.1: BORTTAGNINGSKOMMANDON
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
144
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
145
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
146 ** Skriv dw för att radera till slutet av ett ord. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
147
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
148 1. Tryck <ESC> för att försäkra dig om att du är i Normal-läge.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
149
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
150 2. Flytta markören till raden nedan markerad --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
151
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
152 3. Flytta markören till början av ett ord som måste raderas.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
153
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
154 4. Skriv dw för att radera ordet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
155
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
156 NOTERA: Bokstäverna dw kommer att synas på den sista raden på skärmen när
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
157 du skriver dem. Om du skrev något fel, tryck <ESC> och börja om.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
158
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
159 ---> Det är ett några ord roliga att som inte hör hemma i den här meningen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
160
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
161 5. Upprepa stegen 3 och 4 tills meningen är korrekt och gå till Lektion 2.2.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
162
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
163
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
164
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
165 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
166 Lektion 2.2: FLER BORTTAGNINGSKOMMANDON
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
167
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
168
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
169 ** Skriv d$ för att radera till slutet på raden. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
170
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
171 1. Tryck <ESC> för att försäkra dig om att du är i Normal-läge.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
172
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
173 2. Flytta markören till raden nedan markerad --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
174
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
175 3. Flytta markören till slutet på den rätta raden (EFTER den första . ).
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
176
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
177 4. Skriv d$ för att radera till slutet på raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
178
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
179 ---> Någon skrev slutet på den här raden två gånger. den här raden två gånger.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
180
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
181
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
182 5. Gå vidare till Lektion 2.3 för att förstå vad det är som händer.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
183
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
184
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
185
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
186
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
187
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
188 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
189 Lesson 2.3: KOMMANDON OCH OBJEKT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
190
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
191
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
192 Syntaxen för d raderingskommandot är följande:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
193
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
194 [nummer] d objekt ELLER d [nummer] objekt
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
195 Var:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
196 nummer - är antalet upprepningar av kommandot (valfritt, standard=1).
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
197 d - är kommandot för att radera.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
198 objekt - är vad kommandot kommer att operera på (listade nedan).
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
199
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
200 En kort lista över objekt:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
201 w - från markören till slutet av ordet, inklusive blanksteget.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
202 e - från markören till slutet av ordet, EJ inklusive blanksteget.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
203 $ - från markören till slutet på raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
204
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
205 NOTERA: För den äventyrslystne, genom att bara trycka på objektet i
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
206 Normal-läge (utan kommando) så kommer markören att flyttas som
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
207 angivet i objektlistan.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
208
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
209
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
210
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
211
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
212 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
213 Lektion 2.4: ETT UNDANTAG TILL 'KOMMANDO-OBJEKT'
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
214
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
215
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
216 ** Skriv dd för att radera hela raden. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
217
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
218 På grund av hur vanligt det är att ta bort hela rader, valde upphovsmannen
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
219 till Vi att det skulle vara enklare att bara trycka d två gånger i rad för
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
220 att ta bort en rad.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
221
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
222 1. Flytta markören till den andra raden i frasen nedan.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
223 2. Skriv dd för att radera raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
224 3. Flytta nu till den fjärde raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
225 4. Skriv 2dd (kom ihåg: nummer-kommando-objekt) för att radera de två
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
226 raderna.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
227
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
228 1) Roses are red,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
229 2) Mud is fun,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
230 3) Violets are blue,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
231 4) I have a car,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
232 5) Clocks tell time,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
233 6) Sugar is sweet
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
234 7) And so are you.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
235
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
236
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
237 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
238 Lektion 2.5: ÅNGRA-KOMMANDOT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
239
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
240
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
241 ** Skriv u för att ångra det senaste kommandona, U för att fixa en hel rad. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
242
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
243 1. Flytta markören till slutet av raden nedan markerad ---> och placera den
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
244 på det första felet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
245 2. Skriv x för att radera den första felaktiga tecknet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
246 3. Skriv nu u för att ångra det senaste körda kommandot.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
247 4. Rätta den här gången alla felen på raden med x-kommandot.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
248 5. Skriv nu U för att återställa raden till dess ursprungliga utseende.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
249 6. Skriv nu u några gånger för att ångra U och tidigare kommandon.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
250 7. Tryck nu CTRL-R (håll inne CTRL samtidigt som du trycker R) några gånger
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
251 för att upprepa kommandona (ångra ångringarna).
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
252
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
253 ---> Fiixa felen ppå deen häär meningen och återskapa dem med ångra.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
254
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
255 8. Det här är väldigt användbara kommandon. Gå nu vidare till
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
256 Lektion 2 Sammanfattning.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
257
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
258
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
259
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
260
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
261 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
262 LEKTION 2 SAMMANFATTNING
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
263
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
264
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
265 1. För att radera från markören till slutet av ett ord skriv: dw
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
266
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
267 2. För att radera från markören till slutet av en rad skriv: d$
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
268
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
269 3. För att radera en hel rad skriv: dd
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
270
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
271 4. Syntaxen för ett kommando i Normal-läge är:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
272
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
273 [nummer] kommando objekt ELLER kommando [nummer] objekt
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
274 där:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
275 nummer - är hur många gånger kommandot kommandot ska repeteras
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
276 kommando - är vad som ska göras, t.ex. d för att radera
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
277 objekt - är vad kommandot ska operera på, som t.ex. w (ord),
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
278 $ (till slutet av raden), etc.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
279
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
280 5. För att ångra tidigare kommandon, skriv: u (litet u)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
281 För att ångra alla tidigare ändringar på en rad skriv: U (stort U)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
282 För att ångra ångringar tryck: CTRL-R
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
283
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
284 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
285 Lektion 3.1: KLISTRA IN-KOMMANDOT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
286
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
287
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
288 ** Skriv p för att klistra in den senaste raderingen efter markören. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
289
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
290 1. Flytta markören till den första raden i listan nedan.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
291
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
292 2. Skriv dd för att radera raden och lagra den i Vims buffert.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
293
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
294 3. Flytta markören till raden OVANFÖR där den raderade raden borde vara.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
295
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
296 4. När du är i Normal-läge, skriv p för att byta ut raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
297
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
298 5. Repetera stegen 2 till 4 för att klistra in alla rader i rätt ordning.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
299
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
300 d) Kan du lära dig också?
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
301 b) Violetter är blå,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
302 c) Intelligens fås genom lärdom,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
303 a) Rosor är röda,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
304
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
305
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
306
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
307 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
308 Lesson 3.2: ERSÄTT-KOMMANDOT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
309
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
310
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
311 ** Skriv r och ett tecken för att ersätta tecknet under markören. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
312
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
313 1. Flytta markören till den första raden nedan markerad --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
314
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
315 2. Flytta markören så att den står på det första felet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
316
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
317 3. Skriv r och sedan det tecken som borde ersätta felet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
318
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
319 4. Repetera steg 2 och 3 tills den första raden är korrekt.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
320
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
321 ---> När drn här ruden skrevs, trickte någon på fil knappar!
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
322 ---> När den här raden skrevs, tryckte någon på fel knappar!
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
323
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
324 5. Gå nu vidare till Lektion 3.2.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
325
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
326 NOTERA: Kom ihåg att du skall lära dig genom användning, inte genom memorering.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
327
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
328
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
329
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
330 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
331 Lektion 3.3: ÄNDRA-KOMMANDOT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
332
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
333
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
334 ** För att ändra en del eller ett helt ord, skriv cw . **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
335
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
336 1. Flytta markören till den första redan nedan markerad --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
337
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
338 2. Placera markören på d i rdrtn.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
339
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
340 3. Skriv cw och det rätta ordet (i det här fallet, skriv "aden".)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
341
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
342 4. Tryck <ESC> och flytta markören till nästa fel (det första tecknet som
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
343 ska ändras.)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
344
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
345 5. Repetera steg 3 och 4 tills den första raden är likadan som den andra.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
346
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
347 ---> Den här rdrtn har några otf som brhotrt ändras mrf ändra-komjendit.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
348 ---> Den här raden har några ord som behöver ändras med ändra-kommandot.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
349
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
350 Notera att cw inte bara ändrar ordet, utan även placerar dig i infogningsläge.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
351
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
352
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
353
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
354 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
355 Lektion 3.4: FLER ÄNDRINGAR MED c
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
356
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
357
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
358 ** Ändra-kommandot används på samma objekt som radera. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
359
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
360 1. Ändra-kommandot fungerar på samma sätt som radera. Syntaxen är:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
361
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
362 [nummer] c objekt ELLER c [nummer] objekt
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
363
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
364 2. Objekten är också de samma, som t.ex. w (ord), $ (slutet av raden), etc.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
365
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
366 3. Flytta till den första raden nedan markerad -->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
367
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
368 4. Flytta markören till det första felet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
369
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
370 5. Skriv c$ för att göra resten av raden likadan som den andra och tryck
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
371 <ESC>.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
372
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
373 ---> Slutet på den här raden behöver hjälp med att få den att likna den andra.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
374 ---> Slutet på den här raden behöver rättas till med c$-kommandot.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
375
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
376
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
377
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
378 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
379 LEKTION 3 SAMMANFATTNING
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
380
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
381
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
382 1. För att ersätta text som redan har blivit raderad, skriv p .
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
383 Detta klistrar in den raderade texten EFTER markören (om en rad raderades
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
384 kommer den att hamna på raden under markören.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
385
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
386 2. För att ersätta tecknet under markören, skriv r och sedan tecknet som
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
387 kommer att ersätta orginalet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
388
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
389 3. Ändra-kommandot låter dig ändra det angivna objektet från markören till
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
390 slutet på objektet. eg. Skriv cw för att ändra från markören till slutet
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
391 på ordet, c$ för att ändra till slutet på en rad.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
392
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
393 4. Syntaxen för ändra-kommandot är:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
394
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
395 [nummer] c objekt ELLER c [nummer] objekt
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
396
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
397 Gå nu till nästa lektion.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
398
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
399
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
400
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
401 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
402 Lektion 4.1: POSITION OCH FILSTATUS
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
403
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
404
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
405 ** Tryck CTRL-g för att visa din position i filen och filstatusen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
406 Tryck SHIFT-G för att flytta till en rad i filen. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
407
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
408 Notera: Läsa hela den lektion innan du utför något av stegen!!
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
409
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
410 1. Håll ned Ctrl-tangenten och tryck g . En statusrad med filnamn och raden
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
411 du befinner dig på kommer att synas. Kom ihåg radnummret till Steg 3.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
412
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
413 2. Tryck shift-G för att flytta markören till slutet på filen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
414
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
415 3. Skriv in nummret på raden du var på och tryck sedan shift-G. Detta kommer
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
416 att ta dig tillbaka till raden du var på när du först tryckte Ctrl-g.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
417 (När du skriver in nummren, kommer de INTE att visas på skärmen.)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
418
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
419 4. Om du känner dig säker på det här, utför steg 1 till 3.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
420
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
421
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
422
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
423 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
424 Lektion 4.2: SÖK-KOMMANDOT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
425
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
426
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
427 ** Skriv / följt av en fras för att söka efter frasen. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
428
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
429 1. I Normal-läge skriv /-tecknet. Notera att det och markören blir synlig
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
430 längst ned på skärmen precis som med :-kommandot.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
431
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
432 2. Skriv nu "feeel" <ENTER>. Det här är ordet du vill söka efter.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
433
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
434 3. För att söka efter samma fras igen, tryck helt enkelt n .
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
435 För att söka efter samma fras igen i motsatt riktning, tryck Shift-N .
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
436
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
437 4. Om du vill söka efter en fras bakåt i filen, använd kommandot ? istället
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
438 för /.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
439
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
440 ---> "feeel" är inte rätt sätt att stava fel: feeel är ett fel.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
441
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
442 Notera: När sökningen når slutet på filen kommer den att fortsätta vid början.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
443
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
444
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
445 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
446 Lektion 4.3: SÖKNING EFTER MATCHANDE PARENTESER
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
447
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
448
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
449 ** Skriv % för att hitta en matchande ),], or } . **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
450
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
451 1. Placera markören på någon av (, [, or { på raden nedan markerad --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
452
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
453 2. Skriv nu %-tecknet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
454
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
455 3. Markören borde vara på den matchande parentesen eller hakparentesen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
456
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
457 4. Skriv % för att flytta markören tillbaka till den första hakparentesen
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
458 (med matchning).
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
459
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
460 ---> Det ( här är en testrad med (, [ ] och { } i den. ))
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
461
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
462 Notera: Det här är väldigt användbart vid avlusning av ett program med icke
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
463 matchande parenteser!
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
464
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
465
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
466
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
467
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
468
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
469
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
470 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
471 Lektion 4.4: ETT SÄTT ATT ÄNDRA FEL
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
472
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
473
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
474 ** Skriv :s/gammalt/nytt/g för att ersätta "gammalt" med "nytt". **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
475
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
476 1. Flytta markören till raden nedan markerad --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
477
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
478 2. Skriv :s/denn/den <ENTER> . Notera att det här kommandot bara ändrar den
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
479 första förekomsten på raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
480
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
481 3. Skriv nu :s/denn/den/g vilket betyder ersätt globalt på raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
482 Det ändrar alla förekomster på raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
483
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
484 ---> denn bästa tiden att se blommor blomma är denn på våren.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
485
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
486 4. För att ändra alla förekomster av en teckensträng mellan två rader,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
487 skriv :#,#s/gammalt/nytt/g där #,# är de två radernas radnummer.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
488 Skriv :%s/gammtl/nytt/g för att ändra varje förekomst i hela filen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
489
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
490
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
491
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
492
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
493 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
494 LEKTION 4 SAMMANFATTNING
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
495
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
496
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
497 1. Ctrl-g visar din position i filen och filstatusen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
498 Shift-G flyttar till slutet av filen. Ett radnummer följt Shift-G
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
499 flyttar till det radnummret.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
500
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
501 2. Skriver man / följt av en fras söks det FRAMMÅT efter frasen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
502 Skriver man ? följt av en fras söks det BAKÅT efter frasen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
503 Efter en sökning skriv n för att hitta nästa förekomst i samma riktning
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
504 eller Shift-N för att söka i den motsatta riktningen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
505
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
506 3. Skriver man % när markören är på ett (,),[,],{, eller } hittas dess
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
507 matchande par.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
508
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
509 4. För att ersätta den första gammalt med nytt på en rad skriv :s/gammlt/nytt
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
510 För att ersätta alla gammlt med nytt på en rad skriv :s/gammlt/nytt/g
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
511 För att ersätta fraser mellan rad # och rad # skriv :#,#s/gammlt/nytt/g
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
512 För att ersätta alla förekomster i filen skriv :%s/gammlt/nytt/g
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
513 För att bekräfta varje gång lägg till "c" :%s/gammlt/nytt/gc
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
514
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
515
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
516 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
517 Lektion 5.1: HUR MAN KÖR ETT EXTERNT KOMMANDO
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
518
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
519
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
520 ** Skriv :! följt av ett externt kommando för att köra det kommandot. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
521
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
522 1. Skriv det välbekanta kommandot : för att placera markören längst ned
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
523 på skärmen på skärmen. Detta låter dig skriva in ett kommando.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
524
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
525 2. Skriv nu ! (utropstecken). Detta låter dig köra ett godtyckligt externt
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
526 skalkommando.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
527
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
528 3. Som ett exempel skriv ls efter ! och tryck sedan <ENTER>. Detta kommer
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
529 att visa dig en listning av din katalog, precis som om du kört det vid
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
530 skalprompten. Använd :!dir om ls inte fungerar.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
531
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
532 Notera: Det är möjligt att köra vilket externt kommando som helst på det här
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
533 sättet.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
534
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
535 Notera: Alla :-kommandon måste avslutas med att trycka på <ENTER>
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
536
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
537
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
538
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
539
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
540 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
541 Lektion 5.2: MER OM ATT SPARA FILER
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
542
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
543
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
544 ** För att spara ändringar gjorda i en fil, skriv :w FILNAMN. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
545
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
546 1. Skriv :!dir eller :!ls för att få en listning av din katalog.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
547 Du vet redan att du måste trycka <ENTER> efter det här.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
548
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
549 2. Välj ett filnamn som inte redan existerar, som t.ex. TEST.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
550
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
551 3. Skriv nu: :w TEST (där TEST är filnamnet du valt.)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
552
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
553 4. Det här sparar hela filen (Vim handledningen) under namnet TEST.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
554 För att verifiera detta, skriv :!dir igen för att se din katalog
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
555
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
556 Notera: Om du skulle avsluta Vim och sedan öppna igen med filnamnet TEST så
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
557 skulle filen vara en exakt kopia av handledningen när du sparade den.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
558
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
559 5. Ta nu bort filen genom att skriva (MS-DOS): :!del TEST
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
560 eller (Unix): :!rm TEST
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
561
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
562
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
563 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
564 Lektion 5.3: ETT SELEKTIVT SPARA-KOMMANDO
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
565
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
566
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
567 ** För att spara en del av en fil, skriv :#,# w FILNAMN **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
568
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
569 1. Ännu en gång, skriv :!dir eller :!ls för att få en listning av din
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
570 katalog och välj ett passande filnamn som t.ex. TEST.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
571
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
572 2. Flytta markören högst upp på den här sidan och tryck Ctrl-g för att få
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
573 reda på radnumret på den raden. KOM IHÅG DET NUMMRET!
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
574
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
575 3. Flytta nu längst ned på sidan och skriv Ctrl-g igen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
576 KOM IHÅG DET RADNUMMRET OCKSÅ!
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
577
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
578 4. För att BARA spara en sektion till en fil, skriv :#,# w TEST
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
579 där #,# är de två nummren du kom ihåg (toppen, botten) och TEST är
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
580 ditt filnamn.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
581
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
582 5. Ännu en gång, kolla så att filen är där med :!dir men radera den INTE.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
583
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
584
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
585
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
586
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
587 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
588 Lektion 5.4: TA EMOT OCH FÖRENA FILER
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
589
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
590
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
591 ** För att infoga innehållet av en fil, skriv :r FILNAMN **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
592
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
593 1. Skriv :!dir för att försäkra dig om att TEST-filen från tidigare
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
594 fortfarande är kvar.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
595
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
596 2. Placera markören högst upp på den här sidan.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
597
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
598 NOTERA: Efter att du kört Steg 3 kommer du att se Lektion 5.3.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
599 Flytta då NED till den här lektionen igen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
600
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
601 3. Ta nu emot din TEST-fil med kommandot :r TEST där TEST är namnet på
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
602 filen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
603
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
604 NOTERA: Filen du tar emot placeras där markören är placerad.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
605
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
606 4. För att verifiera att filen togs emot, gå tillbaka och notera att det nu
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
607 finns två kopior av Lektion 5.3, orginalet och filversionen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
608
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
609
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
610
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
611 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
612 LEKTION 5 SAMMANFATTNING
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
613
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
614
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
615 1. :!kommando kör ett externt kommando.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
616
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
617 Några användbara exempel är:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
618 (MS-DOS) (Unix)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
619 :!dir :!ls - visar en kataloglistning.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
620 :!del FILNAMN :!rm FILNAMN - tar bort filen FILNAMN.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
621
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
622 2. :w FILNAMN sparar den aktuella Vim-filen med namnet FILNAMN.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
623
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
624 3. :#,#w FILNAMN sparar raderna # till # i filen FILNAMN.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
625
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
626 4. :r FILNAMN tar emot filen FILNAMN och infogar den i den aktuella filen
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
627 efter markören.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
628
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
629
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
630
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
631
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
632
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
633
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
634 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
635 Lektion 6.1: ÖPPNA-KOMMANDOT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
636
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
637
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
638 ** Skriv o för att öppna en rad under markören och placera dig i
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
639 Infoga-läge. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
640
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
641 1. Flytta markören till raden nedan markerad --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
642
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
643 2. Skriv o (litet o) för att öppna upp en rad NEDANFÖR markören och placera
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
644 dig i Infoga-mode.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
645
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
646 3. Kopiera nu raden markerad ---> och tryck <ESC> för att avsluta
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
647 Infoga-läget.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
648
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
649 ---> Efter du skrivit o placerad markören på en öppen rad i Infoga-läge.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
650
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
651 4. För att öppna upp en rad OVANFÖR markören, skriv ett stort O , istället
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
652 för ett litet o. Pröva detta på raden nedan.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
653 Öppna upp en rad ovanför denna genom att trycka Shift-O när markören står här.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
654
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
655
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
656
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
657
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
658
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
659 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
660 Lektion 6.2: LÄGG TILL-KOMMANDOT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
661
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
662
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
663 ** Skriv a för att infoga text EFTER markören. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
664
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
665 1. Flytta markören till slutet av den första raden nedan markerad ---> genom
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
666 att skriv $ i Normal-läge.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
667
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
668 2. Skriv ett a (litet a) för att lägga till text EFTER tecknet under
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
669 markören. (Stort A lägger till i slutet av raden.)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
670
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
671 Notera: Detta undviker att behöva skriva i , det sista tecknet, texten att
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
672 infoga, <ESC>, högerpil, och slutligen, x, bara för att lägga till i
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
673 slutet på en rad!
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
674
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
675 3. Gör nu färdigt den första raden. Notera också att lägga till är likadant
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
676 som Infoga-läge, enda skillnaden är positionen där texten blir infogad.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
677
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
678 ---> Här kan du träna
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
679 ---> Här kan du träna på att lägga till text i slutet på en rad.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
680
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
681
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
682
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
683 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
684 Lektion 6.3: EN ANNAN VERSION AV ERSÄTT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
685
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
686
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
687 ** Skriv ett stort R för att ersätta fler än ett tecken. **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
688
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
689 1. Flytta markören till den första raden nedan markerad --->.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
690
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
691 2. Placera markören vid början av det första ordet som är annorlunda jämfört
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
692 med den andra raden markerad ---> (ordet "sista").
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
693
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
694 3. Skriv nu R och ersätt resten av texten på den första raden genom att
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
695 skriva över den gamla texten så att den första raden blir likadan som
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
696 den andra.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
697
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
698 ---> För att få den första raden lika som den sista, använd tangenterna.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
699 ---> För att få den första raden lika som den andra, skriv R och den nya texten.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
700
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
701 4. Notera att när du trycker <ESC> för att avsluta, så blir eventuell
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
702 oförändrad text kvar.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
703
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
704
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
705
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
706
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
707
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
708 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
709 Lektion 6.4: SÄTT FLAGGOR
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
710
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
711 ** Sätt en flagga så att en sökning eller ersättning ignorerar storlek **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
712
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
713 1. Sök efter "ignore" genom att skriva:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
714 /ignore
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
715 Repetera flera gånger genom att trycka på n-tangenten
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
716
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
717 2. Sätt 'ic' (Ignore Case) flaggan genom att skriva:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
718 :set ic
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
719
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
720 3. Sök nu efter "ignore" igen genom att trycka: n
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
721 Repeat search several more times by hitting the n key
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
722
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
723 4. Sätt 'hlsearch' and 'incsearch' flaggorna:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
724 :set hls is
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
725
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
726 5. Skriv nu in sök-kommandot igen, och se vad som händer:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
727 /ignore
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
728
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
729 6. För att ta bort framhävningen av träffar, skriv
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
730 :nohlsearch
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
731 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
732 LEKTION 6 SAMMANFATTNING
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
733
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
734
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
735 1. Genom att skriva o öpnnas en rad NEDANFÖR markören och markören placeras
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
736 på den öppna raden i Infoga-läge.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
737 Genom att skriva ett stort O öppnas raden OVANFÖR raden som markören är
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
738 på.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
739
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
740 2. Skriv ett a för att infoga text EFTER tecknet som markören står på.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
741 Genom att skriva ett stort A läggs text automatiskt till i slutet på
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
742 raden.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
743
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
744 3. Genom att skriva ett stort R hamnar du i Ersätt-läge till <ESC> trycks
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
745 för att avsluta.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
746
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
747 4. Genom att skriva ":set xxx" sätts flaggan "xxx"
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
748
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
749
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
750
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
751
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
752
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
753
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
754
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
755
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
756
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
757 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
758 LEKTION 7: ON-LINE HJÄLP-KOMMANDON
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
759
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
760
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
761 ** Använd on-line hjälpsystemet **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
762
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
763 Vim har ett omfattande on-line hjälpsystem. För att komma igång pröva ett av
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
764 dessa tre:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
765 - tryck <HELP> tangenten (om du har någon)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
766 - tryck <F1> tangenten (om du har någon)
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
767 - skriv :help <ENTER>
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
768
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
769 Skriv :q <ENTER> för att stränga hjälpfönstret.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
770
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
771 Du kan hitta hjälp om nästan allting, genom att ge ett argument till
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
772 ":help" kommandot. Pröva dessa (glöm inte att trycka <ENTER>):
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
773
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
774 :help w
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
775 :help c_<T
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
776 :help insert-index
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
777 :help user-manual
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
778
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
779
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
780 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
781 LEKTION 8: SKAPA ETT UPPSTARTSSKRIPT
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
782
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
783 ** Aktivera Vim- funktioner **
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
784
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
785 Vim har många fler funktioner än Vi, men de flesta av dem är inaktiverade som
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
786 standard. För att börja använda fler funktioner måste du skapa en "vimrc"-fil.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
787
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
788 1. Börja redigera "vimrc"-filen, detta beror på ditt system:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
789 :edit ~/.vimrc för Unix
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
790 :edit $VIM/_vimrc för MS-Windows
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
791
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
792 2. Läs nu texten i exempel "vimrc"-filen:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
793
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
794 :read $VIMRUNTIME/vimrc_example.vim
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
795
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
796 3. Spara filen med:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
797
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
798 :write
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
799
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
800 Nästa gång du startar Vim kommer den att använda syntaxframhävning.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
801 Du kan lägga till alla inställningar du föredrar till den här "vimrc"-filen.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
802
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
803 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
804
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
805 Detta avslutar handledningen i Vim. Den var avsedd att ge en kort översikt av
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
806 redigeraren Vim, bara tillräckligt för att du ska kunna använda redigeraren
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
807 relativt enkelt. Den är långt ifrån komplett eftersom Vim har många många fler
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
808 kommandon. Läs användarmanualen härnäst: ":help user-manual".
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
809
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
810 För vidare läsning rekommenderas den här boken:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
811 Vim - Vi Improved - av Steve Oualline
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
812 Förlag: New Riders
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
813 Den första boken som är endast behandlar Vim. Speciellt användbar för
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
814 nybörjare. Det finns många exempel och bilder.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
815 Se http://iccf-holland.org/click5.html
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
816
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
817 Den här boken är äldre och behandlar mer Vi än Vim, men rekommenderas också:
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
818 Learning the Vi Editor - av Linda Lamb
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
819 Förlag: O'Reilly & Associates Inc.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
820 Det är en bra bok för att lära sig nästan allt som du vill kunna göra med Vi.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
821 Den sjätte upplagan inkluderar också information om Vim.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
822
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
823 Den här handledningen är skriven av Michael C. Pierce och Robert K. Ware,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
824 Colorado School of Mines med idéer från Charles Smith,
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
825 Colorado State University. E-post: bware@mines.colorado.edu.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
826
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
827 Modifierad för Vim av Bram Moolenaar.
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
828 Översatt av Johan Svedberg <johan@svedberg.com>
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
829
b9740fb41986 updated for version 7.2a
vimboss
parents:
diff changeset
830 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~