vim-readdir icon indicating copy to clipboard operation
vim-readdir copied to clipboard

Multiple columns

Open randomekek opened this issue 8 years ago • 2 comments

Allow column-ed output similar to "ls -x" or "ls -C" instead of the current which is similar to "ls -1".

randomekek avatar Feb 23 '17 04:02 randomekek

Probably not.

Currently it‘s easy to see which file you have selected: whichever line the cursor is on. Turn on cursorline and it even looks like selecting from a menu. With multi-column output, it gets harder to keep track of what the cursor is pointing to. (I could maybe do something with matchadd() in CursorMoved autocommands… at the cost of a bunch of extra code with performance issues.)

Also, this is really 1½ features because multi-column output can be either row-first or column-first. (If I only implement one, I’ll inevitably get a feature request for the other – even BSD ls has both -C and -x.) So the user needs a way to switch from one to the other. And some of the code for one case can be reused for the other, but not all of it.

I care about both the UX and the code being simple (otherwise what’s the point of switching away from Netrw?), and this feature seems like it would require more complexity than I’m willing to live with.

But I don’t actually know yet, so I’ll give it a shot. Just don’t get your hopes up please. 😊

ap avatar Feb 23 '17 05:02 ap

Yeah it might be a bit more complex than warranted. Thanks for taking a look :+1:

For implementation, maybe it is possible just to use tabs and set tabstop to be wide enough. That way you can simply count how many tabs precede the cursor. (don't know enough about vimscript). Although since the tabstop is global, this does mean it's not optimal - some columns can be smaller.

randomekek avatar Feb 23 '17 06:02 randomekek