vim-lf

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 88d8284709f6960973a247c3880e2cf5be304960
parent eaab89508f535a8902ed3c1d79af557263f7d27c
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Tue, 14 Apr 2020 21:18:19 +0200

Fixed LF open path

Diffstat:
Mautoload/lf.vim | 3++-
Mplugin/lf.vim | 4++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/autoload/lf.vim b/autoload/lf.vim @@ -49,7 +49,8 @@ function! lf#LF(path, edit_cmd) endfunction set guioptions+=! " Make it work with MacVim let currentPath = expand(a:path) - let buf = term_start(["lf", '-selection-path='.s:choice_file_path, '"'.currentPath.'"'], #{hidden: 1, term_finish: 'close'}) + echom 'lf -selection-path=' . s:choice_file_path . ' "' . currentPath . '"' + let buf = term_start('lf -selection-path=' . s:choice_file_path . ' "' . currentPath . '"', #{hidden: 1, term_finish: 'close'}) let winid = popup_dialog(buf, #{minwidth: 150, minheight: 20, highlight: 'Normal'}) let bufn = winbufnr(winid) exe 'autocmd! BufWinLeave <buffer='.bufn.'> call s:EditCallback()' diff --git a/plugin/lf.vim b/plugin/lf.vim @@ -7,8 +7,8 @@ let s:cpo_save = &cpo set cpo&vim command! -nargs=+ LF call lf#LF(<f-args>) -nnoremap <Plug>LfEdit :LF % edit<CR> -nnoremap <Plug>LfSplit :LF % split<CR> +nnoremap <Plug>LfEdit :LF %:p edit<CR> +nnoremap <Plug>LfSplit :LF %:p split<CR> let &cpo = s:cpo_save unlet s:cpo_save