Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by

How to see the end of very long filenames?

For filenames that are longer than the statusbar and a single pane?

Could there be something like a preview pane for filenames, where the filename is shown on several line?

2 Answers

0 votes
by

Another thing I wanted to suggest to you on reddit is to press Ctrl+G, but I tested it and long lines are just chopped. And horizontal scrolling doesn't work there, because it's a full screen dialog rather than a menu.

Another quite awful workaround:

:set wrap
:!echo %c%q
by

Beautiful !!!

Thanks alot :-)

by

Maybe one more thing ...

is there a way to make this preview persistent when scrolling through files ?

ie, having a toglleable file preview for all filetypes that overrides their usual file preview settings?

thanks

by

You could temporarily set 'previewprg' option:

:set previewprg='echo %c%q'

Maybe use :setl to have it reset on switching directory or use something like this:

nnoremap <silent> ,p : if &previewprg == ''
                    \|     set previewprg='echo %c%q'
                    \| else
                    \|     set previewprg=''
                    \| endif<cr>
by

This works great !!!

thank you very much (and also for your help on reddit) !!!

by

Made one more addition to your command, to set vertical split mode and view mode:

nnoremap <silent> ,p : if &previewprg == ''
                    \|     :vsplit
                    \|     :view
                    \|     set previewprg='echo %c%q'
                    \| else
                    \|     set previewprg=''
                    \| endif<cr>
0 votes
by

How to see the end of very long filenames?

How about set viewcolumns=*{name}..?

by

In this case this wasn't enough, the window might not be large enough to fit the whole file name.

by

Well, anonymous user has asked how to see an end of "very long filenames".
I have tested an approach with asterisk and it seems to do the job:

stupidly_long_filename_screenshot

The trimmed file is 89 symbols long.

...