annotate runtime/tutor/tutor.no @ 14607:73001276abce v8.1.0317

patch 8.1.0317: Cscope test fails when using shadow directory commit https://github.com/vim/vim/commit/320bf2d85e9e2924d896b3072979598c954922e7 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 22 20:06:26 2018 +0200 patch 8.1.0317: Cscope test fails when using shadow directory Problem: Cscope test fails when using shadow directory. Solution: Resolve symlink in Vim. (James McCoy, closes https://github.com/vim/vim/issues/3364)
author Christian Brabandt <cb@256bit.org>
date Wed, 22 Aug 2018 20:15:08 +0200
parents 1003f9b262d7
children e69e7133c9cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1646
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
1 ===============================================================================
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
2 = V e l k o m m e n t i l i n n f ø r i n g e n i V i m -- Ver. 1.7 =
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
3 ===============================================================================
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
4
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
5 Vim er en meget kraftig editor med mange kommandoer, alt for mange til å
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
6 kunne gå gjennom alle i en innføring som denne. Den er beregnet på å
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
7 sette deg inn i bruken av nok kommandoer så du vil være i stand til lett
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
8 å kunne bruke Vim som en editor til alle formål.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
9
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
10 Tiden som kreves for å gå gjennom denne innføringen tar ca. 25-30
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
11 minutter, avhengig av hvor mye tid du bruker til eksperimentering.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
12
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
13 MERK:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
14 Kommandoene i leksjonene vil modifisere teksten. Lag en kopi av denne
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
15 filen som du kan øve deg på (hvis du kjørte «vimtutor»-kommandoen, er
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
16 dette allerede en kopi).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
17
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
18 Det er viktig å huske at denne innføringen er beregnet på læring gjennom
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
19 bruk. Det betyr at du må utføre kommandoene for å lære dem skikkelig.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
20 Hvis du bare leser teksten, vil du glemme kommandoene!
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
21
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
22 Først av alt, sjekk at «Caps Lock» IKKE er aktiv og trykk «j»-tasten for
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
23 å flytte markøren helt til leksjon 1.1 fyller skjermen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
25 Leksjon 1.1: FLYTTING AV MARKØREN
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
26
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
27
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
28 ** For å flytte markøren, trykk tastene h, j, k, l som vist. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
29 ^
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
30 k Tips: h-tasten er til venstre og flytter til venstre.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
31 < h l > l-tasten er til høyre og flytter til høyre.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
32 j j-tasten ser ut som en pil som peker nedover.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
33 v
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
34 1. Flytt markøren rundt på skjermen til du har fått det inn i fingrene.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
35
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
36 2. Hold inne nedovertasten (j) til den repeterer.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
37 Nå vet du hvordan du beveger deg til neste leksjon.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
38
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
39 3. Gå til leksjon 1.2 ved hjelp av nedovertasten.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
40
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
41 Merk: Hvis du blir usikker på noe du har skrevet, trykk <ESC> for å gå til
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
42 normalmodus. Skriv deretter kommandoen du ønsket på nytt.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
43
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
44 Merk: Piltastene skal også virke. Men ved å bruke hjkl vil du være i stand til
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
45 å bevege markøren mye raskere når du er blitt vant til det. Helt sant!
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
46
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
47 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
48 Leksjon 1.2: AVSLUTTE VIM
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
49
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
50
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
51 !! MERK: Før du utfører noen av punktene nedenfor, les hele leksjonen!!
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
52
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
53 1. Trykk <ESC>-tasten (for å forsikre deg om at du er i normalmodus).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
54
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
55 2. Skriv: :q! <ENTER>.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
56 Dette avslutter editoren og FORKASTER alle forandringer som du har gjort.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
57
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
58 3. Når du ser kommandolinjen i skallet, skriv kommandoen som startet denne
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
59 innføringen. Den er: vimtutor <ENTER>
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
60
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
61 4. Hvis du er sikker på at du husker dette, utfør punktene 1 til 3 for å
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
62 avslutte og starte editoren på nytt.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
63
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
64 MERK: :q! <ENTER> forkaster alle forandringer som du gjorde. I løpet av noen
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
65 få leksjoner vil du lære hvordan du lagrer forandringene til en fil.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
66
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
67 5. Flytt markøren ned til leksjon 1.3.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
68
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
69
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
70 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
71 Leksjon 1.3: REDIGERING AV TEKST -- SLETTING
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
72
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
73
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
74 ** Trykk x for å slette tegnet under markøren. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
75
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
76 1. Flytt markøren til den første linjen merket med --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
77
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
78 2. For å ordne feilene på linjen, flytt markøren til den er oppå tegnet som
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
79 skal slettes.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
80
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
81 3. Trykk tasten x for å slette det uønskede tegnet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
82
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
83 4. Repeter punkt 2 til 4 til setningen er lik den som er under.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
84
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
85 ---> Hessstennnn brrråsnudddde ii gaaata.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
86 ---> Hesten bråsnudde i gata.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
87
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
88 5. Nå som linjen er korrekt, gå til leksjon 1.4.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
89
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
90 MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, men
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
91 bruk dem helt til de sitter.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
92
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
93 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
94 Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
95
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
96
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
97 ** Trykk i for å sette inn tekst. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
98
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
99 1. Flytt markøren til den første linjen som er merket med --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
100
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
101 2. For å gjøre den første linjen lik den andre, flytt markøren til den står
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
102 på tegnet ETTER posisjonen der teksten skal settes inn.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
103
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
104 3. Trykk i og skriv inn teksten som mangler.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
105
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
106 4. Etterhvert som hver feil er fikset, trykk <ESC> for å returnere til
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
107 normalmodus. Repeter punkt 2 til 4 til setningen er korrekt.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
108
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
109 ---> Det er tkst som mnglr .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
110 ---> Det er ganske mye tekst som mangler her.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
111
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
112 5. Når du føler deg komfortabel med å sette inn tekst, gå til oppsummeringen
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
113 nedenfor.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
114
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
115
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
116 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
117 Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
118
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
119
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
120 ** Trykk A for å legge til tekst. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
121
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
122 1. Flytt markøren til den første linjen nedenfor merket --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
123 Det har ikke noe å si hvor markøren er plassert på den linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
124
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
125 2. Trykk A og skriv inn det som skal legges til.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
126
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
127 3. Når teksten er lagt til, trykk <ESC> for å returnere til normalmodusen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
128
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
129 4. Flytt markøren til den andre linjen markert med ---> og repeter steg 2 og
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
130 3 for å reparere denne setningen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
131
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
132 ---> Det mangler noe tekst p
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
133 Det mangler noe tekst på denne linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
134 ---> Det mangler også litt tek
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
135 Det mangler også litt tekst på denne linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
136
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
137 5. Når du føler at du behersker å legge til tekst, gå til leksjon 1.6.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
138
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
140 Leksjon 1.6: REDIGERE EN FIL
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
141
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
142
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
143 ** Bruk :wq for å lagre en fil og avslutte. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
144
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
145 !! MERK: Før du utfører noen av stegene nedenfor, les hele denne leksjonen!!
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
146
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
147 1. Avslutt denne innføringen som du gjorde i leksjon 1.2: :q!
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
148
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
149 2. Skriv denne kommandoen på kommandolinja: vim tutor <ENTER>
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
150 «vim» er kommandoen for å starte Vim-editoren, «tutor» er navnet på fila
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
151 som du vil redigere. Bruk en fil som kan forandres.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
152
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
153 3. Sett inn og slett tekst som du lærte i de foregående leksjonene.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
154
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
155 4. Lagre filen med forandringene og avslutt Vim med: :wq <ENTER>
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
156
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
157 5. Start innføringen på nytt og flytt ned til oppsummeringen som følger.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
158
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
159 6. Etter å ha lest og forstått stegene ovenfor: Sett i gang.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
160
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
161
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
162 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
163 OPPSUMMERING AV LEKSJON 1
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
164
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
165
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
166 1. Markøren beveges ved hjelp av piltastene eller hjkl-tastene.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
167 h (venstre) j (ned) k (opp) l (høyre)
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
168
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
169 2. For å starte Vim fra skall-kommandolinjen, skriv: vim FILNAVN <ENTER>
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
170
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
171 3. For å avslutte Vim, skriv: <ESC> :q! <ENTER> for å forkaste endringer.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
172 ELLER skriv: <ESC> :wq <ENTER> for å lagre forandringene.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
173
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
174 4. For å slette tegnet under markøren, trykk: x
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
175
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
176 5. For å sette inn eller legge til tekst, trykk:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
177 i skriv innsatt tekst <ESC> sett inn før markøren
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
178 A skriv tillagt tekst <ESC> legg til på slutten av linjen
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
179
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
180 MERK: Når du trykker <ESC> går du til normalmodus eller du avbryter en uønsket
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
181 og delvis fullført kommando.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
182
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
183 Nå kan du gå videre til leksjon 2.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
184
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
185 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
186 Leksjon 2.1: SLETTEKOMMANDOER
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
187
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
188
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
189 ** Trykk dw for å slette et ord. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
190
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
191 1. Trykk <ESC> for å være sikker på at du er i normalmodus.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
192
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
193 2. Flytt markøren til den første linjen nedenfor merket --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
194
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
195 3. Flytt markøren til begynnelsen av ordet som skal slettes.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
196
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
197 4. Trykk dw og ordet vil forsvinne.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
198
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
199 MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
200 du skriver den. Vim venter på at du skal skrive w . Hvis du ser et annet
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
201 tegn enn d har du skrevet noe feil; trykk <ESC> og start på nytt.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
202
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
203 ---> Det er agurk tre ord eple som ikke hører pære hjemme i denne setningen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
204 ---> Det er tre ord som ikke hører hjemme i denne setningen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
205
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
206 5. Repeter punkt 3 og 4 til den første setningen er lik den andre. Gå
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
207 deretter til leksjon 2.2.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
208 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
209 Leksjon 2.2: FLERE SLETTEKOMMANDOER
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
210
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
211
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
212 ** Trykk d$ for å slette til slutten av linjen. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
213
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
214 1. Trykk <ESC> for å være sikker på at du er i normalmodus.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
215
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
216 2. Flytt markøren til linjen nedenfor merket --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
217
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
218 3. Flytt markøren til punktet der linjen skal kuttes (ETTER første punktum).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
219
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
220 4. Trykk d$ for å slette alt til slutten av linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
221
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
222 ---> Noen skrev slutten på linjen en gang for mye. linjen en gang for mye.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
223
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
224 5. Gå til leksjon 2.3 for å forstå hva som skjer.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
225
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
226
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
227
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
228
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
229
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
230
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
231 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
232 Leksjon 2.3: OM OPERATORER OG BEVEGELSER
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
233
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
234
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
235 Mange kommandoer som forandrer teksten er laget ut i fra en operator og en
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
236 bevegelse. Formatet for en slettekommando med sletteoperatoren d er:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
237
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
238 d bevegelse
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
239
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
240 Der:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
241 d - er sletteoperatoren.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
242 bevegelse - er hva operatoren vil opere på (listet nedenfor).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
243
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
244 En kort liste med bevegelser:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
245 w - til starten av det neste ordet, UNNTATT det første tegnet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
246 e - til slutten av det nåværende ordet, INKLUDERT det siste tegnet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
247 $ - til slutten av linjen, INKLUDERT det siste tegnet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
248
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
249 Ved å skrive de vil altså alt fra markøren til slutten av ordet bli
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
250 slettet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
251
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
252 MERK: Ved å skrive kun bevegelsen i normalmodusen uten en operator vil
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
253 markøren flyttes som spesifisert.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
254 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
255 LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
256
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
257
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
258 ** Ved å skrive et tall foran en bevegelse repeterer den så mange ganger. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
259
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
260 1. Flytt markøren til starten av linjen markert ---> nedenfor.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
261
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
262 2. Skriv 2w for å flytte markøren to ord framover.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
263
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
264 3. Skriv 3e for å flytte markøren framover til slutten av det tredje
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
265 ordet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
266
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
267 4. Skriv 0 (null) for å flytte til starten av linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
268
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
269 5. Repeter steg 2 og 3 med forskjellige tall.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
270
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
271 ---> Dette er en linje med noen ord som du kan bevege deg rundt på.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
272
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
273 6. Gå videre til leksjon 2.5.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
274
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
275
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
276
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
277 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
278 Leksjon 2.5: BRUK AV ANTALL FOR Å SLETTE MER
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
279
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
280
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
281 ** Et tall sammen med en operator repeterer den så mange ganger. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
282
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
283 I kombinasjonen med sletteoperatoren og en bevegelse nevnt ovenfor setter du
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
284 inn antall før bevegelsen for å slette mer:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
285 d nummer bevegelse
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
286
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
287 1. Flytt markøren til det første ordet med STORE BOKSTAVER på linjen markert
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
288 med --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
289
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
290 2. Skriv 2dw for å slette de to ordene med store bokstaver.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
291
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
292 3. Repeter steg 1 og 2 med forskjelling antall for å slette de etterfølgende
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
293 ordene som har store bokstaver.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
294
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
295 ---> Denne ABC DE linjen FGHI JK LMN OP er nå Q RS TUV litt mer lesbar.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
296
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
297 MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som å
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
298 bruke bevegelsen uten en operator.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
299
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
300 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
301 Leksjon 2.6: OPERERE PÅ LINJER
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
302
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
303
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
304 ** Trykk dd for å slette en hel linje. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
305
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
306 På grunn av at sletting av linjer er mye brukt, fant utviklerne av Vi ut at
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
307 det vil være lettere å rett og slett trykke to d-er for å slette en linje.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
308
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
309 1. Flytt markøren til den andre linjen i verset nedenfor.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
310 2. Trykk dd å slette linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
311 3. Flytt deretter til den fjerde linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
312 4. Trykk 2dd for å slette to linjer.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
313
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
314 ---> 1) Roser er røde,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
315 ---> 2) Gjørme er gøy,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
316 ---> 3) Fioler er blå,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
317 ---> 4) Jeg har en bil,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
318 ---> 5) Klokker viser tiden,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
319 ---> 6) Druer er søte
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
320 ---> 7) Og du er likeså.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
321
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
322
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
323 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
324 Leksjon 2.7: ANGRE-KOMMANDOEN
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
325
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
326
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
327 ** Trykk u for å angre siste kommando, U for å fikse en hel linje. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
328
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
329 1. Flytt markøren til linjen nedenfor merket ---> og plasser den på den
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
330 første feilen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
331 2. Trykk x for å slette det første uønskede tegnet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
332 3. Trykk så u for å angre den siste utførte kommandoen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
333 4. Deretter ordner du alle feilene på linjene ved å bruke kommandoen x .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
334 5. Trykk nå en stor U for å sette linjen tilbake til det den var
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
335 originalt.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
336 6. Trykk u noen ganger for å angre U og foregående kommandoer.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
337 7. Deretter trykker du CTRL-R (hold CTRL nede mens du trykker R) noen
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
338 ganger for å gjenopprette kommandoene (omgjøre angrekommandoene).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
339
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
340 ---> RReparer feiilene påå denne linnnjen oog erssstatt dem meed angre.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
341
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
342 8. Dette er meget nyttige kommandoer. Nå kan du gå til oppsummeringen av
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
343 leksjon 2.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
344
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
345
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
346 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
347 OPPSUMMERING AV LEKSJON 2
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
348
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
349
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
350 1. For å slette fra markøren fram til det neste ordet, trykk: dw
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
351 2. For å slette fra markøren til slutten av en linje, trykk: d$
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
352 3. For å slette en hel linje, trykk: dd
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
353
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
354 4. For å repetere en bevegelse, sett et nummer foran: 2w
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
355 5. Formatet for en forandringskommando er:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
356 operator [nummer] bevegelse
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
357 der:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
358 operator - hva som skal gjøres, f.eks. d for å slette
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
359 [nummer] - et valgfritt antall for å repetere bevegelsen
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
360 bevegelse - hva kommandoen skal operere på, eksempelvis w (ord),
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
361 $ (til slutten av linjen) og så videre.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
362
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
363 6. For å gå til starten av en linje, bruk en null: 0
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
364
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
365 7. For å angre tidligere endringer, skriv: u (liten u)
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
366 For å angre alle forandringer på en linje, skriv: U (stor U)
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
367 For å omgjøre angringen, trykk: CTRL-R
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
368
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
369 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
370 Leksjon 3.1: «LIM INN»-KOMMANDOEN
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
371
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
372
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
373 ** Trykk p for å lime inn tidligere slettet tekst etter markøren **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
374
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
375 1. Flytt markøren til den første linjen med ---> nedenfor.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
376
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
377 2. Trykk dd for å slette linjen og lagre den i et Vim-register.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
378
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
379 3. Flytt markøren til c)-linjen, OVER posisjonen linjen skal settes inn.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
380
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
381 4. Trykk p for å legge linjen under markøren.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
382
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
383 5. Repeter punkt 2 til 4 helt til linjene er i riktig rekkefølge.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
384
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
385 ---> d) Kan du også lære?
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
386 ---> b) Fioler er blå,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
387 ---> c) Intelligens må læres,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
388 ---> a) Roser er røde,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
389
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
390
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
391
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
392 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
393 Leksjon 3.2: «ERSTATT»-KOMMANDOEN
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
394
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
395
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
396 ** Trykk rx for å erstatte tegnet under markøren med x. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
397
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
398 1. Flytt markøren til den første linjen nedenfor merket --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
399
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
400 2. Flytt markøren så den står oppå den første feilen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
401
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
402 3. Trykk r og deretter tegnet som skal være der.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
403
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
404 4. Repeter punkt 2 og 3 til den første linjen er lik den andre.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
405
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
406 ---> Da dfnne lynjxn ble zkrevet, var det nøen som tjykket feite taster!
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
407 ---> Da denne linjen ble skrevet, var det noen som trykket feile taster!
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
408
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
409 5. Gå videre til leksjon 3.2.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
410
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
411 MERK: Husk at du bør lære ved å BRUKE, ikke pugge.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
412
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
413
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
414
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
415 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
416 Leksjon 3.3: «FORANDRE»-OPERATOREN
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
417
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
418
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
419 ** For å forandre til slutten av et ord, trykk ce . **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
420
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
421 1. Flytt markøren til den første linjen nedenfor som er merket --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
422
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
423 2. Plasser markøren på u i «lubjwr».
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
424
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
425 3. Trykk ce og det korrekte ordet (i dette tilfellet, skriv «injen»).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
426
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
427 4. Trykk <ESC> og gå til det neste tegnet som skal forandres.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
428
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
429 5. Repeter punkt 3 og 4 helt til den første setningen er lik den andre.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
430
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
431 ---> Denne lubjwr har noen wgh som må forkwåp med «forækzryas»-kommandoen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
432 ---> Denne linjen har noen ord som må forandres med «forandre»-kommandoen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
433
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
434 Vær oppmerksom på at ce sletter ordet og går inn i innsettingsmodus.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
435
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
436
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
437
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
438 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
439 Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
440
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
441
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
442 ** Forandringskommandoen blir brukt med de samme bevegelser som «slett». **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
443
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
444 1. Forandringsoperatoren fungerer på samme måte som «slett». Formatet er:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
445
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
446 c [nummer] bevegelse
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
447
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
448 2. Bevegelsene er de samme, som for eksempel w (ord) og $ (slutten av en
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
449 linje).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
450
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
451 3. Gå til den første linjen nedenfor som er merket --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
452
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
453 4. Flytt markøren til den første feilen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
454
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
455 5. Skriv c$ og skriv resten av linjen lik den andre og trykk <ESC>.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
456
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
457 ---> Slutten på denne linjen trenger litt hjelp for å gjøre den lik den neste.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
458 ---> Slutten på denne linjen trenger å bli rettet ved bruk av c$-kommandoen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
459
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
460 MERK: Du kan bruke slettetasten for å rette feil mens du skriver.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
461 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
462 OPPSUMMERING AV LEKSJON 3
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
463
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
464
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
465 1. For å legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
466 limer inn den slettede teksten ETTER markøren (hvis en linje ble slettet
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
467 vil den bli limt inn på linjen under markøren).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
468
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
469 2. For å erstatte et tegn under markøren, trykk r og deretter tegnet som
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
470 du vil ha der.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
471
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
472 3. Forandringsoperatoren lar deg forandre fra markøren til dit bevegelsen
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
473 tar deg. Det vil si, skriv ce for å forandre fra markøren til slutten
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
474 av ordet, c$ for å forandre til slutten av linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
475
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
476 4. Formatet for «forandre» er:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
477
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
478 c [nummer] bevegelse
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
479
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
480 Nå kan du gå til neste leksjon.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
481
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
482
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
483
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
484 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
485 Leksjon 4.1: POSISJONERING AV MARKØREN OG FILSTATUS
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
486
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
487 ** Trykk CTRL-G for å vise posisjonen i filen og filstatusen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
488 Trykk G for å gå til en spesifikk linje i filen. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
489
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
490 Merk: Les hele leksjonen før du utfører noen av punktene!
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
491
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
492 1. Hold nede Ctrl-tasten og trykk g . Vi kaller dette CTRL-G. En melding
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
493 vil komme til syne på bunnen av skjermen med filnavnet og posisjonen i
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
494 filen. Husk linjenummeret for bruk i steg 3.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
495
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
496 Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
497 skjer når «ruler»-valget er satt (forklart i leksjon 6).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
498
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
499 2. Trykk G for å gå til bunnen av filen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
500 Skriv gg for å gå til begynnelsen av filen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
501
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
502 3. Skriv inn linjenummeret du var på og deretter G . Dette vil føre deg
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
503 tilbake til linjen du var på da du først trykket CTRL-G.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
504
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
505 4. Utfør steg 1 til 3 hvis du føler deg sikker på prosedyren.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
506
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
507 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
508 Leksjon 4.2: SØKEKOMMANDOEN
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
509
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
510 ** Skriv / etterfulgt av en søkestreng som du vil lete etter. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
511
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
512 1. Trykk / når du er i normalmodusen. Legg merke til at skråstreken og
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
513 markøren kommer til syne på bunnen av skjermen i likhet med
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
514 «:»-kommandoene.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
515
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
516 2. Skriv «feeeiil» og trykk <ENTER>. Dette er teksten du vil lete etter.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
517
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
518 3. For å finne neste forekomst av søkestrengen, trykk n .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
519 For å lete etter samme søketeksten i motsatt retning, trykk N .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
520
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
521 4. For å lete etter en tekst bakover i filen, bruk ? istedenfor / .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
522
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
523 5. For å gå tilbake til der du kom fra, trykk CTRL-O (Hold Ctrl nede mens
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
524 du trykker bokstaven o ). Repeter for å gå enda lengre tilbake. CTRL-I
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
525 går framover.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
526
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
527 ---> «feeeiil» er ikke måten å skrive «feil» på, feeeiil er helt feil.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
528 Merk: Når søkingen når slutten av filen, vil den fortsette fra starten unntatt
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
529 hvis «wrapscan»-valget er resatt.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
530 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
531 Leksjon 4.3: FINN SAMSVARENDE PARENTESER
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
532
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
533
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
534 ** Trykk % for å finne en samsvarende ), ] eller } . **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
535
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
536 1. Plasser markøren på en (, [ eller { på linjen nedenfor merket --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
537
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
538 2. Trykk % .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
539
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
540 3. Markøren vil gå til den samsvarende parentesen eller hakeparentesen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
541
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
542 4. Trykk % for å flytte markøren til den andre samsvarende parentesen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
543
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
544 5. Flytt markøren til en annen (, ), [, ], { eller } og se hva % gjør.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
545
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
546 ---> Dette ( er en testlinje med (, [ ] og { } i den )).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
547
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
548 Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
549 antall parenteser!
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
550
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
551
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
552
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
553 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
554 Leksjon 4.4: ERSTATT-KOMMANDOEN
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
555
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
556
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
557 ** Skriv :s/gammel/ny/g for å erstatte «gammel» med «ny». **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
558
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
559 1. Flytt markøren til linjen nedenfor som er merket med --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
560
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
561 2. Skriv :s/deen/den/ <ENTER> . Legg merke til at denne kommandoen bare
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
562 forandrer den første forekomsten av «deen» på linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
563
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
564 3. Skriv :s/deen/den/g . Når g-flagget legges til, betyr dette global
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
565 erstatning på linjen og erstatter alle forekomster av «deen» på linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
566
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
567 ---> deen som kan kaste deen tyngste steinen lengst er deen beste
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
568
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
569 4. For å erstatte alle forekomster av en tekststreng mellom to linjer,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
570 skriv :#,#s/gammel/ny/g der #,# er linjenumrene på de to linjene for
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
571 linjeområdet erstatningen skal gjøres.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
572 Skriv :%s/gammel/ny/g for å erstatte tekst i hele filen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
573 Skriv :%s/gammel/ny/gc for å finne alle forekomster i hele filen, og
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
574 deretter spørre om teksten skal erstattes eller
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
575 ikke.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
576 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
577 OPPSUMMERING AV LEKSJON 4
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
578
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
579
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
580 1. Ctrl-G viser nåværende posisjon i filen og filstatusen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
581 G går til slutten av filen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
582 nummer G går til det linjenummeret.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
583 gg går til den første linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
584
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
585 2. Skriv / etterfulgt av en søketekst for å lete FRAMOVER etter teksten.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
586 Skriv ? etterfulgt av en søketekst for å lete BAKOVER etter teksten.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
587 Etter et søk kan du trykke n for å finne neste forekomst i den samme
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
588 retningen eller N for å lete i motsatt retning.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
589 CTRL-O tar deg tilbake til gamle posisjoner, CTRL-I til nyere posisjoner.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
590
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
591 3. Skriv % når markøren står på en (, ), [, ], { eller } for å finne den
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
592 som samsvarer.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
593
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
594 4. Erstatte «gammel» med første «ny» på en linje: :s/gammel/ny
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
595 Erstatte alle «gammel» med «ny» på en linje: :s/gammel/ny/g
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
596 Erstatte tekst mellom to linjenumre: :#,#s/gammel/ny/g
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
597 Erstatte alle forekomster i en fil: :%s/gammel/ny/g
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
598 For å godkjenne hver erstatning, legg til «c»: :%s/gammel/ny/gc
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
599 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
600 Leksjon 5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
601
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
602
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
603 ** Skriv :! etterfulgt av en ekstern kommando for å utføre denne. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
604
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
605 1. Skriv den velkjente kommandoen : for å plassere markøren på bunnen av
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
606 skjermen. Dette lar deg skrive en kommandolinjekommando.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
607
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
608 2. Nå kan du skrive tegnet ! . Dette lar deg utføre en hvilken som helst
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
609 ekstern kommando.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
610
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
611 3. Som et eksempel, skriv ls etter utropstegnet og trykk <ENTER>. Du vil
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
612 nå få en liste over filene i katalogen, akkurat som om du hadde kjørt
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
613 kommandoen direkte fra kommandolinjen i skallet. Eller bruk :!dir hvis
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
614 «ls» ikke virker.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
615
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
616 MERK: Det er mulig å kjøre alle eksterne kommandoer på denne måten, også med
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
617 parametere.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
618
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
619 MERK: Alle «:»-kommandoer må avsluttes med <ENTER>. Fra dette punktet er det
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
620 ikke alltid vi nevner det.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
621
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
622 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
623 Leksjon 5.2: MER OM LAGRING AV FILER
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
624
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
625
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
626 ** For å lagre endringene gjort i en tekst, skriv :w FILNAVN. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
627
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
628 1. Skriv :!dir eller :!ls for å få en liste over filene i katalogen. Du
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
629 vet allerede at du må trykke <ENTER> etter dette.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
630
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
631 2. Velg et filnavn på en fil som ikke finnes, som for eksempel TEST .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
632
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
633 3. Skriv :w TEST (der TEST er filnavnet du velger).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
634
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
635 4. Dette lagrer hele filen (denne innføringen) under navnet TEST . For å
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
636 sjekke dette, skriv :!dir eller :!ls igjen for å se innholdet av
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
637 katalogen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
638
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
639 Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST»,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
640 ville filen vært en eksakt kopi av innføringen da du lagret den.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
641
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
642 5. Fjern filen ved å skrive :!rm TEST hvis du er på et Unix-lignende
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
643 operativsystem, eller :!del TEST hvis du bruker MS-DOS.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
644
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
645 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
646 Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
647
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
648
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
649 ** For å lagre en del av en fil, skriv v bevegelse :w FILNAVN **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
650
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
651 1. Flytt markøren til denne linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
652
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
653 2. Trykk v og flytt markøren til det femte elementet nedenfor. Legg merke
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
654 til at teksten blir markert.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
655
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
656 3. Trykk : (kolon). På bunnen av skjermen vil :'<,'> komme til syne.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
657
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
658 4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
659 at du ser :'<,'>w TEST før du trykker Enter.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
660
3847
1003f9b262d7 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1646
diff changeset
661 5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller :!ls
1646
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
662 for å se den. Ikke slett den enda! Vi vil bruke den i neste leksjon.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
663
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
664 MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
665 å gjøre det valgte området større eller mindre. Deretter kan du bruke en
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
666 operator for å gjøre noe med teksten. For eksempel sletter d teksten.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
667
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
668 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
669 Leksjon 5.4: HENTING OG SAMMENSLÅING AV FILER
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
670
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
671
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
672 ** For å lese inn en annen fil inn i nåværende buffer, skriv :r FILNAVN **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
673
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
674 1. Plasser markøren like over denne linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
675
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
676 MERK: Etter å ha utført steg 2 vil du se teksten fra leksjon 5.3. Gå deretter
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
677 NED for å se denne leksjonen igjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
678
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
679 2. Hent TEST-filen ved å bruke kommandoen :r TEST der TEST er navnet på
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
680 filen du brukte. Filen du henter blir plassert nedenfor markørlinjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
681
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
682 3. For å sjekke at filen ble hentet, gå tilbake og se at det er to kopier av
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
683 leksjon 5.3, originalen og denne versjonen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
684
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
685 MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
686 leser utdataene av ls-kommandoen og legger dem nedenfor markøren.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
687
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
688
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
689
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
690
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
691 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
692 OPPSUMMERING AV LEKSJON 5
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
693
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
694
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
695 1. :!kommando utfører en ekstern kommandio.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
696
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
697 Noen nyttige eksempler er:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
698 (MS-DOS) (Unix)
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
699 :!dir :!ls - List filene i katalogen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
700 :!del FILNAVN :!rm FILNAVN - Slett filen FILNAVN.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
701
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
702 2. :w FILNAVN skriver den nåværende Vim-filen disken med navnet FILNAVN .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
703
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
704 3. v bevegelse :w FILNAVN lagrer de visuelt valgte linjene til filen
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
705 FILNAVN.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
706
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
707 4. :r FILNAVN henter filen FILNAVN og legger den inn nedenfor markøren.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
708
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
709 5. :r !dir leser utdataene fra «dir»-kommandoen og legger dem nedenfor
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
710 markørposisjonen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
711
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
712
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
713
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
714 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
715 Leksjon 6.1: «ÅPNE LINJE»-KOMMANDOEN
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
716
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
717
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
718 ** Skriv o for å «åpne opp» for en ny linje etter markøren og gå til
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
719 innsettingsmodus **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
720
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
721 1. Flytt markøren til linjen nedenfor merket --->.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
722
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
723 2. Skriv o (liten o) for å åpne opp en linje NEDENFOR markøren og gå inn i
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
724 innsettingsmodus.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
725
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
726 3. Skriv litt tekst og trykk <ESC> for å gå ut av innsettingsmodusen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
727
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
728 ---> Etter at o er skrevet blir markøren plassert på den tomme linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
729
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
730 4. For å åpne en ny linje OVER markøren, trykk rett og slett en stor O
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
731 istedenfor en liten o . Prøv dette på linjen nedenfor.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
732
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
733 ---> Lag ny linje over denne ved å trykke O mens markøren er på denne linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
734
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
735
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
736
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
737 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
738 Leksjon 6.2: «LEGG TIL»-KOMMANDOEN
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
739
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
740
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
741 ** Skriv a for å legge til tekst ETTER markøren. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
742
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
743 1. Flytt markøren til starten av linjen merket ---> nedenfor.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
744
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
745 2. Trykk e til markøren er på slutten av «li».
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
746
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
747 3. Trykk a (liten a) for å legge til tekst ETTER markøren.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
748
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
749 4. Fullfør ordet sånn som på linjen nedenfor. Trykk <ESC> for å gå ut av
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
750 innsettingsmodusen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
751
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
752 5. Bruk e for å gå til det neste ufullstendige ordet og repeter steg 3 og
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
753 4.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
754
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
755 ---> Denne li lar deg øve på å leg til tek på en linje.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
756 ---> Denne linjen lar deg øve på å legge til tekst på en linje.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
757
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
758 Merk: a, i og A går alle til den samme innsettingsmodusen, den eneste
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
759 forskjellen er hvor tegnene blir satt inn.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
760 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
761 Leksjon 6.3: EN ANNEN MÅTE Å ERSTATTE PÅ
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
762
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
763
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
764 ** Skriv en stor R for å erstatte mer enn ett tegn. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
765
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
766 1. Flytt markøren til den første linjen nedenfor merket --->. Flytt markøren
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
767 til begynnelsen av den første «xxx»-en.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
768
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
769 2. Trykk R og skriv inn tallet som står nedenfor på den andre linjen så
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
770 det erstatter xxx.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
771
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
772 3. Trykk <ESC> for å gå ut av erstatningsmodusen. Legg merke til at resten
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
773 av linjen forblir uforandret.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
774
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
775 4. Repeter stegene for å erstatte den gjenværende xxx.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
776
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
777 ---> Ved å legge 123 til xxx får vi xxx.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
778 ---> Ved å legge 123 til 456 får vi 579.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
779
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
780 MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
781 erstatter et eksisterende tegn.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
782
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
783 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
784 Leksjon 6.4: KOPIERE OG LIME INN TEKST
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
785
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
786
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
787 ** Bruk y-operatoren for å kopiere tekst og p for å lime den inn **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
788
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
789 1. Gå til linjen merket ---> nedenfor og plasser markøren etter «a)».
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
790
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
791 2. Gå inn i visuell modus med v og flytt markøren til like før «første».
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
792
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
793 3. Trykk y for å kopiere (engelsk: «yank») den uthevede teksten.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
794
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
795 4. Flytt markøren til slutten av den neste linjen: j$
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
796
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
797 5. Trykk p for å lime inn teksten. Trykk deretter: a andre <ESC> .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
798
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
799 6. Bruk visuell modus for å velge « valget.», kopier det med y , gå til
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
800 slutten av den neste linjen med j$ og legg inn teksten der med p .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
801
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
802 ---> a) Dette er det første valget.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
803 b)
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
804
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
805 Merk: Du kan også bruke y som en operator; yw kopierer ett ord.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
806 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
807 Leksjon 6.5: SETT VALG
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
808
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
809
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
810 ** Sett et valg så søk eller erstatning ignorerer store/små bokstaver. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
811
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
812 1. Let etter «ignore» ved å skrive: /ignore <ENTER>
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
813 Repeter flere ganger ved å trykke n .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
814
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
815 2. Sett «ic»-valget (Ignore Case) ved å skrive: :set ic
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
816
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
817 3. Søk etter «ignore» igjen ved å trykke n .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
818 Legg merke til at både «Ignore» og «IGNORE» blir funnet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
819
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
820 4. Sett «hlsearch»- og «incsearch»-valgene: :set hls is
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
821
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
822 5. Skriv søkekommandoen igjen og se hva som skjer: /ignore <ENTER>
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
823
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
824 6. For å slå av ignorering av store/små bokstaver, skriv: :set noic
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
825
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
826 Merk: For å fjerne uthevingen av treff, skriv: :nohlsearch
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
827 Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
828 \c i uttrykket: /ignore\c <ENTER>
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
829 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
830 OPPSUMMERING AV LEKSJON 6
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
831
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
832 1. Trykk o for å legge til en linje NEDENFOR markøren og gå inn i
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
833 innsettingsmodus.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
834 Trykk O for å åpne en linje OVER markøren.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
835
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
836 2. Skriv a for å sette inn tekst ETTER markøren.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
837 Skriv A for å sette inn tekst etter slutten av linjen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
838
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
839 3. Kommandoen e går til slutten av et ord.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
840
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
841 4. Operatoren y («yank») kopierer tekst, p («paste») limer den inn.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
842
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
843 5. Ved å trykke R går du inn i erstatningsmodus helt til <ESC> trykkes.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
844
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
845 6. Skriv «:set xxx» for å sette valget «xxx». Noen valg er:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
846 «ic» «ignorecase» ignorer store/små bokstaver under søk
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
847 «is» «incsearch» vis delvise treff for en søketekst
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
848 «hls» «hlsearch» uthev alle søketreff
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
849
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
850 7. Legg til «no» foran valget for å slå det av: :set noic
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
851
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
852 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
853 Leksjon 7.1: FÅ HJELP
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
854
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
855
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
856 ** Bruk det innebygde hjelpesystemet. **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
857
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
858 Vim har et omfattende innebygget hjelpesystem. For å starte det, prøv en av
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
859 disse måtene:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
860 - Trykk Hjelp-tasten (hvis du har en)
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
861 - Trykk F1-tasten (hvis du har en)
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
862 - Skriv :help <ENTER>
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
863
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
864 Les teksten i hjelpevinduet for å finne ut hvordan hjelpen virker.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
865 Skriv CTRL-W CTRL-W for å hoppe fra et vindu til et annet
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
866 Skriv :q <ENTER> for å lukke hjelpevinduet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
867
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
868 Du kan få hjelp for omtrent alle temaer om Vim ved å skrive et parameter til
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
869 «:help»-kommandoen. Prøv disse (ikke glem å trykke <ENTER>):
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
870
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
871 :help w
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
872 :help c_CTRL-D
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
873 :help insert-index
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
874 :help user-manual
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
875 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
876 Leksjon 7.2: LAG ET OPPSTARTSSKRIPT
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
877
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
878
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
879 ** Slå på funksjoner i Vim **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
880
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
881 Vim har mange flere funksjoner enn Vi, men flesteparten av dem er slått av
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
882 som standard. For å begynne å bruke flere funksjoner må du lage en
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
883 «vimrc»-fil.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
884
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
885 1. Start redigeringen av «vimrc»-filen. Dette avhenger av systemet ditt:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
886 :e ~/.vimrc for Unix
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
887 :e $VIM/_vimrc for MS Windows
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
888
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
889 2. Les inn eksempelfilen for «vimrc»:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
890 :r $VIMRUNTIME/vimrc_example.vim
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
891
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
892 3. Lagre filen med:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
893 :w
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
894
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
895 Neste gang du starter Vim vil den bruke syntaks-utheving. Du kan legge til
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
896 alle dine foretrukne oppsett i denne «vimrc»-filen.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
897 For mer informasjon, skriv :help vimrc-intro
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
898 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
899 Leksjon 7.3: FULLFØRING
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
900
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
901
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
902 ** Kommandolinjefullføring med CTRL-D og <TAB> **
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
903
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
904 1. Vær sikker på at Vim ikke er i Vi-kompatibel modus: :set nocp
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
905
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
906 2. Se hvilke filer som er i katalogen: :!ls eller :!dir
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
907
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
908 3. Skriv starten på en kommando: :e
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
909
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
910 4. Trykk CTRL-D og Vim vil vise en liste over kommandoer som starter med
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
911 «e».
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
912
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
913 5. Trykk <TAB> og Vim vil fullføre kommandonavnet til «:edit».
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
914
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
915 6. Legg til et mellomrom og starten på et eksisterende filnavn: :edit FIL
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
916
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
917 7. Trykk <TAB>. Vim vil fullføre navnet (hvis det er unikt).
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
918
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
919 MERK: Fullføring fungerer for mange kommandoer. Prøv ved å trykke CTRL-D og
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
920 <TAB>. Det er spesielt nyttig for bruk sammen med :help .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
921 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
922 OPPSUMMERING AV LEKSJON 7
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
923
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
924
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
925 1. Skriv :help eller trykk <F1> eller <Help> for å åpne et hjelpevindu.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
926
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
927 2. Skriv :help kommando for å få hjelp om kommando .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
928
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
929 3. Trykk CTRL-W CTRL-W for å hoppe til et annet vindu.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
930
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
931 4. Trykk :q for å lukke hjelpevinduet.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
932
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
933 5. Opprett et vimrc-oppstartsskript for å lagre favorittvalgene dine.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
934
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
935 6. Når du skriver en «:»-kommando, trykk CTRL-D for å se mulige
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
936 fullføringer. Trykk <TAB> for å bruke en fullføring.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
937
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
938
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
939
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
940
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
941
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
942
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
943
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
944 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
945
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
946 Her slutter innføringen i Vim. Den var ment som en rask oversikt over
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
947 editoren, akkurat nok til å la deg sette i gang med enkel bruk. Den er på
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
948 langt nær komplett, da Vim har mange flere kommandoer. Les bruksanvisningen
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
949 ved å skrive :help user-manual .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
950
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
951 For videre lesing og studier, kan denne boken anbefales:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
952 «Vim - Vi Improved» av Steve Oualline
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
953 Utgiver: New Riders
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
954 Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
955 nybegynnere. Inneholder mange eksempler og illustrasjoner.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
956 Se http://iccf-holland.org/click5.html
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
957
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
958 Denne boken er eldre og handler mer om Vi enn Vim, men anbefales også:
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
959 «Learning the Vi Editor» av Linda Lamb
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
960 Utgiver: O'Reilly & Associates Inc.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
961 Det er en god bok for å få vite omtrent hva som helst om Vi.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
962 Den sjette utgaven inneholder også informasjon om Vim.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
963
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
964 Denne innføringen er skrevet av Michael C. Pierce og Robert K. Ware,
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
965 Colorado School of Mines med idéer av Charles Smith, Colorado State
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
966 University. E-mail: bware@mines.colorado.edu .
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
967
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
968 Modifisert for Vim av Bram Moolenaar.
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
969 Oversatt av Øyvind A. Holm. E-mail: vimtutor _AT_ sunbase.org
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
970 Id: tutor.no 406 2007-03-18 22:48:36Z sunny
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
971
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
972 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
da81e7f456c9 updated for version 7.2a
vimboss
parents:
diff changeset
973 vim: set ts=8 :