cocopon / vaffle.vim

:file_folder: Lightweight, window-based file manager for Vim
MIT License
284 stars 20 forks source link

Add new commands to open vaffle buffer #18

Closed mopp closed 6 years ago

mopp commented 6 years ago

Objective

The windows of VaffleSplitFixed and VaffleVsplitFixed is fixed size. It can be configured by g:vaffle_fixed_window_height and g:vaffle_fixed_window_width.

The window was opened by these command will be closed by <Plug>(vaffle-quit)

TODO: write document

mopp commented 6 years ago

I figured out that it is not worth merging this PR. The objective can be achieved by the code below.

command! VaffleTab tabnew +Vaffle
command! VaffleSplit split +Vaffle
command! VaffleVsplit vsplit +Vaffle
command! VaffleSplitFixed call s:vaffle_split_fixed()
command! VaffleVsplitFixed call s:vaffle_vsplit_fixed()

function! s:vaffle_split_fixed() abort
    botright split +Vaffle
    resize 12
    setlocal winfixheight
endfunction

function! s:vaffle_vsplit_fixed() abort
    vertical topleft vsplit +Vaffle
    vertical resize 35
    setlocal winfixwidth
endfunction

@cocopon mentioned these kind of things in the comment. https://github.com/cocopon/vaffle.vim/pull/16#issuecomment-357136449 https://github.com/cocopon/vaffle.vim/pull/16#issuecomment-365231038

Simpleness is most import for Vaffle. I'm sorry for annoying you. Then, this PR should be closed.