comparison runtime/doc/usr_41.txt @ 5618:350272cbf1fd

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Thu, 23 Jan 2014 14:24:41 +0100
parents 359743c1f59a
children c52a655d927d
comparison
equal deleted inserted replaced
5617:a42040fed96c 5618:350272cbf1fd
1 *usr_41.txt* For Vim version 7.4. Last change: 2013 Feb 20 1 *usr_41.txt* For Vim version 7.4. Last change: 2014 Jan 10
2 2
3 VIM USER MANUAL - by Bram Moolenaar 3 VIM USER MANUAL - by Bram Moolenaar
4 4
5 Write a Vim script 5 Write a Vim script
6 6
593 matchend() position where a pattern match ends in a string 593 matchend() position where a pattern match ends in a string
594 matchstr() match of a pattern in a string 594 matchstr() match of a pattern in a string
595 matchlist() like matchstr() and also return submatches 595 matchlist() like matchstr() and also return submatches
596 stridx() first index of a short string in a long string 596 stridx() first index of a short string in a long string
597 strridx() last index of a short string in a long string 597 strridx() last index of a short string in a long string
598 strlen() length of a string 598 strlen() length of a string in bytes
599 strchars() length of a string in characters
600 strwidth() size of string when displayed
601 strdisplaywidth() size of string when displayed, deals with tabs
599 substitute() substitute a pattern match with a string 602 substitute() substitute a pattern match with a string
600 submatch() get a specific match in ":s" and substitute() 603 submatch() get a specific match in ":s" and substitute()
601 strpart() get part of a string 604 strpart() get part of a string
602 expand() expand special keywords 605 expand() expand special keywords
603 iconv() convert text from one encoding to another 606 iconv() convert text from one encoding to another
604 byteidx() byte index of a character in a string 607 byteidx() byte index of a character in a string
608 byteidxcomp() like byteidx() but count composing characters
605 repeat() repeat a string multiple times 609 repeat() repeat a string multiple times
606 eval() evaluate a string expression 610 eval() evaluate a string expression
607 611
608 List manipulation: *list-functions* 612 List manipulation: *list-functions*
609 get() get an item without error for wrong index 613 get() get an item without error for wrong index
654 abs() absolute value (also works for Number) 658 abs() absolute value (also works for Number)
655 round() round off 659 round() round off
656 ceil() round up 660 ceil() round up
657 floor() round down 661 floor() round down
658 trunc() remove value after decimal point 662 trunc() remove value after decimal point
663 fmod() remainder of division
664 exp() exponential
665 log() natural logarithm (logarithm to base e)
659 log10() logarithm to base 10 666 log10() logarithm to base 10
660 pow() value of x to the exponent y 667 pow() value of x to the exponent y
661 sqrt() square root 668 sqrt() square root
662 sin() sine 669 sin() sine
663 cos() cosine 670 cos() cosine
673 Other computation: *bitwise-function* 680 Other computation: *bitwise-function*
674 and() bitwise AND 681 and() bitwise AND
675 invert() bitwise invert 682 invert() bitwise invert
676 or() bitwise OR 683 or() bitwise OR
677 xor() bitwise XOR 684 xor() bitwise XOR
685 sha256() SHA-256 hash
678 686
679 Variables: *var-functions* 687 Variables: *var-functions*
680 type() type of a variable 688 type() type of a variable
681 islocked() check if a variable is locked 689 islocked() check if a variable is locked
682 function() get a Funcref for a function name 690 function() get a Funcref for a function name
695 virtcol() screen column of the cursor or a mark 703 virtcol() screen column of the cursor or a mark
696 line() line number of the cursor or mark 704 line() line number of the cursor or mark
697 wincol() window column number of the cursor 705 wincol() window column number of the cursor
698 winline() window line number of the cursor 706 winline() window line number of the cursor
699 cursor() position the cursor at a line/column 707 cursor() position the cursor at a line/column
708 screencol() get screen column of the cursor
709 screenrow() get screen row of the cursor
700 getpos() get position of cursor, mark, etc. 710 getpos() get position of cursor, mark, etc.
701 setpos() set position of cursor, mark, etc. 711 setpos() set position of cursor, mark, etc.
702 byte2line() get line number at a specific byte count 712 byte2line() get line number at a specific byte count
703 line2byte() byte count at a specific line 713 line2byte() byte count at a specific line
704 diff_filler() get the number of filler lines above a line 714 diff_filler() get the number of filler lines above a line
715 screenattr() get attribute at a screen line/row
716 screenchar() get character code at a screen line/row
705 717
706 Working with text in the current buffer: *text-functions* 718 Working with text in the current buffer: *text-functions*
707 getline() get a line or list of lines from the buffer 719 getline() get a line or list of lines from the buffer
708 setline() replace a line in the buffer 720 setline() replace a line in the buffer
709 append() append line or list of lines in the buffer 721 append() append line or list of lines in the buffer
881 getpid() get process ID of Vim 893 getpid() get process ID of Vim
882 894
883 libcall() call a function in an external library 895 libcall() call a function in an external library
884 libcallnr() idem, returning a number 896 libcallnr() idem, returning a number
885 897
898 undofile() get the name of the undo file
899 undotree() return the state of the undo tree
900
886 getreg() get contents of a register 901 getreg() get contents of a register
887 getregtype() get type of a register 902 getregtype() get type of a register
888 setreg() set contents and type of a register 903 setreg() set contents and type of a register
889 904
905 shiftwidth() effective value of 'shiftwidth'
906
890 taglist() get list of matching tags 907 taglist() get list of matching tags
891 tagfiles() get a list of tags files 908 tagfiles() get a list of tags files
892 909
910 luaeval() evaluate Lua expression
893 mzeval() evaluate |MzScheme| expression 911 mzeval() evaluate |MzScheme| expression
912 py3eval() evaluate Python expression (|+python3|)
913 pyeval() evaluate Python expression (|+python|)
894 914
895 ============================================================================== 915 ==============================================================================
896 *41.7* Defining a function 916 *41.7* Defining a function
897 917
898 Vim enables you to define your own functions. The basic function declaration 918 Vim enables you to define your own functions. The basic function declaration