Mercurial > vim
comparison runtime/doc/usr_41.txt @ 2301:6f63294a1781 vim73
Avoid use of the GTK mail_loop() so that the GtkFileChooser can be used.
(James Vega)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 11 Jul 2010 19:01:06 +0200 |
parents | b17bbfa96fa0 |
children | f177a6431514 |
comparison
equal
deleted
inserted
replaced
2300:486fb50528f0 | 2301:6f63294a1781 |
---|---|
574 | 574 |
575 There are many functions. We will mention them here, grouped by what they are | 575 There are many functions. We will mention them here, grouped by what they are |
576 used for. You can find an alphabetical list here: |functions|. Use CTRL-] on | 576 used for. You can find an alphabetical list here: |functions|. Use CTRL-] on |
577 the function name to jump to detailed help on it. | 577 the function name to jump to detailed help on it. |
578 | 578 |
579 String manipulation: | 579 String manipulation: *string-functions* |
580 nr2char() get a character by its ASCII value | 580 nr2char() get a character by its ASCII value |
581 char2nr() get ASCII value of a character | 581 char2nr() get ASCII value of a character |
582 str2nr() convert a string to a Number | 582 str2nr() convert a string to a Number |
583 str2float() convert a string to a Float | 583 str2float() convert a string to a Float |
584 printf() format a string according to % items | 584 printf() format a string according to % items |
603 iconv() convert text from one encoding to another | 603 iconv() convert text from one encoding to another |
604 byteidx() byte index of a character in a string | 604 byteidx() byte index of a character in a string |
605 repeat() repeat a string multiple times | 605 repeat() repeat a string multiple times |
606 eval() evaluate a string expression | 606 eval() evaluate a string expression |
607 | 607 |
608 List manipulation: | 608 List manipulation: *list-functions* |
609 get() get an item without error for wrong index | 609 get() get an item without error for wrong index |
610 len() number of items in a List | 610 len() number of items in a List |
611 empty() check if List is empty | 611 empty() check if List is empty |
612 insert() insert an item somewhere in a List | 612 insert() insert an item somewhere in a List |
613 add() append an item to a List | 613 add() append an item to a List |
628 max() maximum value in a List | 628 max() maximum value in a List |
629 min() minimum value in a List | 629 min() minimum value in a List |
630 count() count number of times a value appears in a List | 630 count() count number of times a value appears in a List |
631 repeat() repeat a List multiple times | 631 repeat() repeat a List multiple times |
632 | 632 |
633 Dictionary manipulation: | 633 Dictionary manipulation: *dict-functions* |
634 get() get an entry without an error for a wrong key | 634 get() get an entry without an error for a wrong key |
635 len() number of entries in a Dictionary | 635 len() number of entries in a Dictionary |
636 has_key() check whether a key appears in a Dictionary | 636 has_key() check whether a key appears in a Dictionary |
637 empty() check if Dictionary is empty | 637 empty() check if Dictionary is empty |
638 remove() remove an entry from a Dictionary | 638 remove() remove an entry from a Dictionary |
647 string() String representation of a Dictionary | 647 string() String representation of a Dictionary |
648 max() maximum value in a Dictionary | 648 max() maximum value in a Dictionary |
649 min() minimum value in a Dictionary | 649 min() minimum value in a Dictionary |
650 count() count number of times a value appears | 650 count() count number of times a value appears |
651 | 651 |
652 Floating point computation: | 652 Floating point computation: *float-functions* |
653 float2nr() convert Float to Number | 653 float2nr() convert Float to Number |
654 abs() absolute value (also works for Number) | 654 abs() absolute value (also works for Number) |
655 round() round off | 655 round() round off |
656 ceil() round up | 656 ceil() round up |
657 floor() round down | 657 floor() round down |
661 sqrt() square root | 661 sqrt() square root |
662 sin() sine | 662 sin() sine |
663 cos() cosine | 663 cos() cosine |
664 atan() arc tangent | 664 atan() arc tangent |
665 | 665 |
666 Variables: | 666 Variables: *var-functions* |
667 type() type of a variable | 667 type() type of a variable |
668 islocked() check if a variable is locked | 668 islocked() check if a variable is locked |
669 function() get a Funcref for a function name | 669 function() get a Funcref for a function name |
670 getbufvar() get a variable value from a specific buffer | 670 getbufvar() get a variable value from a specific buffer |
671 setbufvar() set a variable in a specific buffer | 671 setbufvar() set a variable in a specific buffer |
675 setwinvar() set a variable in a specific window | 675 setwinvar() set a variable in a specific window |
676 settabvar() set a variable in a specific tab page | 676 settabvar() set a variable in a specific tab page |
677 settabwinvar() set a variable in a specific window & tab page | 677 settabwinvar() set a variable in a specific window & tab page |
678 garbagecollect() possibly free memory | 678 garbagecollect() possibly free memory |
679 | 679 |
680 Cursor and mark position: | 680 Cursor and mark position: *cursor-functions* *mark-functions* |
681 col() column number of the cursor or a mark | 681 col() column number of the cursor or a mark |
682 virtcol() screen column of the cursor or a mark | 682 virtcol() screen column of the cursor or a mark |
683 line() line number of the cursor or mark | 683 line() line number of the cursor or mark |
684 wincol() window column number of the cursor | 684 wincol() window column number of the cursor |
685 winline() window line number of the cursor | 685 winline() window line number of the cursor |
688 setpos() set position of cursor, mark, etc. | 688 setpos() set position of cursor, mark, etc. |
689 byte2line() get line number at a specific byte count | 689 byte2line() get line number at a specific byte count |
690 line2byte() byte count at a specific line | 690 line2byte() byte count at a specific line |
691 diff_filler() get the number of filler lines above a line | 691 diff_filler() get the number of filler lines above a line |
692 | 692 |
693 Working with text in the current buffer: | 693 Working with text in the current buffer: *text-functions* |
694 getline() get a line or list of lines from the buffer | 694 getline() get a line or list of lines from the buffer |
695 setline() replace a line in the buffer | 695 setline() replace a line in the buffer |
696 append() append line or list of lines in the buffer | 696 append() append line or list of lines in the buffer |
697 indent() indent of a specific line | 697 indent() indent of a specific line |
698 cindent() indent according to C indenting | 698 cindent() indent according to C indenting |
703 searchpos() find a match for a pattern | 703 searchpos() find a match for a pattern |
704 searchpair() find the other end of a start/skip/end | 704 searchpair() find the other end of a start/skip/end |
705 searchpairpos() find the other end of a start/skip/end | 705 searchpairpos() find the other end of a start/skip/end |
706 searchdecl() search for the declaration of a name | 706 searchdecl() search for the declaration of a name |
707 | 707 |
708 *system-functions* *file-functions* | |
708 System functions and manipulation of files: | 709 System functions and manipulation of files: |
709 glob() expand wildcards | 710 glob() expand wildcards |
710 globpath() expand wildcards in a number of directories | 711 globpath() expand wildcards in a number of directories |
711 findfile() find a file in a list of directories | 712 findfile() find a file in a list of directories |
712 finddir() find a directory in a list of directories | 713 finddir() find a directory in a list of directories |
730 system() get the result of a shell command | 731 system() get the result of a shell command |
731 hostname() name of the system | 732 hostname() name of the system |
732 readfile() read a file into a List of lines | 733 readfile() read a file into a List of lines |
733 writefile() write a List of lines into a file | 734 writefile() write a List of lines into a file |
734 | 735 |
735 Date and Time: | 736 Date and Time: *date-functions* *time-functions* |
736 getftime() get last modification time of a file | 737 getftime() get last modification time of a file |
737 localtime() get current time in seconds | 738 localtime() get current time in seconds |
738 strftime() convert time to a string | 739 strftime() convert time to a string |
739 reltime() get the current or elapsed time accurately | 740 reltime() get the current or elapsed time accurately |
740 reltimestr() convert reltime() result to a string | 741 reltimestr() convert reltime() result to a string |
741 | 742 |
743 *buffer-functions* *window-functions* *arg-functions* | |
742 Buffers, windows and the argument list: | 744 Buffers, windows and the argument list: |
743 argc() number of entries in the argument list | 745 argc() number of entries in the argument list |
744 argidx() current position in the argument list | 746 argidx() current position in the argument list |
745 argv() get one entry from the argument list | 747 argv() get one entry from the argument list |
746 bufexists() check if a buffer exists | 748 bufexists() check if a buffer exists |
754 winnr() get the window number for the current window | 756 winnr() get the window number for the current window |
755 bufwinnr() get the window number of a specific buffer | 757 bufwinnr() get the window number of a specific buffer |
756 winbufnr() get the buffer number of a specific window | 758 winbufnr() get the buffer number of a specific window |
757 getbufline() get a list of lines from the specified buffer | 759 getbufline() get a list of lines from the specified buffer |
758 | 760 |
759 Command line: | 761 Command line: *command-line-functions* |
760 getcmdline() get the current command line | 762 getcmdline() get the current command line |
761 getcmdpos() get position of the cursor in the command line | 763 getcmdpos() get position of the cursor in the command line |
762 setcmdpos() set position of the cursor in the command line | 764 setcmdpos() set position of the cursor in the command line |
763 getcmdtype() return the current command-line type | 765 getcmdtype() return the current command-line type |
764 | 766 |
765 Quickfix and location lists: | 767 Quickfix and location lists: *quickfix-functions* |
766 getqflist() list of quickfix errors | 768 getqflist() list of quickfix errors |
767 setqflist() modify a quickfix list | 769 setqflist() modify a quickfix list |
768 getloclist() list of location list items | 770 getloclist() list of location list items |
769 setloclist() modify a location list | 771 setloclist() modify a location list |
770 | 772 |
771 Insert mode completion: | 773 Insert mode completion: *completion-functions* |
772 complete() set found matches | 774 complete() set found matches |
773 complete_add() add to found matches | 775 complete_add() add to found matches |
774 complete_check() check if completion should be aborted | 776 complete_check() check if completion should be aborted |
775 pumvisible() check if the popup menu is displayed | 777 pumvisible() check if the popup menu is displayed |
776 | 778 |
777 Folding: | 779 Folding: *folding-functions* |
778 foldclosed() check for a closed fold at a specific line | 780 foldclosed() check for a closed fold at a specific line |
779 foldclosedend() like foldclosed() but return the last line | 781 foldclosedend() like foldclosed() but return the last line |
780 foldlevel() check for the fold level at a specific line | 782 foldlevel() check for the fold level at a specific line |
781 foldtext() generate the line displayed for a closed fold | 783 foldtext() generate the line displayed for a closed fold |
782 foldtextresult() get the text displayed for a closed fold | 784 foldtextresult() get the text displayed for a closed fold |
783 | 785 |
784 Syntax and highlighting: | 786 Syntax and highlighting: *syntax-functions* *highlighting-functions* |
785 clearmatches() clear all matches defined by |matchadd()| and | 787 clearmatches() clear all matches defined by |matchadd()| and |
786 the |:match| commands | 788 the |:match| commands |
787 getmatches() get all matches defined by |matchadd()| and | 789 getmatches() get all matches defined by |matchadd()| and |
788 the |:match| commands | 790 the |:match| commands |
789 hlexists() check if a highlight group exists | 791 hlexists() check if a highlight group exists |
797 matchdelete() delete a match defined by |matchadd()| or a | 799 matchdelete() delete a match defined by |matchadd()| or a |
798 |:match| command | 800 |:match| command |
799 setmatches() restore a list of matches saved by | 801 setmatches() restore a list of matches saved by |
800 |getmatches()| | 802 |getmatches()| |
801 | 803 |
802 Spelling: | 804 Spelling: *spell-functions* |
803 spellbadword() locate badly spelled word at or after cursor | 805 spellbadword() locate badly spelled word at or after cursor |
804 spellsuggest() return suggested spelling corrections | 806 spellsuggest() return suggested spelling corrections |
805 soundfold() return the sound-a-like equivalent of a word | 807 soundfold() return the sound-a-like equivalent of a word |
806 | 808 |
807 History: | 809 History: *history-functions* |
808 histadd() add an item to a history | 810 histadd() add an item to a history |
809 histdel() delete an item from a history | 811 histdel() delete an item from a history |
810 histget() get an item from a history | 812 histget() get an item from a history |
811 histnr() get highest index of a history list | 813 histnr() get highest index of a history list |
812 | 814 |
813 Interactive: | 815 Interactive: *interactive-functions* |
814 browse() put up a file requester | 816 browse() put up a file requester |
815 browsedir() put up a directory requester | 817 browsedir() put up a directory requester |
816 confirm() let the user make a choice | 818 confirm() let the user make a choice |
817 getchar() get a character from the user | 819 getchar() get a character from the user |
818 getcharmod() get modifiers for the last typed character | 820 getcharmod() get modifiers for the last typed character |
822 inputsecret() get a line from the user without showing it | 824 inputsecret() get a line from the user without showing it |
823 inputdialog() get a line from the user in a dialog | 825 inputdialog() get a line from the user in a dialog |
824 inputsave() save and clear typeahead | 826 inputsave() save and clear typeahead |
825 inputrestore() restore typeahead | 827 inputrestore() restore typeahead |
826 | 828 |
827 GUI: | 829 GUI: *gui-functions* |
828 getfontname() get name of current font being used | 830 getfontname() get name of current font being used |
829 getwinposx() X position of the GUI Vim window | 831 getwinposx() X position of the GUI Vim window |
830 getwinposy() Y position of the GUI Vim window | 832 getwinposy() Y position of the GUI Vim window |
831 | 833 |
832 Vim server: | 834 Vim server: *server-functions* |
833 serverlist() return the list of server names | 835 serverlist() return the list of server names |
834 remote_send() send command characters to a Vim server | 836 remote_send() send command characters to a Vim server |
835 remote_expr() evaluate an expression in a Vim server | 837 remote_expr() evaluate an expression in a Vim server |
836 server2client() send a reply to a client of a Vim server | 838 server2client() send a reply to a client of a Vim server |
837 remote_peek() check if there is a reply from a Vim server | 839 remote_peek() check if there is a reply from a Vim server |
838 remote_read() read a reply from a Vim server | 840 remote_read() read a reply from a Vim server |
839 foreground() move the Vim window to the foreground | 841 foreground() move the Vim window to the foreground |
840 remote_foreground() move the Vim server window to the foreground | 842 remote_foreground() move the Vim server window to the foreground |
841 | 843 |
842 Window size and position: | 844 Window size and position: *window-size-functions* |
843 winheight() get height of a specific window | 845 winheight() get height of a specific window |
844 winwidth() get width of a specific window | 846 winwidth() get width of a specific window |
845 winrestcmd() return command to restore window sizes | 847 winrestcmd() return command to restore window sizes |
846 winsaveview() get view of current window | 848 winsaveview() get view of current window |
847 winrestview() restore saved view of current window | 849 winrestview() restore saved view of current window |
848 | 850 |
849 Various: | 851 Various: *various-functions* |
850 mode() get current editing mode | 852 mode() get current editing mode |
851 visualmode() last visual mode used | 853 visualmode() last visual mode used |
852 hasmapto() check if a mapping exists | 854 hasmapto() check if a mapping exists |
853 mapcheck() check if a matching mapping exists | 855 mapcheck() check if a matching mapping exists |
854 maparg() get rhs of a mapping | 856 maparg() get rhs of a mapping |