diff --git a/autoload/zvim/util.vim b/autoload/zvim/util.vim index 07ee0da79..7be33f3cb 100644 --- a/autoload/zvim/util.vim +++ b/autoload/zvim/util.vim @@ -187,7 +187,7 @@ endfunction function! zvim#util#OpenVimfiler() abort if bufnr('vimfiler') == -1 - VimFiler + silent VimFiler if exists(':AirlineRefresh') AirlineRefresh endif @@ -198,7 +198,7 @@ function! zvim#util#OpenVimfiler() abort endif wincmd p else - VimFiler + silent VimFiler doautocmd WinEnter if exists(':AirlineRefresh') AirlineRefresh diff --git a/config/plugins/vimfiler.vim b/config/plugins/vimfiler.vim index 24c96b057..9a8f1a680 100644 --- a/config/plugins/vimfiler.vim +++ b/config/plugins/vimfiler.vim @@ -79,14 +79,16 @@ function! s:vimfilerinit() nnoremap sg vimfiler#do_action('vsplit') nnoremap sv vimfiler#do_action('split') nnoremap st vimfiler#do_action('tabswitch') - nmap gx (vimfiler_execute_vimfiler_associated) - nmap ' (vimfiler_toggle_mark_current_line) - nmap v (vimfiler_quick_look) - nmap p (vimfiler_preview_file) - nmap V (vimfiler_clear_mark_all_lines) - nmap i (vimfiler_switch_to_history_directory) - nmap (vimfiler_switch_to_other_window) - nmap (vimfiler_redraw_screen) + nmap gx (vimfiler_execute_vimfiler_associated) + nmap ' (vimfiler_toggle_mark_current_line) + nmap v (vimfiler_quick_look) + nmap p (vimfiler_preview_file) + nmap V (vimfiler_clear_mark_all_lines) + nmap i (vimfiler_switch_to_history_directory) + nmap (vimfiler_switch_to_other_window) + nmap (vimfiler_redraw_screen) + nmap (vimfiler_smart_h) + nmap (vimfiler_smart_l) endf " vim:set et sw=2: diff --git a/docs/documentation.md b/docs/documentation.md index 7bf4a25f8..519f5e7b6 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -827,13 +827,14 @@ Key Binding | Description -----------| ----------- `` or `SPC f t` | Toggle file explorer | **Within _VimFiler_ buffers** | | -`h` or `RET` | go to parent node and collapse expanded directory +`` or `h` | go to parent node and collapse expanded directory `` or `j` | select next file or directory `` or `k` | select previous file or directory -`l` | open selected file or expand directory +`` or `l` | open selected file or expand directory `Ctrl`+`j` | Un-map `Ctrl`+`l` | Un-map `E` | Un-map +`.` | toggle visible ignored files `sv` | Split edit `sg` | Vertical split edit `p` | Preview @@ -846,7 +847,13 @@ Key Binding | Description ##### Open file with file tree. -By default a file is opened in the last active window, +If there is only one file buffer opened, a file is opened in the active window, otherwise we need to use vim-choosewin to select a window to open the file. + +Key Binding | Description +-----------| ----------- +`l` or `Enter` | open file in one window +`sg` | open file in an vertically split window +`sv` | open file in an horizontally split window ### Auto-saving