comparison runtime/doc/eval.txt @ 7653:d4370fef0175 v7.4.1126

commit https://github.com/vim/vim/commit/c970330676eaae7ba7cd05cfa46df5a413853ef9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 17 21:49:33 2016 +0100 patch 7.4.1126 Problem: Can only get the directory of the current window. Solution: Add window and tab arguments to getcwd() and haslocaldir(). (Thinca, Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Sun, 17 Jan 2016 22:00:05 +0100
parents c7575b07de98
children 07f11de5efca
comparison
equal deleted inserted replaced
7652:a6555549858d 7653:d4370fef0175
1849 getcmdline() String return the current command-line 1849 getcmdline() String return the current command-line
1850 getcmdpos() Number return cursor position in command-line 1850 getcmdpos() Number return cursor position in command-line
1851 getcmdtype() String return current command-line type 1851 getcmdtype() String return current command-line type
1852 getcmdwintype() String return current command-line window type 1852 getcmdwintype() String return current command-line window type
1853 getcurpos() List position of the cursor 1853 getcurpos() List position of the cursor
1854 getcwd() String the current working directory 1854 getcwd( [{winnr} [, {tabnr}]]) String get the current working directory
1855 getfontname( [{name}]) String name of font being used 1855 getfontname( [{name}]) String name of font being used
1856 getfperm( {fname}) String file permissions of file {fname} 1856 getfperm( {fname}) String file permissions of file {fname}
1857 getfsize( {fname}) Number size in bytes of file {fname} 1857 getfsize( {fname}) Number size in bytes of file {fname}
1858 getftime( {fname}) Number last modification time of file 1858 getftime( {fname}) Number last modification time of file
1859 getftype( {fname}) String description of type of file {fname} 1859 getftype( {fname}) String description of type of file {fname}
1880 glob2regpat( {expr}) String convert a glob pat into a search pat 1880 glob2regpat( {expr}) String convert a glob pat into a search pat
1881 globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) 1881 globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
1882 String do glob({expr}) for all dirs in {path} 1882 String do glob({expr}) for all dirs in {path}
1883 has( {feature}) Number TRUE if feature {feature} supported 1883 has( {feature}) Number TRUE if feature {feature} supported
1884 has_key( {dict}, {key}) Number TRUE if {dict} has entry {key} 1884 has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
1885 haslocaldir() Number TRUE if current window executed |:lcd| 1885 haslocaldir( [{winnr} [, {tabnr}]])
1886 Number TRUE if the window executed |:lcd|
1886 hasmapto( {what} [, {mode} [, {abbr}]]) 1887 hasmapto( {what} [, {mode} [, {abbr}]])
1887 Number TRUE if mapping to {what} exists 1888 Number TRUE if mapping to {what} exists
1888 histadd( {history},{item}) String add an item to a history 1889 histadd( {history},{item}) String add an item to a history
1889 histdel( {history} [, {item}]) String remove an item from a history 1890 histdel( {history} [, {item}]) String remove an item from a history
1890 histget( {history} [, {index}]) String get the item {index} from a history 1891 histget( {history} [, {index}]) String get the item {index} from a history
3520 let save_cursor = getcurpos() 3521 let save_cursor = getcurpos()
3521 MoveTheCursorAround 3522 MoveTheCursorAround
3522 call setpos('.', save_cursor) 3523 call setpos('.', save_cursor)
3523 < 3524 <
3524 *getcwd()* 3525 *getcwd()*
3525 getcwd() The result is a String, which is the name of the current 3526 getcwd([{winnr} [, {tabnr}]])
3527 The result is a String, which is the name of the current
3526 working directory. 3528 working directory.
3529 Without arguments, for the current window.
3530
3531 With {winnr} return the local current directory of this window
3532 in the current tab page.
3533 With {winnr} and {tabnr} return the local current directory of
3534 the window in the specified tab page.
3535 Return an empty string if the arguments are invalid.
3527 3536
3528 getfsize({fname}) *getfsize()* 3537 getfsize({fname}) *getfsize()*
3529 The result is a Number, which is the size in bytes of the 3538 The result is a Number, which is the size in bytes of the
3530 given file {fname}. 3539 given file {fname}.
3531 If {fname} is a directory, 0 is returned. 3540 If {fname} is a directory, 0 is returned.
3857 3866
3858 has_key({dict}, {key}) *has_key()* 3867 has_key({dict}, {key}) *has_key()*
3859 The result is a Number, which is 1 if |Dictionary| {dict} has 3868 The result is a Number, which is 1 if |Dictionary| {dict} has
3860 an entry with key {key}. Zero otherwise. 3869 an entry with key {key}. Zero otherwise.
3861 3870
3862 haslocaldir() *haslocaldir()* 3871 haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()*
3863 The result is a Number, which is 1 when the current 3872 The result is a Number, which is 1 when the window has set a
3864 window has set a local path via |:lcd|, and 0 otherwise. 3873 local path via |:lcd|, and 0 otherwise.
3874
3875 Without arguments use the current window.
3876 With {winnr} use this window in the current tab page.
3877 With {winnr} and {tabnr} use the window in the specified tab
3878 page.
3879 Return 0 if the arguments are invalid.
3865 3880
3866 hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* 3881 hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
3867 The result is a Number, which is 1 if there is a mapping that 3882 The result is a Number, which is 1 if there is a mapping that
3868 contains {what} in somewhere in the rhs (what it is mapped to) 3883 contains {what} in somewhere in the rhs (what it is mapped to)
3869 and this mapping exists in one of the modes indicated by 3884 and this mapping exists in one of the modes indicated by