Getting Started. Vi is a terminal application, so youâll have to start it from a terminal window. Use the vi /path/to/file command to open an existing file with Vi. The vi /path/to/file command also works if the file doesnât exist yet; Vi will create a new file and write it to the specified location when you save.Remember to use sudo if you want to edit a system file.So, for example, youâd type sudo vi /etc/fstab if you wanted to edit your fstab file.i is a modal text editor, and it opens in command mode. Trying to type at this screen will result in unexpected behavior. While in command mode, you can move the cursor around with the arrow keys. Press the x key to delete the character under the cursor.
1 Persistent vomiting despite the change in diet can be an indication of some inflammatory bowel disease which needs to be treated by a vet. 2  Indigestion: One of the most common causes of a dog throwing up white foam is an upset stomach.
A dog may vomit yellow foam simply because his stomach is empty and the bile can be irritating. If your dog is otherwise healthy â and he's eating and defecating normally â it may help to reduce the time in between meals. But this doesnât mean that your dog should be fed more. Instead, one meal can be divided into two or three smaller but more frequent feedings. Unfortunately, there are many medical conditions that can cause a dog to vomit on an empty stomach, so a phone call to your vet is a good idea if you notice this problem. Potential Medical Concerns If thereâs something in the vomit besides yellow foam, it may help to bring a sample to your veterinarian.