-*eval.txt* For Vim version 7.0aa. Last change: 2006 Jan 31
+*eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 03
VIM REFERENCE MANUAL by Bram Moolenaar
char2nr(" ") returns 32
char2nr("ABC") returns 65
< The current 'encoding' is used. Example for "utf-8": >
- char2nr("á") returns 225
- char2nr("á"[0]) returns 195
+ char2nr("?") returns 225
+ char2nr("?"[0]) returns 195
< nr2char() does the opposite.
cindent({lnum}) *cindent()*
Often used items are:
%s string
- %6s string right-aligned in 6 characters
+ %6s string right-aligned in 6 bytes
+ %.9s string truncated to 9 bytes
%c single byte
%d decimal number
%5d decimal number padded with spaces to 5 characters
%04x hex number padded with zeros to at least 4 characters
%X hex number using upper case letters
%o octal number
- %% the % character
+ %% the % character itself
Conversion specifications start with '%' and end with the
conversion type. All other characters are copied unchanged to
field-width
An optional decimal digit string specifying a minimum
- field width. If the converted value has fewer
- characters than the field width, it will be padded
- with spaces on the left (or right, if the
- left-adjustment flag has been given) to fill out the
- field width.
+ field width. If the converted value has fewer bytes
+ than the field width, it will be padded with spaces on
+ the left (or right, if the left-adjustment flag has
+ been given) to fill out the field width.
.precision
An optional precision, in the form of a period '.'
string is omitted, the precision is taken as zero.
This gives the minimum number of digits to appear for
d, o, x, and X conversions, or the maximum number of
- characters to be printed from a string for s
- conversions.
+ bytes to be printed from a string for s conversions.
type
A character that specifies the type of conversion to
When the [abort] argument is added, the function will
abort as soon as an error is detected.
- The last used search pattern and the redo command "."
- will not be changed by the function.
When the [dict] argument is added, the function must
be invoked through an entry in a Dictionary. The
local variable "self" will then be set to the
dictionary. See |Dictionary-function|.
+ The last used search pattern and the redo command "."
+ will not be changed by the function.
+
*:endf* *:endfunction* *E126* *E193*
:endf[unction] The end of a function definition. Must be on a line
by its own, without other commands.
-*options.txt* For Vim version 7.0aa. Last change: 2006 Jan 31
+*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 02
VIM REFERENCE MANUAL by Bram Moolenaar
files twice.
How the related spell files are found is explained here: |spell-load|.
+ If the |spellfile.vim| plugin is active and you use a language name
+ for which Vim cannot find the .spl file in 'runtimepath' the plugin
+ will ask you if you want to download the file.
+
After this option has been set successfully, Vim will source the files
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
up to the first comma, dot or underscore.
/* Used for an error (down from) vim_regcomp(): give the error message, set
* rc_did_emsg and return NULL */
-#define EMSG_RET_NULL(m) return (EMSG(m), rc_did_emsg = TRUE, NULL)
-#define EMSG_M_RET_NULL(m, c) return (EMSG2((m), (c) ? "" : "\\"), rc_did_emsg = TRUE, NULL)
+#define EMSG_RET_NULL(m) return (EMSG(m), rc_did_emsg = TRUE, (void *)NULL)
+#define EMSG_M_RET_NULL(m, c) return (EMSG2((m), (c) ? "" : "\\"), rc_did_emsg = TRUE, (void *)NULL)
#define EMSG_RET_FAIL(m) return (EMSG(m), rc_did_emsg = TRUE, FAIL)
#define EMSG_ONE_RET_NULL EMSG_M_RET_NULL(_("E369: invalid item in %s%%[]"), reg_magic == MAGIC_ALL)