Skip to content

Commit

Permalink
Replace bclose.vim with vim-bbye
Browse files Browse the repository at this point in the history
Fixes #14
  • Loading branch information
ptzz committed Feb 10, 2021
1 parent 018f28d commit cf3a56e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Install it with your favorite plugin manager. Example with vim-plug:

Plug 'ptzz/lf.vim'

If you use neovim, you have to add the dependency to the plugin bclose.vim:
If you use neovim, you have to add the dependency to the plugin vim-bbye:

Plug 'rbgrouleff/bclose.vim'
Plug 'moll/vim-bbye'

How to use it
-------------
Expand Down Expand Up @@ -63,7 +63,7 @@ let g:NERDTreeHijackNetrw = 0 // add this line if you use NERDTree
let g:lf_replace_netrw = 1 // open lf when vim open a directory
```

In order for this to work you need to install the bclose.vim plugin (see above).
In order for this to work you need to install the vim-bbye plugin (see above).

### Setting a custom lf command
By default lf is opened with the command `lf` but you can set an other custom command by setting the `g:lf_command_override` variable in your .(n)vimrc.
Expand Down
8 changes: 4 additions & 4 deletions plugin/lf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ function! OpenLfIn(path, edit_cmd)
let lfCallback = { 'name': 'lf', 'edit_cmd': a:edit_cmd }
function! lfCallback.on_exit(job_id, code, event)
if a:code == 0
if exists(":Bclose")
silent! Bclose!
if exists(":Bdelete")
silent! Bdelete!
else
echoerr "Failed to close buffer, make sure the `rbgrouleff/bclose.vim` plugin is installed"
echoerr "Failed to close buffer, make sure the `moll/vim-bbye` plugin is installed"
endif
endif
try
Expand Down Expand Up @@ -115,7 +115,7 @@ function! OpenLfOnVimLoadDir(argv_path)
let path = expand(a:argv_path)

" Delete empty buffer created by vim
Bclose!
Bdelete!

" Open Lf
call OpenLfIn(path, s:default_edit_cmd)
Expand Down

0 comments on commit cf3a56e

Please sign in to comment.