To change the default text editor, you can create a symbolic link to the preferred editor, or you can modify the environment variable that designates the text editor. This can be done by editing the appropriate profile file, where you would add a line to set the desired editor as the default. This adjustment allows you to seamlessly use your chosen text editor for editing tasks.
Source Link