linux中手工配置默认编辑器

Ubuntu 系统会为用户预设程序nano .很多时候并不想用nano而用nvim
nvim https://github.com/neovim/neovim
nvim 插件参考 https://xiaozhou.net/from-vim-to-neovim-2016-05-21.html
可以使用 :

root@miner:~/mawork# update-alternatives --config editor
There are 5 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
  3            /usr/bin/nvim        30        manual mode
  4            /usr/bin/vim.basic   30        manual mode
  5            /usr/bin/vim.tiny    15        manual mode

输入3 回车就ok了;

posted @ 2020-02-06 10:07  lvusyy  阅读(247)  评论(0编辑  收藏  举报