I just recently ran an overdue update on my desktop system. What I didn't expect was for a simple dnf upgrade -y to uninstall the vim-default-editor which is now an intentional choice over that trash editor nano. I consider this action a bug.
Nevertheless, these are the methods I have employed to prevent this shameful deed from happening again. I have added a vim.conf to the /etc/dnf/protected.d directory with the following contents:
───────┬───────────────────────────────────────────────
│ File: /etc/dnf/protected.d/vim.conf
───────┼───────────────────────────────────────────────
1 │ vim-common
2 │ vim-powerline
3 │ vim-minimal
4 │ vim-enhanced
5 │ vim-default-editor
───────┴───────────────────────────────────────────────
This won't prevent nano or nano-default-editor from being reinstalled. So, I added this line in my /etc/dnf/dnf.conf file:
excludepkgs=nano-default-editor,nano