How to use vi/vim/nvim with visudo? (stuck on nano and so lost)

  1. add Defaults editor=/usr/bin/vim to visudo file

  2. sudo EDITOR=vim visudo