From d76a3646b7181b14491ddaf45526a39c6aaba807 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 9 Jun 2014 10:05:08 +0900 Subject: [PATCH] Update Vim example: Rename functions See: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.260 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 584f07d..8c6a033 100644 --- a/README.md +++ b/README.md @@ -395,20 +395,20 @@ handy mapping that selects an open buffer. ```vim " List of buffers -function! g:buflist() +function! BufList() redir => ls silent ls redir END return split(ls, '\n') endfunction -function! g:bufopen(e) +function! BufOpen(e) execute 'buffer '. matchstr(a:e, '^[ 0-9]*') endfunction nnoremap :call fzf#run({ -\ 'source': reverse(g:buflist()), -\ 'sink': function('g:bufopen'), +\ 'source': reverse(BufList()), +\ 'sink': function('BufOpen'), \ 'options': '+m', \ 'tmux_height': '40%' \ })