Generally, the default editor in ubuntu is nano. you can directly edit a file to enable nano by default. For example, when "crontab-e" is input, the nano editor is opened by default. If anyone familiar with VIM wants the default editor to use vim, we need to modify the default editor of ubuntu. Modify ubuntu Mo
Generally, the default editor in ubuntu is nano. you can directly edit a file to enable nano by default. For example, when "crontab-e" is input, the nano editor is opened by default.
If anyone familiar with VIM wants the default editor to use vim, we need to modify the default editor of ubuntu.
There are three methods to modify the ubuntu default editor:
1. enter the following directly on the terminal:
Echo export EDITOR =/usr/bin/vim> ~ /. Bashrc
2. use the system management tool update-alternatives to modify
Enter at the terminal:
Update-alternatives -- config editor
Select vim. basic.
3. if only the nano and vim editors are left in the system, if we delete the nano completely, vim is selected as the default editor by default.
Enter the command to delete the nano editor on the terminal:
Sudo apt-get remove nano
After the modification is complete, enter:
Crontab-e
Let's see if the vim editor is popular.
Change the default program to run
For example, how can I change the default reading tool for a PDF file?
Find a PDF file, right-click it, and open it with another program. you can select a different reader. but how can you specify it as the default reader?
Ubuntu has two files, which are related to the default file opening method:
1./etc/gnome/defaults. list stores the global open mode.
2 .~ /. Local/share/applications/mimeapps. list stores the personal Open method.
If there is a conflict between the two, local personal settings are preferred. For example:
Application/pdf = Foxit-Reader.desktop;
In this way, FoxitReader is used as the default PDF reader by default, rather than the built-in evince. Note the format. the file name must be written to the correct format, followed by a semicolon.
How to write the file name? In fact, you can choose "right-click"> open with other programs "to go to mimeapps. list to generate a record. this record will display the file name of the program you selected. now you should know how to do it.