Git Product home page Git Product logo

fern-preview.vim's People

Contributors

hrsh7th avatar yuki-yano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fern-preview.vim's Issues

Not working with neovim

This plugin looks great and is very useful in vim. However, I can't get it to work in neovim.
When I try to use it the pop-up window does open, but it is completely blank, except for the "1" to show the line number in the top left-hand corner, like a new empty buffer.

I have the following in my vimrc:

"make fern preview window 50% width
function! fern_preview#width_default_func() abort
  let width = float2nr(&columns * 0.5)
  return width
endfunction

It does not work in neovim with or without this, however, it does give an error message with this, which might be a clue.
E746: Function name does not match script file name: fern_preview#width_default_func

Only map keys when the preview window is open

Thanks for the great set of Plugins. I have this piece of config as suggested in the readme:

function! s:fern_settings() abort
  ....
  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

I use <C-d> and <C-u> in the fern itself to jump up and down the list of directories/files as well, but setting it here causes the fern/vim to throw an error:

Error detected while processing function fern_preview#half_down[2]..<SNR>187_info:
line    3:
E716: Key not present in Dictionary: "width,   'height': l:info.height,   'topline': l:info.firstline }"

Is there a way to only map those keys when a preview window is open, and do the regular <C-d>, <C-u> when there's no preview window?

.luaなどignoreに入っている文字列で終わっているファイルがignore扱いになる

vim8.2.2927
Windows 21H1 OSビルド19043.985

最小構成
~/test/fern.vim
~/test/fern-preview.vim
にそれぞれをclone

vimrc

set encoding=utf-8
scriptencoding utf-8
set fileencoding=utf-8
set rtp+=~/test/fern.vim
set rtp+=~/test/fern-preview.vim

augroup VimrcFern
	autocmd!
	autocmd FileType fern nmap <silent> <buffer> p     <Plug>(fern-action-preview:auto:toggle)
augroup END

この状態で.luaファイルなどignoreに登録されている文字列でおわるファイルもともにignore扱いになりプレビューすることができませ
image

Windows上小さなファイルのプレビューを見ようとするとバイナリだとおこられます

vim8.2.2927
Windows 21H1 OSビルド19043.985

最小構成
~/test/fern.vim
~/test/fern-preview.vim
にそれぞれをclone

vimrc

set encoding=utf-8
scriptencoding utf-8
set fileencoding=utf-8
set rtp+=~/test/fern.vim
set rtp+=~/test/fern-preview.vim

augroup VimrcFern
	autocmd!
	autocmd FileType fern nmap <silent> <buffer> p     <Plug>(fern-action-preview:auto:toggle)
augroup END
let mapleader = "\<Space>"
nnoremap <leader>f <cmd>Fern . -drawer -toggle<CR>

この状態でどのファイルをプレビューしようともBinary fileと言われてしまいプレビューを閲覧することができません
image

very cool work!

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 :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.