Shougo / defx.nvim

:file_folder: The dark powered file explorer implementation for neovim/Vim8
MIT License
1.17k stars 86 forks source link

File open error #241

Closed nabezokodaikon closed 4 years ago

nabezokodaikon commented 4 years ago

Problems summary

I get an error when I open the file.

Expected

No error occurs when opening the file.

Environment Information

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

autocmd FileType defx call s:defx_my_settings()

function! s:defx_my_settings() abort
  nnoremap <silent><buffer><expr> c
    \ defx#do_action('copy')
  nnoremap <silent><buffer><expr> m
    \ defx#do_action('move')
  nnoremap <silent><buffer><expr> p
    \ defx#do_action('paste')
  nnoremap <silent><buffer><expr> o
    \ defx#do_action('open_or_close_tree')
  nnoremap <silent><buffer><expr> <CR>
      \ defx#do_action('open')
  nnoremap <silent><buffer><expr> <C-n>
    \ defx#do_action('new_multiple_files')
  nnoremap <silent><buffer><expr> C
    \ defx#do_action('toggle_columns',
    \                'mark:filename:type:size:time')
  nnoremap <silent><buffer><expr> D
    \ defx#do_action('remove')
  nnoremap <silent><buffer><expr> r
    \ defx#do_action('rename')
  nnoremap <silent><buffer><expr> yy
    \ defx#do_action('yank_path')
  nnoremap <silent><buffer><expr> .
    \ defx#do_action('toggle_ignored_files')
  nnoremap <silent><buffer><expr> l
      \ defx#do_action('open')
  nnoremap <silent><buffer><expr> h
    \ defx#do_action('cd', ['..'])
  nnoremap <silent><buffer><expr> q
    \ defx#do_action('quit')
  nnoremap <silent><buffer><expr> j
    \ line('.') == line('$') ? 'gg' : 'j'
  nnoremap <silent><buffer><expr> k
    \ line('.') == 1 ? 'G' : 'k'
  nnoremap <silent><buffer><expr> <C-r>
    \ defx#do_action('redraw')
  nnoremap <silent><buffer><expr> <C-g>
    \ defx#do_action('print')
  nnoremap <silent><buffer><expr> ~
    \ defx#do_action('change_vim_cwd')
endfunction

The reproduce ways from neovim/Vim starting (Required!)

  1. $ mkdir issue-defx
  2. $ touch issue-defx/test.md
  3. $ cd issue-defx
  4. nvim
  5. open defx buffer.
  6. select test.md file.
  7. open test.md file.

Screen shot (if possible)

スクリーンショット 2020-08-18 14 12 55
nabezokodaikon commented 4 years ago

Thank you. I confirmed that it works normally.