annotate runtime/tutor/tutor.nb.utf-8 @ 34470:dd8f5311cee5 v9.1.0147

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