yuki-yano / fern-preview.vim

Add a file preview window to fern.vim.
MIT License
45 stars 5 forks source link

very cool work! #18

Open sozoalvin opened 3 years ago

sozoalvin commented 3 years ago

Dear yuki, just tried out your work today and i think it's fantastic!

just thought ill mention that the offsets might be off or something, or my settings aren't right.

You can view a screenshot here:

https://ibb.co/r4wNV79

As you can see, the preview window eats up the actual menu itself on the left.

Do you think theres's setting somewhere that i could use to fix this?

Apart from having

Plug 'yuki-yano/fern-preview.vim

in my .vimrc file, i have nothing in it. Perhaps you can advise? Thank you :)

sozoalvin commented 3 years ago

sorry , i need to add that i have this in .vimrc file as well:


 augroup fern-settings
function! s:fern_settings() abort
   nmap <silent> <buffer> p     <Plug>(fern-action-preview:toggle)
   nmap <silent> <buffer> <C-p> <Plug>(fern-action-preview:auto:toggle)
   nmap <silent> <buffer> <C-d> <Plug>(fern-action-preview:scroll:down:half)
   nmap <silent> <buffer> <C-u> <Plug>(fern-action-preview:scroll:up:half)
   endfunction
yuki-yano commented 3 years ago

Is the function running when you invoke fern? The following settings are required.

autocmd FileType fern call s:fern_settings()
sozoalvin commented 3 years ago

yep now i have these codes thanks to you all in my .vimrc file

After i open a folder using nvim . , i can use crt+P and move up and down files. No previews are shown for folders but the files, same problem as posted earlier on. It still cuts off the file names!


autocmd FileType fern call s:fern_settings()
augroup fern-settings
function! s:fern_settings() abort
nmap <silent> <buffer> p     <Plug>(fern-action-preview:toggle)
nmap <silent> <buffer> <C-p> <Plug>(fern-action-preview:auto:toggle)
nmap <silent> <buffer> <C-d> <Plug>(fern-action-preview:scroll:down:half)
nmap <silent> <buffer> <C-u> <Plug>(fern-action-preview:scroll:up:half)
endfunction