jarun/nnn

ToDo list

jarun opened this issue · 31 comments

jarun commented

Rolled from #719.

Cooking

  • REPL command prompt (Esc or Enter to exit)
  • invert selection with A
  • option -u removed (always prefer selection to hovered)
  • visit start dir on @ when start path is a file
  • exit filter mode and redraw on ^L if no last filter
  • plugin fzcd now selects the chosen file (#876)
  • ueberzug support in plugin preview-tui
  • new plugin preview-tui-ext with extra preview support
  • clear selection after successful plugin invocation
  • add method to sync subshell $PWD in WIki
  • clear selection on single file deletion (#812)
  • copy between instances not working (#864)
  • plugin togglex to toggle exe mode of a selection (#813)
  • fix memccpy() buffer overlap fault on macOS (#786)
  • show 0 selected msg on cp/mv with empty selection (#855)
  • fix frozen terminal caused by opener (#858)
  • migrate macOS CI to GitHub workflows, retire Travis

Up for grabs

  • update only current context data when saving session (#837)
  • generate static binary for arm, aarch with releases using CI (#623)
  • support predefined filters like bookmarks
  • open new terminal window in spawned shell directory (#759)

For anything else please discuss in this thread.

Contribution guideline.

Not sure if this feature already exists but I would find it useful if you could color regular files based on their file-types (primitively given by a file's extension).

So maybe an environment variable that would allow me to associate file-extensions with colors.

If you use icons this functionality already exists to a certain degree (e.g. you get a specific icon for pdf-files), but I fould icons to be irritating, nevertheless would like to be able to visually differentiate file-types.

jarun commented

You are right, this is done with icons. There's no plan to add colors to file name text otherwise.

KlzXS commented

I mean, you could compile it with icons, then just tell it to print an empty string as the icon. Setting the padding to an empty string as well.

Use either O_ICONS or O_NERD and empty out the corresponding strings.

KlzXS commented

If you don't want icons with your colors, that is.

rieje commented

Are there plans to support true colors? If not, what is a workaround if one has true colors enabled for the terminal for other applications?

Also, is replying to this thread appropriate for feature requests or general discussion?

jarun commented

Sorry, no plans to support true colors. There is no workaround. Colors in nnn would still follow NNN_COLORS and NNN_FCOLORS.

It's fine to reply in this thread.

What do you mean be generating arm binaries with new releases? Do you just want someone to make everytime a new release comes up?

jarun commented

No it has to be CI-automated like other packages with new releases.

@jarun just letting you know I took the liberty of creating a nnn-nerd package as you requested in a previous ToDo issue (now closed so replying here) as this is the build I will be using for the foreseeable future.

I would like to mention that I'm running into the issue that some icons in my patched nerd font are two glyphs wide while others are not. This results in half rendered icons and misaligned file/directory names.
image
I previously took the time to add a space to the misaligned icons in icons-nerdfont.h which fixed the issue on my setup but I remember this being inconsistent over different patched nerd fonts (illustrated by no one else having run into this issue?), so I'm not sure what the one-fits-all fix could be. Alas I don't see myself applying this fix for every release so I think I'll live with the issue for now and hence made the AUR package instead,

Thanks for the awesome file manager.

0xACE commented

would like to mention that I'm running into the issue that some icons in my patched nerd font are two glyphs wide while others are not. This results in half rendered icons and misaligned file/directory names.

Afaik that issue isn't related to nnn, it's how your terminal is rendering those extra wide characters... Your terminal will need a patch itself...

EDIT: I don't recall if it's the terminal or libxft that I patched... but one of those were involved in not having the same issues with emoji's in my case...

EDIT2: potentially it might even be that nerd font and what not wont correctly detected... but I'm confident I've given you enough information to research it further to make it work in your environment

jarun commented

@snide was about to pick some icons which are uniform but we haven't heard from him in some time.

snide commented

Sorry, real life got in the way. I should have time this weekend.

jarun commented

No problem!

Adding on my own feature request here:

Directory Traversal Memory

I use this feature of lf/ranger more than I realized, and I missed it when I started using nnn.

Basically, when navigating up and down through several layers of a directory tree, it’s great for the application to remember what directory or file was selected last time I traversed to it.

To give an example:

  1. Navigate a few levels down in a src directory to open up a file in EDITOR.
  2. Need to check a config file, so I close the editor, and walk back up the tree to the src root. I open the config file, read/edit etc. I close it again, taking me back to nnn pointed at src.
  3. I want to walk back down the tree, so I pick the first subfolder, then pressing L repeatedly until I’m taken to the nested file again.
jarun commented

Basically, when navigating up and down through several layers of a directory tree, it’s great for the application to remember what directory or file was selected last time I traversed to it.

There's no plan to remember navigational history other than the last visited directory.

One feature that I would like to have is the possibility to remap the default key bindings.
And it would be great if the help menu would automatically update with the new custom key bindings.

jarun commented

You can't without compiling. But that's easy. Check the troubleshooting section in the Wiki.

jarun commented

Sorry, Custom keybinds under Advanced.

Ok. Thanks.

whats the quickest way to unselect everything; ie "a" can select all, is there a keybind to unselect everything (rather than "Space" "^J"

inverse selection would be nice but i suspect after reading comments this would hinder performance (ahhh I see inverse selection is already cooking)

ok just compiled....inverse selection \o/ super happy fore-fills all my needs

KlzXS commented

Use can use m m. If you use it on two different files it's range select. If it's used on the same file it clears the whole selection.

I made a plugin for doing image previews with ueberzug:

#!/usr/bin/env sh
clear
height=$(tput lines)
width=$(tput cols)
ueberzug layer --parser json 0< <(
    printf '{"action": "add", "identifier": "nnn_ueberzug", "x": 0, "y": 1, "max_width": "%s", "max_height": "%s", "path": "%s"}\n' "$width" "$height" "$1"
    read -n 1 -s -r -p "Press any key to exit..."
    printf '{"action": "remove", "identifier": "nnn_ueberzug"}\n'
)

It uses tput to calculate the height and width of the terminal instance and scales the image accordingly. What do you think?

KlzXS commented

@Lucas-Summers there already exist plugins for previews preview-tui and preview-tabbed. I don't think preview with ueberzug should be a separate plugin, but your are welcome to incorporate support for it in the existing plugins as I don't think they use it.

@KlzXS ok i'll work on integrating it into the existing plugins.

Hi all, thanks for a great file manager! I have this question which I didn’t find an answer to. Why certain extra options (like nerd font support) can only be passed at compilation time? What speaks against having nnn compiled with these extra options by default and ability to turn them on and off via config env variables?

My use case: I’m a Mac user and use homebrew package manager for everything. As a matter of principle I don’t use software that isn’t managed by a package manager. That makes it very easy for me to keep all my software up-to-date. Nnn being the only exception where I need to manually check for new versions, pull the latest git repo, compile with the nerd font option and manually place the binary to my PATH (btw, if I’m dumb and there’s a better way, please let me know :))))

KlzXS commented

There is a tarball compiled with icon support in the lastest release, though I'm pretty sure it's compiled for linux.

The reason there isn't a package with compiled in support for icons is that it goes against nnn's goal of staying minimal, icons add a lot of bulk we don't consider strictly necessary, so we leave it to the user to decide.

I don't know much about the homebrew system (I'll assume it's a bit like AUR) but consider maintaining your own package for it. I'm sure there is a way to automate the process.

KlzXS commented

and manually place the binary to my PATH

You do know that make install will place it in /usr/local/bin (you can change this to something else if you want it installed just for one user by using the PREFIX option) for you?

So you would comiple it with make OPTIONS and then run make install PREFIX=/if/desired. sudo where necessary.

So you would comiple it with make OPTIONS and then run make install PREFIX=/if/desired. sudo where necessary.

Thanks! I will try it that way next time. It doesn't replace the convenience of having a package manager automatically download and install the latest binary for you as it comes out :)

Lacking a response to my comment in #851 I made some changes to the ueberzug integration in #869, thoughts?

@luukvbaal Sorry for not getting back to you quickly. I think it looks great! Definitely addresses all of the faults in #851 and I love the extra add-ons too. Works good on my system

jarun commented

Rolled at #881.