yuki-yano / fern-preview.vim Goto Github PK
View Code? Open in Web Editor NEWAdd a file preview window to fern.vim.
License: MIT License
Add a file preview window to fern.vim.
License: MIT License
Is there exist api support modify the size of preview window without changing the source code?
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:
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 :)
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>
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扱いになりプレビューすることができませ
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.