1

I'm using the nnn file manager v3.2 on Mint 19.3 64-bit. If I have a file named ‘a.txt’ and I want to make a copy of it named ‘b.txt’ in the same directory, I do the following: I select ‘a.txt’ so that it has a + prefixed to it’s name, press ‘w’ and then press ‘c’ to copy (as). However, after pressing ‘c’, instead of being asked to input a new name (‘b.txt’) my text editor gvim is launched and I get a cp error message in nnn’s terminal stating that "‘a.txt’ can’t be copied to ‘a.txt’". Have I misinterpreted the procedure, or is this a bug?

0
1

The workflow for cp/mv is to open the paths in selection in your $VISUAL (else $EDITOR) and let you edit them (because if you have selected 20 files it doesn't make sense to ask and rename one by one).

Your $VISUAL/$EDITOR is set to gvim so the list is opener in gvim. Rename the entries as you want and save the file for the changes to apply.

In your case you haven't renamed the entry a.txt before saving the file so the error message is shown. You can't have 2 files with the same same in a directory.

Note: If you want to use a cli editor like vim, set $VISUAL ($EDITOR if you do not want to set $VISUAL) to vim an duse the program option -e.

2
  • The cp error message appears before the editor opens. cp: '/home/standard_user/a.txt' and '/home/standard_user/a.txt' are the same file ‘, Enter' to continue. The editor then opens a ‘.nnn…...’ file in /tmp. The first line is: #/home/standard_user/a.txt and the scond line is: a.txt. If a.txt on the second line is changed to b.txt and the file is saved, b.txt is not saved to the home dir. – w2kpro Jun 15 '20 at 17:17
  • I think the gvim is opened detached so the program does not wait for it. Please fix that. If it still doesn't work, please raise a defect in the project page so the devs can take a look at it. – Arun Prakash Jana Jun 15 '20 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.