Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToDo list #137

Closed
82 of 90 tasks
jarun opened this issue Nov 24, 2018 · 42 comments
Closed
82 of 90 tasks

ToDo list #137

jarun opened this issue Nov 24, 2018 · 42 comments

Comments

@jarun
Copy link
Owner

jarun commented Nov 24, 2018

Rolled from #110.

Ready for next release (master-only)

  • support file picker mode
  • create a repo of user-contributed scripts
  • fixed CJK character handling at prompts
  • support substring search for filters
  • create sym/hard link(s) to files in selection
  • show symlinks to dirs along with dirs in top
  • key N (1 <= N <= 4) to switch to context N
  • bring back NNN_OPENER to specify file opener
  • support NNN_NOTE and keybind for quick notes
  • support multiple arguments in VISUAL/EDITOR
  • key ^B to visit pinned directory
  • additional key ^V to run or select custom script
  • use libreadline for command prompt
  • reduce delay on Esc press
  • config option to avoid unexpected behaviour on 0-byte file open (see Strange behaviour when opening an empty file  #187)
  • rename config option DISABLE_FILE_OPEN_ON_NAV to NNN_RESTRICT_NAV_OPEN
  • keys removed - $, ^, Backspace, ^H, ^P, ^M, ^W

Proposed and completed features

  • support command completion with libreadline
  • support soft delete to reclycle bin
  • vertical split pane (discussion required)
  • compile with PDCurses
  • support custom opener (e.g. mimeopen)
  • run a command (or launch an application)
  • a new demo video (see nnn needs an awesome video #167) (thanks @Kallinteris-Andreas)
  • choose script to run from a script directory (see Make NNN_SCRIPT a list of directories #127)
  • shortcut to run current file as script
  • support a combined set of arguments to $EDITOR, $PAGER and $SHELL
  • remote connection and file transfers (using lftp)
  • per-context directory color
  • support for Cygwin env
  • offer to fore file removal
  • support selection across directories and contexts
  • parse EDITOR or VISUAL for options when NNN_USE_EDITOR is set
  • option to disable file open on navigation (Right Arrow and l keys)
  • vim plugin to use nnn as a file picker within vim
  • retire nlay (no more used by nnn)
  • integrate static analysis on Travis
  • list currently copied files
  • option to disable directory auto-select
  • use $TMPDIR if available
  • support terminal locking on OS X (bashlock) and BSD (lock)
  • support patool
  • run any number of scripts
  • prefer VISUAL over EDITOR
  • add a keybind to run a custom script (see Feature request: File actions #79)
  • integer get_coolsize() (thanks @arsv)
  • batch rename, move, delete files with vidir integration
  • copy file paths when X is unavailable
  • support copying multiple file names to copier
  • add open with... shortcut
  • add option to open bookmark directly
  • optimize memory usage and algorithms for file name handling
  • list and extract archives
  • show current selection number along with total entries in dir
  • support NNN_NOWAIT to unblock nnn (DE specific)
  • file and directory creation
  • change to light mode if number of cols < 35
  • in-place file rename
  • watch out for current dir changes (if not in filter or du mode)
  • pin and jump to a directory
  • show vol capacity and vol free in help
  • option to use exiftool instead of mediainfo
  • option to show dirs in custom color (default: enabled in blue)
  • show dir content size and number of files in du mode
  • support bookmarks string
  • add option to support opening text files in EDITOR
  • use xdg-open on Linux and open(1) on OS X as desktop opener
  • support multiple apps in nlay
  • use vlock as default terminal screensaver
  • navigate-as-you-type mode
  • subtree search (using gnome-search-tool or catfish)
  • support custom nlay
  • search-as-you-type at filter prompt
  • RPM packages for RHEL/CentOS (thanks @fennm)
  • support cd ..... (with . as PWD, stops at /) (feature removed)
  • jump to initial directory (where nnn was started)
  • nlay - a shell script for actions like open desktop search utility, run screensaver
  • show file details, mediainfo output, help in less
  • show media information (needs mediainfo)
  • support readline at chdir prompt (feature removed)
  • use Q to quit to current dir (needs external shell integration)
  • use ^Q to quit (even from filter mode)
  • UTF-8 support
  • add option to start in disk usage analyzer mode
  • open current dir in desktop file manager
  • disk usage analyzer more
  • show unprivileged free blocks in du mode
  • shortcut - to jump to last directory
  • resolve ~ (HOME) at chdir prompt (feature removed)
  • option to show complete stats of just the current entry (name, file type, human readable permission string, byte size... all lstat() details)
  • update noice man page
  • sort entries by size
  • support file path copier script (NNN_COPIER)
  • support detail view (default)
    • file type
    • modification time
    • human-readable file size
    • current item in reverse video
    • full name of currently selected file in bottom "bar"
  • roll navigation with Up and Down at the first and last entries
  • remove restriction on visiting parent dir when opened with a relative dir path
  • case insensitive alphabetic content listing
  • generate optimized binary
  • show total number of files in du mode (apparently it has to be counted in nftw callback, with adjustments like file type check, hardlink check, which means unreasonable overhead)
  • threaded/multicore nftw(3) (overkill, we are already very fast)
  • use scandir instead of readdir (we are using custom alphanum sort, see 6912912)
  • modify packagecore.yml and probably Makefile to generate OpenSUSE Leap package

Anything else which would add value (please discuss in this thread)

@jarun jarun mentioned this issue Nov 24, 2018
75 tasks
@mcchrish
Copy link
Collaborator

@jarun what do you think of putting the vim plugin to its own repo? It can make installation easier for plugin manager.

@jarun
Copy link
Owner Author

jarun commented Nov 24, 2018

@mcchrish I would be more than happy! Would you be kind enough to maintain it? (I don't see too many changes coming).

@mcchrish
Copy link
Collaborator

@jarun not well-versed with vimscript but if no one hasn't done it yet I'll take a look.

@mcchrish
Copy link
Collaborator

@jarun https://github.com/mcchrish/nnn.vim

So for vim-plug just:

Plug 'mcchrish/nnn.vim'

Thanks for the awesome tool!

@jarun
Copy link
Owner Author

jarun commented Nov 24, 2018

Awesome! I am retiring the plugin from my project and linking to yours. ;)
Many thanks!

@gabyshev
Copy link

@jarun Hi!

What do you think about having a configuration file?

like $HOME/.config/nnn/nnn.conf

@jarun
Copy link
Owner Author

jarun commented Nov 28, 2018

@gabyshev no plans as of now. nnn tries to get the settings from env variables instead of reading a file from the disk. Also, there are not too many config points designed for nnn.

@leorosa
Copy link

leorosa commented Dec 9, 2018

Hi! I was using the latest version, and I'd like to suggest that every time copy/move/list selection is called, nnn read the selected files from ~/.nnncp. Consider this workflow:

  1. open two instances of nnn;
  2. in one of them, go to some directory and select a file;
  3. in the other instance, go to another directory, and then copy (or move) the file selected in step 2.
    This would be useful for people emulating a 'two-panel mode' with tmux.

@jarun
Copy link
Owner Author

jarun commented Dec 9, 2018

It works just like that even now. Here's what I tried (with lastest master):

  • in first instance, selected a file with ^K.
  • in second instance, used P to paste the file

@jarun
Copy link
Owner Author

jarun commented Dec 9, 2018

The list selection works differently though. Listing is purely a local copy for the specific instance till you write the selection to .nnncp using the last ^Y. Listing is for the user to know which files (s)he has added to the selection list so far.

@leorosa
Copy link

leorosa commented Dec 9, 2018

Nice! Indeed, it works. What confused me was this different behaviour of list selection (I use it to check which files are being changed). Anyhow, thanks for your latest additions into nnn.

@jarun
Copy link
Owner Author

jarun commented Dec 9, 2018

No problem!

@kopr12
Copy link

kopr12 commented Dec 25, 2018

What about having env var for dir color ?
I mean, if you already have at least one env var why don't have 10 or more ?
Maybe I don't see a difference having 1, 5, 10 or 20 but there's one...

Anyway, default blue doesn't work for me, kinda silly to look at man each time I start nnn to see the arg for it and then the number for let's say red.

@jarun
Copy link
Owner Author

jarun commented Dec 26, 2018

@kajzersoze how about using an alias? I do the same.

@kopr12
Copy link

kopr12 commented Dec 26, 2018

@jarun didn't occur to me for some reason, good idea :)

patching it is also not a bad idea, I guess what I need is in this line :
https://github.com/jarun/nnn/blob/master/src/nnn.c#L3627

Okay, thanks.

@jarun
Copy link
Owner Author

jarun commented Dec 26, 2018

No problem!

@gsakkis
Copy link

gsakkis commented Dec 27, 2018

First off congrats for this project, I've been test-driving it for the past few hours and looks pretty slick! Coming from graphical file managers (mainly Nautilus), the only thing that seems less efficient and hard to get used to so far is the copy/move/delete actions. Perhaps it's "just" the power of habit but I'd love to be able to have the same UX if possible, at least for the path selection:

  • ^space selects a single path, just like ^K in nnn.
  • To select multiple paths, press and hold ^ while moving up/down to other entries and press space for those to be added to the selection. The selected entries should be displayed with a different background color instead of having to press a shortcut (y) to see the list.
  • As an extra handy shortcut, holding Shift instead of ^ and moving only up or only down selects a consecutive list of entries, without having to press space for each one.

For deletion provide two modes:

  • A "soft" delete (del) that just moves the selected entries to the recycle bin (or equivalent location in other OS).
  • A hard delete (Shift+del) that actually removes the entries (after a Y/N confirmation dialogue).

As for copy and move, I guess I could get used to the different UX - "Copy selection" instead of "Copy and paste" (^C ^V) and "Move selection" instead of "Cut and paste" (^X ^V) - but would be nice to have as well.

@jarun
Copy link
Owner Author

jarun commented Dec 28, 2018

Please note that nnn doesn't only cater to desktops.

^space selects a single path, just like ^K in nnn

There's a reason a key is kept without ^ and another with it. It's very difficult on handhelds to use a ^ combination. And for people who use the navigate-as-you-type mode ^ is a must.

To select multiple paths...
As an extra handy shortcut...

Same reason as above. Multiple combinations are very difficult to use on smaller form factors.

For deletion provide two modes

We can have this as an enhancement.

@gsakkis
Copy link

gsakkis commented Dec 28, 2018

Interesting point about handhelds, it didn't occur to me this was a use case and didn't see it mentioned in the design considerations. Though I'm not sure I'm reading

It's very difficult on handhelds to use a ^ combination. And for people who use the navigate-as-you-type mode ^ is a must.

correctly; are you saying it's very difficult on handhelds to use the navigate-as-you-type mode?

@jarun
Copy link
Owner Author

jarun commented Dec 28, 2018

didn't see it mentioned in the design considerations

From the introduction - It runs on Linux, macOS, BSD, Cygwin, Linux subsystem for Windows and Termux.

are you saying it's very difficult on handhelds to use the navigate-as-you-type mode?

yes, and not because of nnn.

@lawnowner
Copy link
Contributor

Hi, how can I create (symbolic) links for a selection? maybe 's' and 'h' as options in addition to 'f' and 'd' in 'n' prompt?

@jarun
Copy link
Owner Author

jarun commented Jan 3, 2019

@lawnowner this is not a very regular use case. Please use scripts.
Would be great if you can share so I can add it to the scripts directory.

@lawnowner
Copy link
Contributor

@jarun Roger. Already my fm of choice, well-crafted to the detail--all I could think were link creation and percent-progress for copies. I doubt I'll use another fm, although my contribution may take a while. Thanks.

@jarun jarun pinned this issue Jan 15, 2019
@ghost
Copy link

ghost commented Jan 17, 2019

Hello @jarun. Sorry if this has been asked before, but are there any plans for adding some bulk rename support (e.g. the one from ranger)? If not, would this be easy to implement with a script?

@jarun
Copy link
Owner Author

jarun commented Jan 17, 2019

vidir is integrated. Please refer to the docs and help.

@ghost
Copy link

ghost commented Jan 17, 2019

@jarun Thanks for pointing it out! Somehow missed it in the readme.

@3N4N
Copy link

3N4N commented Jan 17, 2019

@jarun Hello, I have just started using nnn. I had some queries, but most imminent for my workflow is customizing the file-opener. I've not used desktop environment for long, and when I did I didn't know anything about xdg-open and mimeopen. And as long as I've used ranger and then vifm, I've had configuration file to configure programs to launch the file in. I know about ^o but I think I should not write the programs name every time I want to open a file.

So, could you point me to some websites to learn configuring xdg-open?

@jarun
Copy link
Owner Author

jarun commented Jan 17, 2019

You don't need to configure. From your DE file manager, right click on a file and set open with.

@3N4N
Copy link

3N4N commented Jan 17, 2019

But I don't use any DE file manager. I've installed ubuntu minimal version without any DE at all. Don't you think it's not a good idea to have to install a program just to configure file opener?

@jarun
Copy link
Owner Author

jarun commented Jan 17, 2019

Don't you think it's not a good idea to have to install a program just to configure file opener?

On latest master, we have restored the support for NNN_OPENER yesterday. So you can specify your own opener like mimeopen.

@jarun
Copy link
Owner Author

jarun commented Jan 19, 2019

@lawnowner I found a simple way to do it:

  • ^K to select the file
  • ^S to run a command
  • ln -s (ncp) (ncp).ln // assuming you have ncp exported
  • Enter

symlink file.ln should be created now.

@lawnowner
Copy link
Contributor

lawnowner commented Jan 19, 2019

@jarun Thanks. That's a good solution among other simple ones, such as a pure shell solution, a script solution, or having any other copier program than ncp 'exported' (assuming it is installed on the system). Although it is my preferred fm, I think that nnn should support link creation natively.

@jarun
Copy link
Owner Author

jarun commented Jan 20, 2019

The problem is there may be too many cases (while file/dir creation are limited to the same parent dir):

  • link to a single file or multiple? (if mutiple we need selection)
  • create link to a file in the same dir? (if not, again we need to check selection)
  • if multiple, we need to check for every file if it's present
  • if present, overwrite or not?

So you see, to really provide a complete solution is not a trivial thing in this case. What do you suggest?

@lawnowner
Copy link
Contributor

@jarun After making a selection of one or more files/directories and navigating to a destination directory, via the nnn interface, both linking (N/A) and copying/moving (P/V) involve resolving the same cases against duplicates at the destination. Since nnn can copy/move without re-implementing cp/mv utilities, maybe I could suggest treating the linking operation as pseudo-copying. The 'n' prompt could be a good place to interject link creation options, but of course a shortcut like P/V is another option.

@jarun
Copy link
Owner Author

jarun commented Jan 20, 2019

involve resolving the same cases against duplicates at the destination

Yes, we use cp. mv, rm here which have their own guards. I didn't want to re-write the logic again.

Now, for multiple file selection, we do not call cp, mv, rm again and again. We call them once. But I don't think we can do that for ln. I think as this is tied to selection and the methodology remains the same, adding a new option is a natural choice. But it also needs a new option. :(

I was also thinking of using lower level APIs for ln to implement in the same workflow as new.

Maybe I am not just so sure yet, which workflow is better. Let me think a bit more.

@jarun
Copy link
Owner Author

jarun commented Jan 20, 2019

More issues, for hardlinks do we ask for linkname each time of use .sln and .hln for shard and soft links? What do we do if the *ln file exists?

@jarun
Copy link
Owner Author

jarun commented Jan 20, 2019

@lawnowner I think it's better to go the API way instead of calling binaries. Would it be possible for you to raise the PR?

@jarun
Copy link
Owner Author

jarun commented Jan 20, 2019

Batch link creation is pushed at commit 8ff56d2.

@lawnowner
Copy link
Contributor

@jarun Thanks for the new feature! I think the project has got sensible design decisions, such as sticking to XDG standards, optionally via intermediaries like mimeopen to provide simplified interfaces, and maintaining a lean and keen binary. Hopefully, it remains so.

@jarun
Copy link
Owner Author

jarun commented Jan 20, 2019

Latest master also supports links with same name.

@jarun jarun mentioned this issue Jan 29, 2019
@jarun jarun removed the help wanted label Jan 29, 2019
Repository owner locked as resolved and limited conversation to collaborators Jan 29, 2019
@jarun
Copy link
Owner Author

jarun commented Jan 29, 2019

Rolled at #202.

@jarun jarun closed this as completed Jan 29, 2019
@jarun jarun unpinned this issue Feb 23, 2019
@jarun
Copy link
Owner Author

jarun commented Mar 1, 2019

@gsakkis feedback for selected files will soon be in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants