Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable vsplit while bulkrenaming #39

Open
HA012 opened this issue Apr 4, 2020 · 6 comments
Open

Disable vsplit while bulkrenaming #39

HA012 opened this issue Apr 4, 2020 · 6 comments

Comments

@HA012
Copy link

HA012 commented Apr 4, 2020

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!

@xaizek
Copy link
Member

xaizek commented Apr 4, 2020

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

@maxigaz
Copy link
Contributor

maxigaz commented Nov 8, 2020

@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

@xaizek
Copy link
Member

xaizek commented Nov 8, 2020

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

@maxigaz
Copy link
Contributor

maxigaz commented Nov 8, 2020

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?

@xaizek
Copy link
Member

xaizek commented Nov 8, 2020

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.

@maxigaz
Copy link
Contributor

maxigaz commented Nov 9, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants