Mercurial > vim
comparison runtime/doc/eval.txt @ 9:4102fb4ea781 v7.0002
updated for version 7.0002
author | vimboss |
---|---|
date | Sun, 20 Jun 2004 12:51:53 +0000 |
parents | 3fc0f57ecb91 |
children | 4e2284e71352 |
comparison
equal
deleted
inserted
replaced
8:7edf9b6e4c36 | 9:4102fb4ea781 |
---|---|
1 *eval.txt* For Vim version 7.0aa. Last change: 2004 May 18 | 1 *eval.txt* For Vim version 7.0aa. Last change: 2004 Jun 20 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
513 | 513 |
514 let s:counter = 0 | 514 let s:counter = 0 |
515 command Tick let s:counter = s:counter + 1 | echo s:counter | 515 command Tick let s:counter = s:counter + 1 | echo s:counter |
516 | 516 |
517 When calling a function and invoking a user-defined command, the context for | 517 When calling a function and invoking a user-defined command, the context for |
518 script varialbes is set to the script where the function or command was | 518 script variables is set to the script where the function or command was |
519 defined. | 519 defined. |
520 | 520 |
521 The script variables are also available when a function is defined inside a | 521 The script variables are also available when a function is defined inside a |
522 function that is defined in a script. Example: > | 522 function that is defined in a script. Example: > |
523 | 523 |
970 browsing is not possible, an empty string is returned. | 970 browsing is not possible, an empty string is returned. |
971 | 971 |
972 bufexists({expr}) *bufexists()* | 972 bufexists({expr}) *bufexists()* |
973 The result is a Number, which is non-zero if a buffer called | 973 The result is a Number, which is non-zero if a buffer called |
974 {expr} exists. | 974 {expr} exists. |
975 If the {expr} argument is a number, buffer numbers are used. | |
975 If the {expr} argument is a string it must match a buffer name | 976 If the {expr} argument is a string it must match a buffer name |
976 exactly. | 977 exactly. The name can be: |
977 If the {expr} argument is a number buffer numbers are used. | 978 - Relative to the current directory. |
979 - A full path. | |
980 - The name of a buffer with 'filetype' set to "nofile". | |
981 - A URL name. | |
978 Unlisted buffers will be found. | 982 Unlisted buffers will be found. |
979 Note that help files are listed by their short name in the | 983 Note that help files are listed by their short name in the |
980 output of |:buffers|, but bufexists() requires using their | 984 output of |:buffers|, but bufexists() requires using their |
981 long name to be able to find them. | 985 long name to be able to find them. |
982 Use "bufexists(0)" to test for the existence of an alternate | 986 Use "bufexists(0)" to test for the existence of an alternate |
985 Obsolete name: buffer_exists(). | 989 Obsolete name: buffer_exists(). |
986 | 990 |
987 buflisted({expr}) *buflisted()* | 991 buflisted({expr}) *buflisted()* |
988 The result is a Number, which is non-zero if a buffer called | 992 The result is a Number, which is non-zero if a buffer called |
989 {expr} exists and is listed (has the 'buflisted' option set). | 993 {expr} exists and is listed (has the 'buflisted' option set). |
990 The {expr} argument is used like with bufexists(). | 994 The {expr} argument is used like with |bufexists()|. |
991 | 995 |
992 bufloaded({expr}) *bufloaded()* | 996 bufloaded({expr}) *bufloaded()* |
993 The result is a Number, which is non-zero if a buffer called | 997 The result is a Number, which is non-zero if a buffer called |
994 {expr} exists and is loaded (shown in a window or hidden). | 998 {expr} exists and is loaded (shown in a window or hidden). |
995 The {expr} argument is used like with bufexists(). | 999 The {expr} argument is used like with |bufexists()|. |
996 | 1000 |
997 bufname({expr}) *bufname()* | 1001 bufname({expr}) *bufname()* |
998 The result is the name of a buffer, as it is displayed by the | 1002 The result is the name of a buffer, as it is displayed by the |
999 ":ls" command. | 1003 ":ls" command. |
1000 If {expr} is a Number, that buffer number's name is given. | 1004 If {expr} is a Number, that buffer number's name is given. |
1231 | 1235 |
1232 executable({expr}) *executable()* | 1236 executable({expr}) *executable()* |
1233 This function checks if an executable with the name {expr} | 1237 This function checks if an executable with the name {expr} |
1234 exists. {expr} must be the name of the program without any | 1238 exists. {expr} must be the name of the program without any |
1235 arguments. executable() uses the normal $PATH. | 1239 arguments. executable() uses the normal $PATH. |
1240 On MS-DOS and MS-Windows the ".exe", ".bat", etc. must be | |
1241 included. It only checks if the file exists and is not a | |
1242 directory, not if it's really executable. | |
1236 The result is a Number: | 1243 The result is a Number: |
1237 1 exists | 1244 1 exists |
1238 0 does not exist | 1245 0 does not exist |
1239 -1 not implemented on this system | 1246 -1 not implemented on this system |
1240 | 1247 |
1908 line("'" . marker) line number of mark marker | 1915 line("'" . marker) line number of mark marker |
1909 < *last-position-jump* | 1916 < *last-position-jump* |
1910 This autocommand jumps to the last known position in a file | 1917 This autocommand jumps to the last known position in a file |
1911 just after opening it, if the '" mark is set: > | 1918 just after opening it, if the '" mark is set: > |
1912 :au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif | 1919 :au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif |
1913 < | 1920 |
1914 line2byte({lnum}) *line2byte()* | 1921 line2byte({lnum}) *line2byte()* |
1915 Return the byte count from the start of the buffer for line | 1922 Return the byte count from the start of the buffer for line |
1916 {lnum}. This includes the end-of-line character, depending on | 1923 {lnum}. This includes the end-of-line character, depending on |
1917 the 'fileformat' option for the current buffer. The first | 1924 the 'fileformat' option for the current buffer. The first |
1918 line returns 1. | 1925 line returns 1. |
2744 footer Compiled with GUI footer support. |gui-footer| | 2751 footer Compiled with GUI footer support. |gui-footer| |
2745 fork Compiled to use fork()/exec() instead of system(). | 2752 fork Compiled to use fork()/exec() instead of system(). |
2746 gettext Compiled with message translation |multi-lang| | 2753 gettext Compiled with message translation |multi-lang| |
2747 gui Compiled with GUI enabled. | 2754 gui Compiled with GUI enabled. |
2748 gui_athena Compiled with Athena GUI. | 2755 gui_athena Compiled with Athena GUI. |
2749 gui_beos Compiled with BeOs GUI. | 2756 gui_beos Compiled with BeOS GUI. |
2750 gui_gtk Compiled with GTK+ GUI (any version). | 2757 gui_gtk Compiled with GTK+ GUI (any version). |
2751 gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined). | 2758 gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined). |
2752 gui_mac Compiled with Macintosh GUI. | 2759 gui_mac Compiled with Macintosh GUI. |
2753 gui_motif Compiled with Motif GUI. | 2760 gui_motif Compiled with Motif GUI. |
2754 gui_photon Compiled with Photon GUI. | 2761 gui_photon Compiled with Photon GUI. |
2799 ruby Compiled with Ruby interface |ruby|. | 2806 ruby Compiled with Ruby interface |ruby|. |
2800 scrollbind Compiled with 'scrollbind' support. | 2807 scrollbind Compiled with 'scrollbind' support. |
2801 showcmd Compiled with 'showcmd' support. | 2808 showcmd Compiled with 'showcmd' support. |
2802 signs Compiled with |:sign| support. | 2809 signs Compiled with |:sign| support. |
2803 smartindent Compiled with 'smartindent' support. | 2810 smartindent Compiled with 'smartindent' support. |
2804 sniff Compiled with SniFF interface support. | 2811 sniff Compiled with SNiFF interface support. |
2805 statusline Compiled with support for 'statusline', 'rulerformat' | 2812 statusline Compiled with support for 'statusline', 'rulerformat' |
2806 and special formats of 'titlestring' and 'iconstring'. | 2813 and special formats of 'titlestring' and 'iconstring'. |
2807 sun_workshop Compiled with support for Sun |workshop|. | 2814 sun_workshop Compiled with support for Sun |workshop|. |
2808 syntax Compiled with syntax highlighting support. | 2815 syntax Compiled with syntax highlighting support. |
2809 syntax_items There are active syntax highlighting items for the | 2816 syntax_items There are active syntax highlighting items for the |