Mercurial > vim
comparison runtime/doc/eval.txt @ 3237:91e53bcb7946
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 30 Dec 2011 13:11:27 +0100 |
parents | 8b8ef1fed009 |
children | ba708ee8d69d |
comparison
equal
deleted
inserted
replaced
3236:12a5ea0526b1 | 3237:91e53bcb7946 |
---|---|
1 *eval.txt* For Vim version 7.3. Last change: 2011 Dec 14 | 1 *eval.txt* For Vim version 7.3. Last change: 2011 Dec 19 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
3939 | 3939 |
3940 line2byte({lnum}) *line2byte()* | 3940 line2byte({lnum}) *line2byte()* |
3941 Return the byte count from the start of the buffer for line | 3941 Return the byte count from the start of the buffer for line |
3942 {lnum}. This includes the end-of-line character, depending on | 3942 {lnum}. This includes the end-of-line character, depending on |
3943 the 'fileformat' option for the current buffer. The first | 3943 the 'fileformat' option for the current buffer. The first |
3944 line returns 1. | 3944 line returns 1. 'encoding' matters, 'fileencoding' is ignored. |
3945 This can also be used to get the byte count for the line just | 3945 This can also be used to get the byte count for the line just |
3946 below the last line: > | 3946 below the last line: > |
3947 line2byte(line("$") + 1) | 3947 line2byte(line("$") + 1) |
3948 < This is the file size plus one. | 3948 < This is the buffer size plus one. If 'fileencoding' is empty |
3949 it is the file size plus one. | |
3949 When {lnum} is invalid, or the |+byte_offset| feature has been | 3950 When {lnum} is invalid, or the |+byte_offset| feature has been |
3950 disabled at compile time, -1 is returned. | 3951 disabled at compile time, -1 is returned. |
3951 Also see |byte2line()|, |go| and |:goto|. | 3952 Also see |byte2line()|, |go| and |:goto|. |
3952 | 3953 |
3953 lispindent({lnum}) *lispindent()* | 3954 lispindent({lnum}) *lispindent()* |