Mercurial > vim
comparison runtime/doc/insert.txt @ 818:1f929f3ca806 v7.0c03
updated for version 7.0c03
author | vimboss |
---|---|
date | Wed, 29 Mar 2006 21:18:24 +0000 |
parents | 4a79d6d376f0 |
children | 23f82b5d2814 |
comparison
equal
deleted
inserted
replaced
817:6897668c467f | 818:1f929f3ca806 |
---|---|
1 *insert.txt* For Vim version 7.0c. Last change: 2006 Mar 28 | 1 *insert.txt* For Vim version 7.0c. Last change: 2006 Mar 29 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
1212 | 1212 |
1213 | 1213 |
1214 CSS *ft-css-omni* | 1214 CSS *ft-css-omni* |
1215 | 1215 |
1216 Complete properties and their appropriate values according to CSS 2.1 | 1216 Complete properties and their appropriate values according to CSS 2.1 |
1217 specification. | 1217 specification. |
1218 | 1218 |
1219 | 1219 |
1220 HTML and XHTML *ft-html-omni* | 1220 HTML *ft-html-omni* |
1221 *ft-xhtml-omni* | 1221 XHTML *ft-xhtml-omni* |
1222 | 1222 |
1223 CTRL-X CTRL-O provides completion of various elements of (X)HTML files. It is | 1223 CTRL-X CTRL-O provides completion of various elements of (X)HTML files. It is |
1224 designed to support writing of XHTML 1.0 Strict files but will also works for | 1224 designed to support writing of XHTML 1.0 Strict files but will also works for |
1225 other versions of HTML. Features: | 1225 other versions of HTML. Features: |
1226 | 1226 |
1237 - when completing values of events attributes or working inside of "script" | 1237 - when completing values of events attributes or working inside of "script" |
1238 tag switch to |ft-javascript-omni| completion | 1238 tag switch to |ft-javascript-omni| completion |
1239 - when used after "</" CTRL-X CTRL-O will close the last opened tag | 1239 - when used after "</" CTRL-X CTRL-O will close the last opened tag |
1240 | 1240 |
1241 Note: When used first time completion menu will be shown with little delay | 1241 Note: When used first time completion menu will be shown with little delay |
1242 - this is time needed for loading of data file. | 1242 - this is time needed for loading of data file. |
1243 Note: Completion may fail in badly formatted documents. In such case try to | 1243 Note: Completion may fail in badly formatted documents. In such case try to |
1244 run |:make| command to detect formatting problems. | 1244 run |:make| command to detect formatting problems. |
1245 | 1245 |
1246 | 1246 |
1247 JAVASCRIPT *ft-javascript-omni* | 1247 JAVASCRIPT *ft-javascript-omni* |
1248 | 1248 |
1249 Completion of most elements of JavaScript language and DOM elements. | 1249 Completion of most elements of JavaScript language and DOM elements. |
1250 | 1250 |
1251 Complete: | 1251 Complete: |
1252 | 1252 |
1258 - keywords of language | 1258 - keywords of language |
1259 | 1259 |
1260 Completion works in separate JavaScript files (&ft==javascript), inside of | 1260 Completion works in separate JavaScript files (&ft==javascript), inside of |
1261 <script> tag of (X)HTML and in values of event attributes (including scanning | 1261 <script> tag of (X)HTML and in values of event attributes (including scanning |
1262 of external files. | 1262 of external files. |
1263 | 1263 |
1264 DOM compatibility | 1264 DOM compatibility |
1265 | 1265 |
1266 At the moment (beginning of 2006) there are two main browsers - MS Internet | 1266 At the moment (beginning of 2006) there are two main browsers - MS Internet |
1267 Explorer and Mozilla Firefox. These two applications are covering over 90% of | 1267 Explorer and Mozilla Firefox. These two applications are covering over 90% of |
1268 market. Theoretically standards are created by W3C organisation | 1268 market. Theoretically standards are created by W3C organisation |
1269 (http://www.w3c.org) but they are not always followed/implemented. | 1269 (http://www.w3c.org) but they are not always followed/implemented. |
1270 | 1270 |
1271 IE FF W3C Omni completion ~ | 1271 IE FF W3C Omni completion ~ |
1272 +/- +/- + + ~ | 1272 +/- +/- + + ~ |
1273 + + - + ~ | 1273 + + - + ~ |
1274 + - - - ~ | 1274 + - - - ~ |
1275 - + - - ~ | 1275 - + - - ~ |
1276 | 1276 |
1277 Regardless from state of implementation in browsers but if element is defined | 1277 Regardless from state of implementation in browsers but if element is defined |
1278 in standards, completion plugin will place element in suggestion list. When | 1278 in standards, completion plugin will place element in suggestion list. When |
1279 both major engines implemented element, even if this is not in standards it | 1279 both major engines implemented element, even if this is not in standards it |
1280 will be suggested. All other elements are not placed in suggestion list. | 1280 will be suggested. All other elements are not placed in suggestion list. |
1281 | 1281 |
1282 | 1282 |
1283 PHP *ft-php-omni* | 1283 PHP *ft-php-omni* |
1284 | 1284 |
1285 Completion of PHP code requires tags file for completion of data from external | 1285 Completion of PHP code requires tags file for completion of data from external |
1286 files. You should use Exuberant ctags version 5.5.4 or newer. You can find it | 1286 files. You should use Exuberant ctags version 5.5.4 or newer. You can find it |
1287 here: http://ctags.sourceforge.net/ | 1287 here: http://ctags.sourceforge.net/ |
1288 | 1288 |
1315 | 1315 |
1316 This uses the current syntax highlighting for completion. It can be used for | 1316 This uses the current syntax highlighting for completion. It can be used for |
1317 any filetype and provides a minimal language-sensitive completion. | 1317 any filetype and provides a minimal language-sensitive completion. |
1318 | 1318 |
1319 To enable syntax code completion you can run: > | 1319 To enable syntax code completion you can run: > |
1320 setlocal omnifunc=syntaxcomplete#Complete | 1320 setlocal omnifunc=syntaxcomplete#Complete |
1321 | 1321 |
1322 You can automate this by placing the following in your vimrc (after any | 1322 You can automate this by placing the following in your vimrc (after any |
1323 ":filetype" command): > | 1323 ":filetype" command): > |
1324 if has("autocmd") && exists("+omnifunc") | 1324 if has("autocmd") && exists("+omnifunc") |
1325 autocmd Filetype * | 1325 autocmd Filetype * |
1326 \ if &omnifunc == "" | | 1326 \ if &omnifunc == "" | |
1327 \ setlocal omnifunc=syntaxcomplete#Complete | | 1327 \ setlocal omnifunc=syntaxcomplete#Complete | |
1328 \ endif | 1328 \ endif |
1329 endif | 1329 endif |
1330 | 1330 |
1331 The above will set completion to this script only if a specific plugin does | 1331 The above will set completion to this script only if a specific plugin does |
1332 not already exist for that filetype. | 1332 not already exist for that filetype. |
1333 | 1333 |
1364 groups: > | 1364 groups: > |
1365 let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods' | 1365 let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods' |
1366 | 1366 |
1367 You can create as many of these variables as you need, varying only the | 1367 You can create as many of these variables as you need, varying only the |
1368 filetype at the end of the variable name. | 1368 filetype at the end of the variable name. |
1369 | |
1370 | |
1371 SQL *ft-sql-omni* | |
1372 | |
1373 Completion for the SQL language includes statements, functions, keywords. | |
1374 It will also dynamically complete tables, procedures, views and column lists | |
1375 with data pulled directly from within a database. For detailed instructions | |
1376 and a tutorial see |omni-sql-completion|. | |
1369 | 1377 |
1370 | 1378 |
1371 XML *ft-xml-omni* | 1379 XML *ft-xml-omni* |
1372 | 1380 |
1373 Vim 7 provides mechanism to context aware completion of XML files. It depends | 1381 Vim 7 provides mechanism to context aware completion of XML files. It depends |
1392 have meaningful name which will be used in commands. It should be unique name | 1400 have meaningful name which will be used in commands. It should be unique name |
1393 which will not create conflicts in future. For example name xhtml10s.vim means | 1401 which will not create conflicts in future. For example name xhtml10s.vim means |
1394 it is data file for XHTML 1.0 Strict. | 1402 it is data file for XHTML 1.0 Strict. |
1395 | 1403 |
1396 File contains one variable with fixed name: g:xmldata_xhtml10s . It is | 1404 File contains one variable with fixed name: g:xmldata_xhtml10s . It is |
1397 compound from two parts: | 1405 compound from two parts: |
1398 | 1406 |
1399 1. "g:xmldata_" general prefix | 1407 1. "g:xmldata_" general prefix |
1400 2. "xhtml10s" name of file and name of described XML dialect | 1408 2. "xhtml10s" name of file and name of described XML dialect |
1401 | 1409 |
1402 Part two must be exactly the same as name of file. | 1410 Part two must be exactly the same as name of file. |
1403 | 1411 |
1404 Variable is data structure in form of |Dictionary|. Keys are tag names and | 1412 Variable is data structure in form of |Dictionary|. Keys are tag names and |
1405 values are two element |List|. First element of List is also List with names | 1413 values are two element |List|. First element of List is also List with names |
1406 of possible children, second element is |Dictionary| with names of attributes | 1414 of possible children, second element is |Dictionary| with names of attributes |
1407 as keys and possible values of attributes as values. Example: > | 1415 as keys and possible values of attributes as values. Example: > |
1408 | 1416 |
1409 let g:xmldata_crippledhtml = { | 1417 let g:xmldata_crippledhtml = { |
1410 \ "html": | 1418 \ "html": |
1411 \ [ ["body", "head"], {"id": [], "xmlns": ["http://www.w3.org/1999/xhtml"], | 1419 \ [ ["body", "head"], {"id": [], "xmlns": ["http://www.w3.org/1999/xhtml"], |
1412 \ "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}], | 1420 \ "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}], |
1413 \ "script": | 1421 \ "script": |
1414 \ [ [], {"id": [], "charset": [], "type": ["text/javascript"], "src": [], | 1422 \ [ [], {"id": [], "charset": [], "type": ["text/javascript"], "src": [], |
1415 \ "defer": ["BOOL"], "xml:space": ["preserve"]}], | 1423 \ "defer": ["BOOL"], "xml:space": ["preserve"]}], |
1416 \ "meta": | 1424 \ "meta": |
1417 \ [ [], {"id": [], "http-equiv": [], "name": [], "content": [], "scheme": | 1425 \ [ [], {"id": [], "http-equiv": [], "name": [], "content": [], "scheme": |
1418 \ [], "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}] | 1426 \ [], "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}] |
1419 \ "vimxmlentities": ["amp", "lt", "gt", "apos", "quot"]}, | 1427 \ "vimxmlentities": ["amp", "lt", "gt", "apos", "quot"]}, |
1420 \ "vimxmltaginfo": { | 1428 \ "vimxmltaginfo": { |
1421 \ 'meta': ['/>', '']}, | 1429 \ 'meta': ['/>', '']}, |
1422 \ "vimxmlattrinfo": { | 1430 \ "vimxmlattrinfo": { |