Hi,
You can turn off auto-indenting executing :set noautoindent
in vi. But this is a temporary solution, just for current editing session. In your case, it looks like there is some vi configuration saved in your droplet. So, there are at least three places where you can search for vi configuration.
1. Configuration file .exrc
in your home directory
~/.exrc
2. Configuration file .exrc
in your working directory
Bear in mind that .exrc file is hidden, so to list it you must use ls
command with parameter -a
, e.g.
ls -a ~/
3. Environment variable EXINIT. This variable consists of a sequence of one or more vi configuration commands. You can simply check if it is set displaying its value.
echo $EXINIT
Then, if you found any vi configuration saved, you need to change it for non-auto-indenting.
1. If you found the configuration file .exrc
, open it in an editor, search for autoindent
string within its content, and replace it with noautoindent
.
2. If you have vi configuration stored under environment variable, you can change its value
export EXINIT=$(echo $EXINIT | sed "s/autoindent/noautoindent/")