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 #329

Closed
4 tasks
jarun opened this issue Sep 3, 2019 · 26 comments
Closed
4 tasks

ToDo list #329

jarun opened this issue Sep 3, 2019 · 26 comments

Comments

@jarun
Copy link
Owner

jarun commented Sep 3, 2019

Rolled from #324.

Ready for next release

  • custom key-plugin keybinds to run plugins directly
  • plugin changes:
    • moclyrics - show lyrics of the track currently playing in MOC
    • vidthumb - show video thumbnails in terminal
    • mediainf - show media info (decoupled as a plugin)
    • dups - list duplicate files in the current directory
    • oldbigfile - list large files by access time
    • mocplay - now detects if a track is playing or not
    • organize - categorize files and move to respective directories
    • fzy-edit merged into fzy-open
    • checksum - fixed POSIX compliance issues
    • boom plays music in MOC by default
  • Leader key combinations:
    • Lead' to jump to first file in dir
    • Lead] go to next active context
    • Lead[ go to prev active context
    • Lead. toggle show hidden files
  • revamped wiki
  • function key mappings: F2 (rename), F5 (redraw)
  • auto-proceed to next file on cherry-pick in selection mode
  • drop path prefix for files in current dir for selection based archives
  • changed duplicate file workflow
  • key : to run plugin
  • key S for du, A for apparent du
  • new option -a to use file access time throughout the program
  • new option -f to run filter as command on ^P
  • new option -o replaces config NNN_RESTRICT_NAV_OPEN
  • new option -t replaces config NNN_NO_AUTOSELECT
  • new option -r replaces config NNN_OPS_PROG
  • path clipping for long paths
  • more informative status bar in light/detail modes
  • smoother batch rename workflow when a selection exists
  • removed the wild load option (-w)
  • fix CPU using %100 by nnn #225 (thanks @KlzXS)
  • fix tar/bsdtar always creating tar archives (and not by suffix)
  • fix single mouse click to select file not working
  • fix symlink to dir removed on batch rename
  • fix: set detail mode with program option -S
  • libreadline .history file moved to nnn config directory

Proposed features and tasks (up for grabs)

  • wikipedia page
  • session support (max 4 directories)
  • script to duplicate selection in respective directories
  • refactor function browse()

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

List of completed features and tasks.

@jarun jarun mentioned this issue Sep 3, 2019
3 tasks
@AntonioFasano
Copy link

Good work.

I suggest that you add a tag on the status bar to notify when the selection mode is on.

Putting the status bar on top would make reading it more comfortable particularly when there are only a few files/dirs and so a lot of blank spaces.

I would like an alternative set of bookmarks with long names to search like they were files with arrows and filters.

@jarun
Copy link
Owner Author

jarun commented Sep 8, 2019

I suggest that you add a tag on the status bar to notify when the selection mode is on.

We will consider this.

Putting the status bar on top would make reading it more comfortable particularly when there are only a few files/dirs and so a lot of blank spaces.

That would be a lot of work at this stage of the project.

I would like an alternative set of bookmarks with long names to search like they were files with arrows and filters.

The bookmarks are listed in the help and settings screen. If you are usng nnn regularly it's a matter of time you wouldn't have to refer to it.

@jarun
Copy link
Owner Author

jarun commented Sep 8, 2019

Selection mode indicator and number of selected files in status bar implemented in commit 1baf284.

@AntonioFasano
Copy link

With respect to bookmarks, my question was a bit different.

There are everyday bookmarks that you can name a,b,c,d.... with a single letter, and you memorise them.

There are also less frequent bookmarks, which one might find convenient to have in some menu with descriptive words, like taxes, old-cs-books, etc.

An alternative would be to visit a a bookmark directory with symbolic links. In that case nnn could just help make link creation fast, such as typing L name and creating the link of the current directory in the bookmark directory.

@KlzXS
Copy link
Collaborator

KlzXS commented Sep 8, 2019

An alternative would be to visit a a bookmark directory with symbolic links. In that case nnn could just help make link creation fast, such as typing L name and creating the link of the current directory in the bookmark directory.

I don't think this should be a core feature of nnn. You can make a plugin that does that if your really want, I think that the most it should ever do is store a single configuration file with such things.

Maybe multi-character bookmarks can be a thing? Maybe not, I don't know.

@lawnowner
Copy link
Contributor

Clipping components of path to show a shorter form decreases readability, and in some cases, causes ambiguities, such as collisions among paths in nnn contexts listing a directory under home directories of different users, e.g. /h/a/.config. I think there needs to be an option or toggle to show path in normal form.

@jarun
Copy link
Owner Author

jarun commented Sep 8, 2019

Clipping components of path to show a shorter form

We can keep it under a config (which I wouldn't really like to do) or we can clip when the the path is too long. Maybe the second approach makes sense.

@lawnowner
Copy link
Contributor

lawnowner commented Sep 8, 2019

clip when the the path is too long

Clipping if width is not enough is a good idea I think, unless path stays in short form upon increasing width.

@AntonioFasano
Copy link

tl;dr

  • Avoid modes if not necessary.
  • Avoid modifiers.
  • Double keys for dangerous operations.

After trying to make some actual work with nnn, I understood this project is influenced by vim philosophy of modes.

Modes make a lot of sense for an editor, where you usually type and you need a mode to say:
"Now I'm not typing, just hacking the text". So you save a lot of keystrokes, because you don't have to type the CTRL key modifiers or the likes. In file managers you don't type text, so IMHO the concept proves less effective, while adding more overhead.

Assume you want to copy a couple of files from project A to project B.

In a traditional OFM, first, you look for directory A and B and you set them in the left and right pane. Then you understand what needs to be copied, identify name conflicts, etc. When your brain is ready for copying, (assuming you have two contiguous files) you:

hit SPACE twice and F5.

and you are done.

In nnn, that is:

^Y
SPACE twice
^Y
(move to destination)
^P

Why ^Y twice? That is a lot of overhead? Pressing SPACE twice should be enough.
^Y could make sense if I wanted to select source files in multiple folders.

Also why do modes exist? To save us from typing modifiers causing RSI. Selecting multiple files are the primary reasons for using file managers, instead of typing their paths in the terminal. Using modifiers for this operation should be avoided and CTRL-Y is particularly inconvenient.

Ranger approach here is very effective:

SPACE twice
yy
TAB
pp

Here yy marks for copy, TAB moves to destination tab (like context in nnn), pp copies.

Ranger avoids modifiers and to avoid casual keypress, for dangerous operations, it doubles the keys.
Clever!

@jarun
Copy link
Owner Author

jarun commented Sep 9, 2019

Avoid modes if not necessary.
Avoid modifiers.
Double keys for dangerous operations.

Keys with modifiers are very useful in nav-as-you-type mode. No other FM I know has such a smooth implementation.

^Y has an alternative - K. Same goes for most other keys with modifiers.

Why ^Y twice? That is a lot of overhead?

There are very specific reasons explained many times earlier. Please refer to the code.

@jarun
Copy link
Owner Author

jarun commented Sep 9, 2019

Questions:

  1. How do you select a range of files in ranger?
  2. In ranger, in addition to cp, mv, rm what other operations are possible on a selection of files?
  • because it appears a selection is limited to one operation. You press space and copy a file. Then you press space again. Definitely the second space will select only one file and you can, maybe move that file. Without having an additional key it's impossible to tell the FM that you want to append this file to the previous selected one. So the operation ends the selection process. So select files, operate... select files, operate... that's the flow. I am curious how many such operations are supported.
  • In nnn, you can have a selection and use the same selection for multiple operations of diverse types and can use the selection with plugins as well. So select files, operate... operate... as long as the location of the files do not change.
  1. Can you select files across directories in ranger?
  2. Can a selection in one instance of ranger be used in another instance of ranger?
  3. Can plugins use selections in ranger?

@jarun
Copy link
Owner Author

jarun commented Sep 9, 2019

@lawnowner folding only long paths is implemented at commit a064818.

@jarun
Copy link
Owner Author

jarun commented Sep 9, 2019

@0xACE I am noticing one issue with resize handling. After a resize (down) of the terminal, the earlier visible part is left printed on the screen. See the image below:

I tested this in xterm.

Can you please check if we can handle this?

@AntonioFasano
Copy link

Keys with modifiers are very useful in nav-as-you-type mode. No other FM I know has such a smooth implementation.

They are, but they are used also without nav-as-you-type, that is when they are pretty useless.

^Y has an alternative - K. Same goes for most other keys with modifiers.

Except Shift is a modifier: there is not much difference between CTRL-key and SHIFT-key,

Why ^Y twice? That is a lot of overhead?
Please refer to the code.

Do you mean nnn.h?

@jarun
Copy link
Owner Author

jarun commented Sep 10, 2019

@AntonioFasano

Do you mean nnn.h?

Why on earth would you think a *.h file is the place for program logic?

The questions in #329 (comment) are for you. I am more interested in those than the personal perspective triggered rants.

There's absolutely nothing wrong in choosing shortcuts from keys available in any sane keyboard other than people refusing to accept utilities may use those and coming back with BS reasons justifying why Ctrl and Shift keys should not be used.

Also, given your obsession of traditional OFMs, here's a note FYI - nnn is not a OFM and neither does it claim to be anything like any existing OFM. If you are not happy with the way it works or your inability to use it without the constant panic of using wrong keys, move on.

Also, without a single line of contribution to the relevant piece of software, without looking into the source code or trying to understand why a piece of logic is written in a certain way, if the tone in your next responses smell of disrespect or rudeness or demands or demoralization, I would be responding back exactly in the same way.

We do NOT owe you anything. This is a free open source project, you can fork and modify it to your own liking.

@ADITIJ700
Copy link

Can anyone please explain what exactly we have to do? I want to contribute but I am unable to understand the requirements.

@jarun
Copy link
Owner Author

jarun commented Sep 14, 2019

@ADITIJ700 in which area are you interested in? Feature development, testing, documentation? Based on your interest I can find something interesting for you.

The 3 line items under Proposed features and tasks (up for grabs) in the issue description are the current dev work items if you are interested in development.

Currently we don't have anything in testing but it would be great if someone can explore GitHub workflows to see if nnn can be moved from CircleCi to GitHub workflows.

We also have a couple of work items for Hindi documentation and a Wikipedia page for nnn.

@ADITIJ700
Copy link

I am actually interested in the documentation.

@jarun
Copy link
Owner Author

jarun commented Sep 14, 2019

Then you can start with any of the 2 documentation work I mentioned above.

The English documentation is here: https://github.com/jarun/nnn/wiki

For the Hindi wiki please create a new wiki page. The wiki is editable for all. Please let us know if you need any help with that.

@AntonioFasano
Copy link

@jarun

Your comments are really unfair.

You wrote "help wanted" for your to do list and I tried to give you my contributions.
I never used a single rude, disrespectful, demotivating word. I never said "you owe something" to those contributing your to do list.

If you are not happy with the way it works or your inability to use it without the constant panic of using wrong keys, move on.

If you are not happy with contributions to your to do list, why such harshness? Just don't implement them.

@jarun
Copy link
Owner Author

jarun commented Sep 16, 2019

@AntonioFasano

You wrote "help wanted"

With implementation, actual code or insights based on code and reasoning.

User discussions are welcome. But that's different from a flurry of assertive questions and answers without trying to understand why things are done in a certain way. You haven't waited for a response in any of your questions. Examples below:

Why ^Y twice? That is a lot of overhead? Pressing SPACE twice should be enough.

Also why do modes exist? To save us from typing modifiers causing RSI. Selecting multiple files are the primary reasons for using file managers, instead of typing their paths in the terminal. Using modifiers for this operation should be avoided and CTRL-Y is particularly inconvenient.

that is when they are pretty useless.

When I read your lines, I found a highly opinionated self-discussion. I get it your opinion is influenced by personal perspective and other OFMs. We are not writing a copy of another file manager.

Ranger avoids modifiers and to avoid casual keypress, for dangerous operations, it doubles the keys. Clever!

How can you help if you are reluctant to explore the features of the utility hands-on? Did you notice that nnn uses the interactive mode of cp, mv and rm? And in case of rm it also asks an explicit question and confirms a force mode before deleting a single file.

You also ignore the possibility that the same key can get pressed twice when done in quick succession. While deleting files in vim line by line quickly I often face this situation where I lose track if I have already pressed an extra d (of dd). Then I press one more d and undo if required.

If you are not happy with contributions to your to do list, why such harshness? Just don't implement them.

Those are not suitable for implementation because of the traditional shortcomings they come with. I had to spend my time and answer these non-issues which could have been avoided if you had a little respect for the devs who designed these and tried to understand why things work in a certain way.

I think you already got the technical response in the questions I had for you.

@jarun jarun mentioned this issue Sep 21, 2019
5 tasks
@jarun jarun removed the help wanted label Sep 21, 2019
Repository owner locked as resolved and limited conversation to collaborators Sep 21, 2019
@jarun jarun closed this as completed Sep 21, 2019
@0xACE
Copy link
Collaborator

0xACE commented Sep 21, 2019

Hey, I have been away and I'll try to sort through some stuff i missed while I was away.

@AntonioFasano

Why ^Y twice? That is a lot of overhead?

Really this is a limitation imposed by the current construction of nnn. If this really bothers you this much one proposal I would have is:

I have though about implementing it in selection-mode on by default, and use ^Y or K to clear the selection, but then I'd miss out on the range-selection and what not...

but fyi, the current implementation keeps the source code "stupid simple". And I haven't thought this through yet. And even if the patch comes out fine it's not guaranteed to be adopted upstream... jarun has asked me to publish my version of nnn maybe sometime soon I can publish some of my changes and you can pick as you choose. Maybe I'll experiment with your ^Y and K change proposal, but again today it's nothing but a thought. If it's urgent you are welcome to experiment it yourself, you can reach us here in the issue comments for now, or you could e-mail me personally if you need guidance. (I saw a mention of a gitter link but really I'm not a fan of these webservices...)

Cheers

  • Sorry for bumping this post but I figured it's worth clarifying.

@0xACE
Copy link
Collaborator

0xACE commented Sep 21, 2019

Oh I almost forgot.

@jarun I'll try to look up the resize problem, I don't understand it by your explanation but no worries I'll test it out and see what I come up with.

Currently on my backlog i have these tasks:

  • publish my patches
  • rebase my changes onto master and review your commits
  • write wikipedia article
  • research the resize bug mention in the previous thread
  • figure out a more stable approach of sshfs usage (It's bugging out frequently for me resulting in me running sudo umount ~/.config/nnn/<brokenmount>)
  • implementing jump to link location (useful when you are hovering on a link and want to go to the original file location) (I commonly have symlinks in my ~/bin/<script-name> and when I change a script it would be nice to log the commit...)

There are probably others but it's what I can remember since I have been gone.

@jarun
Copy link
Owner Author

jarun commented Sep 21, 2019

@0xACE thanks for following up on these.

I have reopened this thread so @AntonioFasano can respond to your proposal.

@jarun jarun reopened this Sep 21, 2019
@jarun jarun changed the title ToDo list ToDo list (old one, to be closed... don't start a new discussion in this one) Sep 21, 2019
Repository owner unlocked this conversation Sep 22, 2019
@jarun
Copy link
Owner Author

jarun commented Sep 22, 2019

Conversation unlocked.

@jarun jarun closed this as completed Sep 22, 2019
Repository owner locked as resolved and limited conversation to collaborators Sep 24, 2019
@jarun
Copy link
Owner Author

jarun commented Sep 30, 2019

@AntonioFasano I am writing a patch that will take care of the selection mode problem. You won't need to enter or exit selection mode. Select any starts the selection mode and an operation that uses a selection will mark the end of the process.

@jarun jarun changed the title ToDo list (old one, to be closed... don't start a new discussion in this one) ToDo list Feb 2, 2020
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

6 participants