aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/usr_41.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/usr_41.txt')
-rw-r--r--runtime/doc/usr_41.txt47
1 files changed, 40 insertions, 7 deletions
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index fc8419a522..191b0871f4 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 7.4. Last change: 2015 Nov 30
+*usr_41.txt* For Vim version 7.4. Last change: 2016 Aug 07
VIM USER MANUAL - by Bram Moolenaar
@@ -592,6 +592,7 @@ String manipulation: *string-functions*
match() position where a pattern matches in a string
matchend() position where a pattern match ends in a string
matchstr() match of a pattern in a string
+ matchstrpos() match and positions of a pattern in a string
matchlist() like matchstr() and also return submatches
stridx() first index of a short string in a long string
strridx() last index of a short string in a long string
@@ -601,13 +602,16 @@ String manipulation: *string-functions*
strdisplaywidth() size of string when displayed, deals with tabs
substitute() substitute a pattern match with a string
submatch() get a specific match in ":s" and substitute()
- strpart() get part of a string
+ strpart() get part of a string using byte index
+ strcharpart() get part of a string using char index
+ strgetchar() get character from a string using char index
expand() expand special keywords
iconv() convert text from one encoding to another
byteidx() byte index of a character in a string
byteidxcomp() like byteidx() but count composing characters
repeat() repeat a string multiple times
eval() evaluate a string expression
+ execute() execute an Ex command and get the output
List manipulation: *list-functions*
get() get an item without error for wrong index
@@ -731,11 +735,14 @@ Working with text in the current buffer: *text-functions*
searchpair() find the other end of a start/skip/end
searchpairpos() find the other end of a start/skip/end
searchdecl() search for the declaration of a name
+ getcharsearch() return character search information
+ setcharsearch() set character search information
*system-functions* *file-functions*
System functions and manipulation of files:
glob() expand wildcards
globpath() expand wildcards in a number of directories
+ glob2regpat() convert a glob pattern into a search pattern
findfile() find a file in a list of directories
finddir() find a directory in a list of directories
resolve() find out where a shortcut points to
@@ -747,6 +754,7 @@ System functions and manipulation of files:
filereadable() check if a file can be read
filewritable() check if a file can be written to
getfperm() get the permissions of a file
+ setfperm() set the permissions of a file
getftype() get the kind of a file
isdirectory() check if a directory exists
getfsize() get the size of a file
@@ -768,6 +776,7 @@ Date and Time: *date-functions* *time-functions*
strftime() convert time to a string
reltime() get the current or elapsed time accurately
reltimestr() convert reltime() result to a string
+ reltimefloat() convert reltime() result to a Float
*buffer-functions* *window-functions* *arg-functions*
Buffers, windows and the argument list:
@@ -784,9 +793,18 @@ Buffers, windows and the argument list:
tabpagenr() get the number of a tab page
tabpagewinnr() like winnr() for a specified tab page
winnr() get the window number for the current window
+ bufwinid() get the window ID of a specific buffer
bufwinnr() get the window number of a specific buffer
winbufnr() get the buffer number of a specific window
getbufline() get a list of lines from the specified buffer
+ win_findbuf() find windows containing a buffer
+ win_getid() get window ID of a window
+ win_gotoid() go to window with ID
+ win_id2tabwin() get tab and window nr from window ID
+ win_id2win() get window nr from window ID
+ getbufinfo() get a list with buffer information
+ gettabinfo() get a list with tab page information
+ getwininfo() get a list with window information
Command line: *command-line-functions*
getcmdline() get the current command line
@@ -794,6 +812,7 @@ Command line: *command-line-functions*
setcmdpos() set position of the cursor in the command line
getcmdtype() return the current command-line type
getcmdwintype() return the current command-line window type
+ getcompletion() list of command-line completion matches
Quickfix and location lists: *quickfix-functions*
getqflist() list of quickfix errors
@@ -889,9 +908,19 @@ Mappings: *mapping-functions*
wildmenumode() check if the wildmode is active
Testing: *test-functions*
- assert_equal() assert that two expressions values are equal
+ assert_equal() assert that two expressions values are equal
+ assert_notequal() assert that two expressions values are not equal
+ assert_inrange() assert that an expression is inside a range
+ assert_match() assert that a pattern matches the value
+ assert_notmatch() assert that a pattern does not match the value
assert_false() assert that an expression is false
assert_true() assert that an expression is true
+ assert_exception() assert that a command throws an exception
+ assert_fails() assert that a function call fails
+
+Timers: *timer-functions*
+ timer_start() create a timer
+ timer_stop() stop a timer
Various: *various-functions*
mode() get current editing mode
@@ -916,12 +945,13 @@ Various: *various-functions*
shiftwidth() effective value of 'shiftwidth'
+ wordcount() get byte/word/char count of buffer
+
taglist() get list of matching tags
tagfiles() get a list of tags files
py3eval() evaluate Python expression (|+python3|)
pyeval() evaluate Python expression (|+python|)
- wordcount() get byte/word/char count of buffer
==============================================================================
*41.7* Defining a function
@@ -1389,9 +1419,9 @@ Now we can instantiate a Dutch translation object: >
And a German translator: >
:let uk2de = copy(transdict)
- :let uk2de.words = {'one': 'ein', 'two': 'zwei', 'three': 'drei'}
+ :let uk2de.words = {'one': 'eins', 'two': 'zwei', 'three': 'drei'}
:echo uk2de.translate('three one')
-< drei ein ~
+< drei eins ~
You see that the copy() function is used to make a copy of the "transdict"
Dictionary and then the copy is changed to add the words. The original
@@ -2224,7 +2254,7 @@ This construct makes sure the function is only defined once: >
:endif
<
-UNDO *undo_ftplugin*
+UNDO *undo_indent* *undo_ftplugin*
When the user does ":setfiletype xyz" the effect of the previous filetype
should be undone. Set the b:undo_ftplugin variable to the commands that will
@@ -2239,6 +2269,9 @@ global value. That is mostly the best way to reset the option value.
This does require removing the "C" flag from 'cpoptions' to allow line
continuation, as mentioned above |use-cpo-save|.
+For undoing the effect of an indent script, the b:undo_indent variable should
+be set accordingly.
+
FILE NAME