diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-30 17:57:05 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-30 17:57:05 +1300 |
commit | 94b8bfb2774d311ff70503fc6617a0cb4df33eea (patch) | |
tree | 2cfa2a42d2abe96410aaa8d191db280dafa176ed | |
parent | Put a common string into a variable (diff) | |
download | dotfiles-94b8bfb2774d311ff70503fc6617a0cb4df33eea.tar.gz dotfiles-94b8bfb2774d311ff70503fc6617a0cb4df33eea.zip |
Remove unneeded map#() autoload function
-rw-r--r-- | vim/autoload/map.vim | 12 | ||||
-rw-r--r-- | vim/autoload/option.vim | 2 |
2 files changed, 1 insertions, 13 deletions
diff --git a/vim/autoload/map.vim b/vim/autoload/map.vim deleted file mode 100644 index d4bd90a2..00000000 --- a/vim/autoload/map.vim +++ /dev/null @@ -1,12 +0,0 @@ -" We declare a wrapper around map() to allow us always to call it with -" a Funcref as the second function parameter, which isn't directly supported -" by map() until Vim v7.4.1989. If the running version is older than that, -" apply string() to the Funcref to use the older calling convention. -" -" <https://github.com/vim/vim/releases/tag/v7.4.1989> -" -function! map#(list, Func) abort - return has('patch-7.4.1989') - \ ? map(a:list, a:Func) - \ : map(a:list, string(a:Func).'(0, v:val)') -endfunction diff --git a/vim/autoload/option.vim b/vim/autoload/option.vim index d203dfe8..a71503e1 100644 --- a/vim/autoload/option.vim +++ b/vim/autoload/option.vim @@ -4,5 +4,5 @@ function! option#Split(expr, ...) abort endif let keepempty = a:0 ? a:1 : 0 let parts = split(a:expr, '\\\@<!,[, ]*', keepempty) - return map#(parts, 'substitute(v:val, ''\\,'', '','', ''g'')') + return map(parts, 'substitute(v:val, ''\\,'', '','', ''g'')') endfunction |