annotate runtime/doc/if_mzsch.txt @ 1875:09f00d57222b v7.2.172

updated for version 7.2-172
author vimboss
date Thu, 14 May 2009 20:01:05 +0000
parents 5232b9862f23
children afb740b5dfab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1702
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1698
diff changeset
1 *if_mzsch.txt* For Vim version 7.2. Last change: 2008 Jun 28
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
2
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
3
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
4 VIM REFERENCE MANUAL by Sergey Khorev
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
5
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
6
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
7 The MzScheme Interface to Vim *mzscheme* *MzScheme*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
8
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
9 1. Commands |mzscheme-commands|
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
10 2. Examples |mzscheme-examples|
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
11 3. Threads |mzscheme-threads|
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
12 4. The Vim access procedures |mzscheme-vim|
625
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
13 5. Dynamic loading |mzscheme-dynamic|
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
15 {Vi does not have any of these commands}
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
16
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
17 The MzScheme interface is available only if Vim was compiled with the
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
18 |+mzscheme| feature.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
19
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
20 Based on the work of Brent Fulgham.
128
8def260d486d updated for version 7.0044
vimboss
parents: 26
diff changeset
21 Dynamic loading added by Sergey Khorev
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
22
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
23 For downloading MzScheme and other info:
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
24 http://www.plt-scheme.org/software/mzscheme/
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
25
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
26 Note: On FreeBSD you should use the "drscheme" port.
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
27
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
28 ==============================================================================
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
29 1. Commands *mzscheme-commands*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
30
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
31 *:mzscheme* *:mz*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
32 :[range]mz[scheme] {stmt}
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
33 Execute MzScheme statement {stmt}. {not in Vi}
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
34
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
35 :[range]mz[scheme] << {endmarker}
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
36 {script}
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
37 {endmarker}
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
38 Execute inlined MzScheme script {script}.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
39 Note: This command doesn't work if the MzScheme
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
40 feature wasn't compiled in. To avoid errors, see
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
41 |script-here|.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
42
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
43 *:mzfile* *:mzf*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
44 :[range]mzf[ile] {file} Execute the MzScheme script in {file}. {not in Vi}
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
45 All statements are executed in the namespace of the
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
46 buffer that was current during :mzfile start.
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
47 If you want to access other namespaces, use
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
48 'parameterize'.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
49
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
50 All of these commands do essentially the same thing - they execute a piece of
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
51 MzScheme code, with the "current range" set to the given line
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
52 range.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
53
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
54 In the case of :mzscheme, the code to execute is in the command-line.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
55 In the case of :mzfile, the code to execute is the contents of the given file.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
56
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
57 Each buffer has its own MzScheme namespace. Global namespace is bound to
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1620
diff changeset
58 the "global-namespace" value from the 'vimext' module.
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
59 MzScheme interface defines exception exn:vim, derived from exn.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
60 It is raised for various Vim errors.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
61
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
62 During compilation, the MzScheme interface will remember the current MzScheme
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
63 collection path. If you want to specify additional paths use the
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
64 'current-library-collection-paths' parameter. E.g., to cons the user-local
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
65 MzScheme collection path: >
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
66 :mz << EOF
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
67 (current-library-collection-paths
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
68 (cons
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
69 (build-path (find-system-path 'addon-dir) (version) "collects")
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
70 (current-library-collection-paths)))
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
71 EOF
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
72 <
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
73
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
74 All functionality is provided through module vimext.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
75
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
76 The exn:vim is available without explicit import.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
77
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
78 To avoid clashes with MzScheme, consider using prefix when requiring module,
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
79 e.g.: >
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
80 :mzscheme (require (prefix vim- vimext))
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
81 <
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
82 All the examples below assume this naming scheme. Note that you need to do
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
83 this again for every buffer.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
84
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
85 The auto-instantiation can be achieved with autocommands, e.g. you can put
26
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
86 something like this in your .vimrc (EOFs should not have indentation): >
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
87 function s:MzRequire()
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
88 if has("mzscheme")
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
89 :mz << EOF
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
90 (require (prefix vim- vimext))
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
91 (let ((buf (vim-get-buff-by-name (vim-eval "expand(\"<afile>\")"))))
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
92 (when (and buf (not (eq? buf (vim-curr-buff))))
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
93 (parameterize ((current-namespace (vim-get-buff-namespace buf)))
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
94 (namespace-attach-module vim-global-namespace 'vimext)
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
95 (namespace-require '(prefix vim vimext)))))
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
96 EOF
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
97 endif
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
98 endfunction
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
99
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
100 function s:MzStartup()
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
101 if has("mzscheme")
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
102 au BufNew,BufNewFile,BufAdd,BufReadPre * :call s:MzRequire()
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
103 :mz << EOF
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
104 (current-library-collection-paths
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
105 (cons
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
106 (build-path (find-system-path 'addon-dir) (version) "collects")
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
107 (current-library-collection-paths)))
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
108 EOF
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
109 endif
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
110 endfunction
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
111
404aac550f35 updated for version 7.0017
vimboss
parents: 14
diff changeset
112 call s:MzStartup()
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
113 <
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
114
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
115 The global namespace just instantiated this module with the prefix "vimext:".
273
2463194c8cdd updated for version 7.0073
vimboss
parents: 128
diff changeset
116 *mzscheme-sandbox*
2463194c8cdd updated for version 7.0073
vimboss
parents: 128
diff changeset
117 When executed in the |sandbox|, access to some filesystem and Vim interface
2463194c8cdd updated for version 7.0073
vimboss
parents: 128
diff changeset
118 procedures is restricted.
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
119
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
120 ==============================================================================
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
121 2. Examples *mzscheme-examples*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
122 >
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
123 :mzscheme (display "Hello")
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
124 :mzscheme (vim-set-buff-line 10 "This is line #10")
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
125 <
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
126 Inline script usage: >
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
127 function! <SID>SetFirstLine()
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
128 :mz << EOF
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
129 (display "!!!")
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
130 (vim-set-buff-line 1 "This is line #1")
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
131 (vim-beep)
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
132 EOF
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
133 endfunction
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
134
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
135 nmap <F9> :call <SID>SetFirstLine() <CR>
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
136 <
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
137 File execution: >
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
138 :mzfile supascript.scm
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
139 <
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
140 Accessing the current buffer namespace from an MzScheme program running in
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
141 another buffer within |:mzfile|-executed script : >
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
142 ; Move to the window below
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
143 (vim-command "wincmd j")
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
144 ; execute in the context of buffer, to which window belongs
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
145 ; assume that buffer has 'textstring' defined
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
146 (parameterize ((current-namespace
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
147 (vim-get-buff-namespace (vim-curr-buff))))
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
148 (eval '(vim-set-buff-line 1 textstring)))
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
149 <
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
150
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
151 ==============================================================================
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
152 3. Threads *mzscheme-threads*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
153
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
154 The MzScheme interface supports threads. They are independent from OS threads,
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
155 thus scheduling is required. The option 'mzquantum' determines how often
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
156 Vim should poll for available MzScheme threads.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
157 NOTE
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
158 Thread scheduling in the console version of Vim is less reliable than in the
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
159 GUI version.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
160
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
161 ==============================================================================
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
162 5. VIM Functions *mzscheme-vim*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
163
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
164 *mzscheme-vimext*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
165 The 'vimext' module provides access to procedures defined in the MzScheme
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
166 interface.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
167
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
168 Common
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
169 ------
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
170 (command {command-string}) Perform the vim ":Ex" style command.
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents: 625
diff changeset
171 (eval {expr-string}) Evaluate the vim expression to a string.
0f9f4761ad9c updated for version 7.0216
vimboss
parents: 625
diff changeset
172 A |List| is turned into a string by
0f9f4761ad9c updated for version 7.0216
vimboss
parents: 625
diff changeset
173 joining the items and inserting line
0f9f4761ad9c updated for version 7.0216
vimboss
parents: 625
diff changeset
174 breaks.
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
175 NOTE clashes with MzScheme eval
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
176 (range-start) Start/End of the range passed with
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
177 (range-end) the Scheme command.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
178 (beep) beep
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
179 (get-option {option-name} [buffer-or-window]) Get Vim option value (either
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
180 local or global, see set-option).
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
181 (set-option {string} [buffer-or-window])
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
182 Set a Vim option. String must have option
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
183 setting form (like optname=optval, or
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
184 optname+=optval, etc.) When called with
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
185 {buffer} or {window} the local option will
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
186 be set. The symbol 'global can be passed
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
187 as {buffer-or-window}. Then |:setglobal|
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
188 will be used.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
189 global-namespace The MzScheme main namespace.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
190
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
191 Buffers *mzscheme-buffer*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
192 -------
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
193 (buff? {object}) Is object a buffer?
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
194 (buff-valid? {object}) Is object a valid buffer? (i.e.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
195 corresponds to the real Vim buffer)
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
196 (get-buff-line {linenr} [buffer])
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
197 Get line from a buffer.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
198 (set-buff-line {linenr} {string} [buffer])
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
199 Set a line in a buffer. If {string} is #f,
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
200 the line gets deleted. The [buffer]
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
201 argument is optional. If omitted, the
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
202 current buffer will be used.
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
203 (get-buff-line-list {start} {end} [buffer])
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
204 Get a list of lines in a buffer. {Start}
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
205 and {end} are 1-based. {Start} is
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
206 inclusive, {end} - exclusive.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
207 (set-buff-line-list {start} {end} {string-list} [buffer])
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
208 Set a list of lines in a buffer. If
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
209 string-list is #f or null, the lines get
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
210 deleted. If a list is shorter than
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
211 {end}-{start} the remaining lines will
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
212 be deleted.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
213 (get-buff-name [buffer]) Get a buffer's text name.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
214 (get-buff-num [buffer]) Get a buffer's number.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
215 (get-buff-size [buffer]) Get buffer line count.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
216 (insert-buff-line-list {linenr} {string/string-list} [buffer])
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
217 Insert a list of lines into a buffer after
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
218 {linenr}. If {linenr} is 0, lines will be
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
219 inserted at start.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
220 (curr-buff) Get the current buffer. Use procedures
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1620
diff changeset
221 from "vimcmd" module to change it.
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
222 (buff-count) Get count of total buffers in the editor.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
223 (get-next-buff [buffer]) Get next buffer.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
224 (get-prev-buff [buffer]) Get previous buffer. Return #f when there
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
225 are no more buffers.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
226 (open-buff {filename}) Open a new buffer (for file "name")
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
227 (get-buff-by-name {buffername}) Get a buffer by its filename or #f
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
228 if there is no such buffer.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
229 (get-buff-by-num {buffernum}) Get a buffer by its number (return #f if
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
230 there is no buffer with this number).
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
231 (get-buff-namespace [buffer]) Get buffer namespace.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
232
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
233 Windows *mzscheme-window*
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
234 ------
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
235 (win? {object}) Is object a window?
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
236 (win-valid? {object}) Is object a valid window (i.e. corresponds
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
237 to the real Vim window)?
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
238 (curr-win) Get the current window.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
239 (win-count) Get count of windows.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
240 (get-win-num [window]) Get window number.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
241 (get-win-by-num {windownum}) Get window by its number.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
242 (get-win-buffer [window]) Get the buffer for a given window.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
243 (get-win-height [window])
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
244 (set-win-height {height} [window]) Get/Set height of window.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
245 (get-win-width [window])
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
246 (set-win-width {width} [window])Get/Set width of window.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
247 (get-win-list [buffer]) Get list of windows for a buffer.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
248 (get-cursor [window]) Get cursor position in a window as
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
249 a pair (linenr . column).
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
250 (set-cursor (line . col) [window]) Set cursor position.
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
251
625
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
252 ==============================================================================
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
253 5. Dynamic loading *mzscheme-dynamic*
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
254
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
255 On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version|
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
256 output then includes |+mzscheme/dyn|.
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
257
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
258 This means that Vim will search for the MzScheme DLL files only when needed.
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
259 When you don't use the MzScheme interface you don't need them, thus you can
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
260 use Vim without these DLL files.
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
261
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
262 To use the MzScheme interface the MzScheme DLLs must be in your search path.
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
263 In a console window type "path" to see what directories are used.
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
264
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
265 The names of the DLLs must match the MzScheme version Vim was compiled with.
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
266 For MzScheme version 209 they will be "libmzsch209_000.dll" and
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
267 "libmzgc209_000.dll". To know for sure look at the output of the ":version"
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
268 command, look for -DDYNAMIC_MZSCH_DLL="something" and
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
269 -DDYNAMIC_MZGC_DLL="something" in the "Compilation" info.
625
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 273
diff changeset
270
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
271 ======================================================================
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
272 vim:tw=78:ts=8:sts=4:ft=help:norl: