vifm.vim icon indicating copy to clipboard operation
vifm.vim copied to clipboard

Disable vsplit while bulkrenaming

Open HA012 opened this issue 4 years ago • 6 comments

Hi.

After installing vifm.vim, the behavior of bulkrenaming changed, irrespective of whether I am running vifm within vim: it creates a vertical split with two vim windows containing the names of the selected files.

I wonder if that is the expected behavior and if I can disable the vertical split (my display is rather small, and, so, it makes a real difference to have just one window).

Thanks a lot in advance!

HA012 avatar Apr 04 '20 21:04 HA012

Hello.

The second window provides original file names for reference, which might be helpful if you change them completely or reorder lines.

You can provide implementation that does nothing by creating ~/.vim/ftplugin/vifm-rename.vifm containing:

" override standard handling of bulk rename to do nothing
let b:did_ftplugin = 1

xaizek avatar Apr 04 '20 21:04 xaizek

@xaizek I’ve tried your suggestion with Vifm 0.11. If I also have the plugin vim-symlink loaded, I still have one redundant pane. (If I don’t include the option you mentioned, I have two redundant panes.)

Here’s the minimal init.vim I have for reproducing the issue:

" vim:fdm=marker
" Required by many plugins
set nocompatible              " be iMproved
filetype off

" Plugin List
call plug#begin('~/.config/nvim/plugged')

Plug 'vifm/vifm.vim'
" Automatically follow symlinks
Plug 'moll/vim-bbye' " optional dependency
Plug 'aymericbeaumet/vim-symlink'

call plug#end()

" override standard handling of bulk rename to do nothing
let b:did_ftplugin = 1

maxigaz avatar Nov 08 '20 12:11 maxigaz

Putting it in general configuration doesn't make sense, it should be in ftplugin/vifm-rename.vifm to be meaningful.

xaizek avatar Nov 08 '20 15:11 xaizek

Putting it in general configuration doesn't make sense, it should be in ftplugin/vifm-rename.vifm to be meaningful.

Oh, I misunderstood, then. But if I take a look at ftplugin/vifm-rename.vifm, it already has that line.

So, what can I do in the latest version to disable all the extra splits?

maxigaz avatar Nov 08 '20 18:11 maxigaz

There is ftplugin/ in vifm.vim and ftplugin/ outside of plugins. You create the file with that line outside the plugin to suppress loading of the file that is part of the plugin.

xaizek avatar Nov 08 '20 21:11 xaizek

There is ftplugin/ in vifm.vim and ftplugin/ outside of plugins. You create the file with that line outside the plugin to suppress loading of the file that is part of the plugin.

Oh, I see. So it has to be in ~/.config/nvim/ftplugin. (I haven’t been familiar with the purpose of this folder, once created, but now I know it’s for filetype specific configurations.)

It works now. Thank you for your answers!

maxigaz avatar Nov 09 '20 09:11 maxigaz