Mercurial > vim
comparison runtime/doc/insert.txt @ 625:81fe2ccc1207 v7.0179
updated for version 7.0179
author | vimboss |
---|---|
date | Thu, 12 Jan 2006 23:22:24 +0000 |
parents | 9e359e5759f6 |
children | 9032e4668296 |
comparison
equal
deleted
inserted
replaced
624:91e7d4a7b3b0 | 625:81fe2ccc1207 |
---|---|
1 *insert.txt* For Vim version 7.0aa. Last change: 2005 Dec 28 | 1 *insert.txt* For Vim version 7.0aa. Last change: 2006 Jan 08 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
352 <MouseDown> scroll three lines down *i_<MouseDown>* | 352 <MouseDown> scroll three lines down *i_<MouseDown>* |
353 <S-MouseDown> scroll a full page down *i_<S-MouseDown>* | 353 <S-MouseDown> scroll a full page down *i_<S-MouseDown>* |
354 <MouseUp> scroll three lines up *i_<MouseUp>* | 354 <MouseUp> scroll three lines up *i_<MouseUp>* |
355 <S-MouseUp> scroll a full page up *i_<S-MouseUp>* | 355 <S-MouseUp> scroll a full page up *i_<S-MouseUp>* |
356 CTRL-O execute one command, return to Insert mode *i_CTRL-O* | 356 CTRL-O execute one command, return to Insert mode *i_CTRL-O* |
357 CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O* | 357 CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O* |
358 CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L* | 358 CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L* |
359 CTRL-G u break undo sequence, start new change *i_CTRL-G_u* | 359 CTRL-G u break undo sequence, start new change *i_CTRL-G_u* |
360 ----------------------------------------------------------------------- | 360 ----------------------------------------------------------------------- |
361 | 361 |
362 Note: If the cursor keys take you out of Insert mode, check the 'noesckeys' | 362 Note: If the cursor keys take you out of Insert mode, check the 'noesckeys' |
961 - The terminal supports at least 8 colors. | 961 - The terminal supports at least 8 colors. |
962 - There are at least two matches. | 962 - There are at least two matches. |
963 | 963 |
964 While the menu is displayed these keys have a special meaning: | 964 While the menu is displayed these keys have a special meaning: |
965 <CR> and <Enter>: Accept the currently selected match | 965 <CR> and <Enter>: Accept the currently selected match |
966 <Up>: Select the previous match, as if CTRL-P was used | 966 <Up>: Select the previous match, as if CTRL-P was used |
967 <Down>: Select the next match, as if CTRL-N was used | 967 <Down>: Select the next match, as if CTRL-N was used |
968 <PageUp>: Select a match several entries back | 968 <PageUp>: Select a match several entries back |
969 <PageDown>: Select a match several entries further | 969 <PageDown>: Select a match several entries further |
970 | 970 |
971 The colors of the menu can be changed with these highlight groups: | 971 The colors of the menu can be changed with these highlight groups: |
972 Pmenu normal item |hl-Pmenu| | 972 Pmenu normal item |hl-Pmenu| |
1008 declarations are recognized. Preprocessor stuff may cause confusion. | 1008 declarations are recognized. Preprocessor stuff may cause confusion. |
1009 When the same structure name appears in multiple places all possible members | 1009 When the same structure name appears in multiple places all possible members |
1010 are included. | 1010 are included. |
1011 | 1011 |
1012 | 1012 |
1013 CSS *ft-css-omni* | 1013 CSS *ft-css-omni* |
1014 | 1014 |
1015 Complete properties and their appropriate values according to CSS 2.1 | 1015 Complete properties and their appropriate values according to CSS 2.1 |
1016 specification. | 1016 specification. |
1017 | 1017 |
1018 | 1018 |
1019 (X)HTML *ft-html-omni* | 1019 (X)HTML *ft-html-omni* |
1020 *ft-xhtml-omni* | 1020 *ft-xhtml-omni* |
1021 | 1021 |
1022 CTRL-X CTRL-O provides completion of various elements of (X)HTML files. | 1022 CTRL-X CTRL-O provides completion of various elements of (X)HTML files. |
1023 It is designed to support writing of XHTML 1.0 Strict files but will | 1023 It is designed to support writing of XHTML 1.0 Strict files but will |
1024 also works for other versions of HTML. Features: | 1024 also works for other versions of HTML. Features: |
1025 | 1025 |
1038 | 1038 |
1039 Note: When used first time completion menu will be shown with little delay | 1039 Note: When used first time completion menu will be shown with little delay |
1040 - this is time needed for loading of data file. | 1040 - this is time needed for loading of data file. |
1041 | 1041 |
1042 | 1042 |
1043 XML *ft-xml-omni* | 1043 SYNTAX *ft-syntax-omni* |
1044 | |
1045 This uses the current syntax highlighting for completion. It can be used for | |
1046 any filetype and provides a minimal language-sensitive completion. | |
1047 | |
1048 To enable code completion do: > | |
1049 source $VIMRUNTIME/autoload/syntaxcomplete.vim | |
1050 | |
1051 You can automate this by placing this in your vimrc (after any ":filetype" | |
1052 command): > | |
1053 autocmd Filetype * | |
1054 \ if exists('&ofu') && &ofu == "" | | |
1055 \ source $VIMRUNTIME/autoload/syntaxcomplete.vim | | |
1056 \ endif | |
1057 | |
1058 The above will set completion to this script only if a proper one does not | |
1059 already exist for that filetype. | |
1060 | |
1061 | |
1062 XML *ft-xml-omni* | |
1044 | 1063 |
1045 Vim 7 provides mechanism to context aware completion of XML files. It depends | 1064 Vim 7 provides mechanism to context aware completion of XML files. It depends |
1046 on special |xml-omni-datafile| and two commands: |:XMLns| and |:XMLent|. | 1065 on special |xml-omni-datafile| and two commands: |:XMLns| and |:XMLent|. |
1047 Features are: | 1066 Features are: |
1048 | 1067 |
1054 them | 1073 them |
1055 - complete names of entities (defined in |xml-omni-datafile| and in current file | 1074 - complete names of entities (defined in |xml-omni-datafile| and in current file |
1056 with "<!ENTITY" declarations | 1075 with "<!ENTITY" declarations |
1057 - when used after "</" CTRL-X CTRL-O will close the last opened tag | 1076 - when used after "</" CTRL-X CTRL-O will close the last opened tag |
1058 | 1077 |
1059 Format of XML data file *xml-omni-datafile* | 1078 Format of XML data file *xml-omni-datafile* |
1060 | 1079 |
1061 Vim distribution provides two data files as examples (xhtml10s.vim, xsl.vim) | 1080 Vim distribution provides two data files as examples (xhtml10s.vim, xsl.vim) |
1062 | 1081 |
1063 XML data files are stored in "autoload/xml" directory in 'runtimepath'. They | 1082 XML data files are stored in "autoload/xml" directory in 'runtimepath'. They |
1064 have meaningful name which will be used in commands. It should be unique name | 1083 have meaningful name which will be used in commands. It should be unique name |
1103 Note: Tag names in data file MUST not contain namespace description. Check | 1122 Note: Tag names in data file MUST not contain namespace description. Check |
1104 xsl.vim for example. | 1123 xsl.vim for example. |
1105 | 1124 |
1106 Commands | 1125 Commands |
1107 | 1126 |
1108 :XMLns {name} [{namespace}] *:XMLns* | 1127 :XMLns {name} [{namespace}] *:XMLns* |
1109 | 1128 |
1110 Vim has to know which data file should be used and with which namespace. For | 1129 Vim has to know which data file should be used and with which namespace. For |
1111 loading of data file and connecting data with prope namespace use |:XMLns| | 1130 loading of data file and connecting data with prope namespace use |:XMLns| |
1112 command. First (obligatory) argument is name of data (xhtml10s, xsl). Second | 1131 command. First (obligatory) argument is name of data (xhtml10s, xsl). Second |
1113 argument is code of namespace (h, xsl). When used without second argument | 1132 argument is code of namespace (h, xsl). When used without second argument |
1116 | 1135 |
1117 :XMLns xhtml10s | 1136 :XMLns xhtml10s |
1118 :XMLns xsl xsl | 1137 :XMLns xsl xsl |
1119 | 1138 |
1120 | 1139 |
1121 :XMLent {name} *:XMLent* | 1140 :XMLent {name} *:XMLent* |
1122 | 1141 |
1123 By default entities will be completed from data file of default | 1142 By default entities will be completed from data file of default |
1124 namespace. XMLent command should be used in case when there is no | 1143 namespace. XMLent command should be used in case when there is no |
1125 default namespace: > | 1144 default namespace: > |
1126 | 1145 |
1127 :XMLent xhtml10s | 1146 :XMLent xhtml10s |
1128 | 1147 |
1129 Usage | 1148 Usage |
1130 | 1149 |
1131 While used in situation (after declarations from previous part, | is | 1150 While used in situation (after declarations from previous part, | is |
1132 cursor position): > | 1151 cursor position): > |
1133 | 1152 |
1134 <| | 1153 <| |
1135 | 1154 |
1136 Will complete to appropriate XHTML tag, and in this situation: > | 1155 Will complete to appropriate XHTML tag, and in this situation: > |
1137 | 1156 |
1138 <xsl:| | 1157 <xsl:| |
1139 | 1158 |
1140 Will complete to appropriate XSL tag. | 1159 Will complete to appropriate XSL tag. |
1141 | 1160 |
1142 File xmlcomplete.vim provides through |autoload| mechanism | 1161 File xmlcomplete.vim provides through |autoload| mechanism |
1143 GetLastOpenTag function which can be used in XML files to get name of | 1162 GetLastOpenTag function which can be used in XML files to get name of |
1144 last open tag with (b:unaryTagsStack has to be defined): > | 1163 last open tag with (b:unaryTagsStack has to be defined): > |
1145 | 1164 |
1146 :echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack") | 1165 :echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack") |
1147 | 1166 |
1148 | 1167 |
1149 | 1168 |
1150 | 1169 |
1151 | 1170 |