question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic filename width

See original GitHub issue

Consider the following minimal init.vim file:

let $DOTVIM = expand('$HOME/.config/nvim')

set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/defx.nvim
filetype plugin indent on

call defx#custom#option('_', {
            \ 'winwidth': 30,
            \ 'split': 'vertical',
            \ 'direction': 'topleft',
            \ })
call defx#custom#column('filename', {
            \ 'min_width': 20,
            \ 'max_width': 20,
            \ })
nnoremap <C-l> <C-w>2>

Now, as in the GIF, do

  1. Open and run :Defx ~/Desktop/bar where in the bar directory you have a file with a really long name such as asadjaslkdasdjaslkdasjdkladakl.txt
  2. Once in the Defx window press <C-l> to increase the window width.

After 2. the Defx window width increases but the filename is still truncated. Can a new feature be added such that the filename width also increase dynamically with the window width? (vimfiler had this behaviour)

Peek 2020-03-30 22-53

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Shougocommented, Dec 26, 2020

You can improve the documentation. The PR is welcome.

0reactions
petobenscommented, Dec 26, 2020

I meant that the docs were not clear about what max_width_percent represents (at least for me) and whether we should use it over or combined with max_width. Thanks for the help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic Filename with Grunt Uglify - Stack Overflow
I am trying to set the version in the filename with Grunt Uglify, but it doesn't accept anything other than a string literal....
Read more >
Dynamic column width in List View - XYplorer Beta Club
Hi, I was wondering if there was an option to automatically adjust the width of each individual column to the maximum name length...
Read more >
Dynamic Image Controller | Kohana User Guide
/imagefly/filename/width/height - where filename is the name of the image without the extension. This assumes that all images are in jpg and all...
Read more >
dynamic column width in the list view - Total Commander
dynamic column width in the list view like the explorer in Windows 7. The width of each column is the length of the...
Read more >
Dynamic File Name using XI 3.0 SP12 Part – I | SAP Blogs
Dynamic File Name using XI 3.0 SP12 Part – I ... .com/weblogs/images/29453/RFC1-mod.jpeg|height=217|alt=image|width=401|src=https://weblogs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found