Open In App

How to Install and Use Vim on DOSBox?

Improve
Improve
Like Article
Like
Save
Share
Report

DOSBox is a program that emulates all the functionality of MS-DOS.  The DOSBox is primarily used to run older video games and includes simulation for sound, graphics, input, and networking. It is free to use and can also be used as an alternative of MS-DOS for some use cases.

In this article, we will look into how you can use DOSBox with all the functionality and reliability of vim.

Vim is a popular and excellent text editor program available for a long time on multiple platforms, including DOS. However, the installation process is not entirely straightforward, so here I attempt at explaining how to install and use Vim Editor on DOSBox (and to my knowledge, any PC running DOS too).

Note: This article covers the installation and usage of the 32 bit DOS version, not the 16 bit one. We choose this version as the 16-bit version doesn’t contain syntax highlighting, color schemes, and other key features. However, the 32-bit version requires a DPMI host (CWSDPMI is the popular choice that comes with our installation; more on this later). This is not the case with the bare-bones 16-bit version. It is advisable to do the unzipping, copying, and moving files around in the host OS rather than in DOSBox itself unless you are really adept at doing these things.

Installation:

Follow the below steps to install DOSBox and use it with all the functionality of vim:

Step 1: Head over to vim’s website and find the required download link here. Scroll down to ’32 bit DOS Executable’. Click on the download link, not in brackets, and the zip file should start downloading.

Step 2: Keep this link in a separate window/tab as we will need it soon.

Step 3: Locate the zip downloaded earlier and extract it. Move the ‘vim73’ which is inside the ‘vim’ folder into your mounting directory.

Step 4: Open DOSBox and mount as usual. Make sure to have put the ‘vim73’ folder into this mounting directory.

Step 5: Unzip the ‘csdpmi4b.zip’ file either through dos or through your host OS. You may put the ‘BIN’ and ‘MANIFEST’ folders directly into VIM73 or in a separate folder inside VIM73. Inside the ‘BIN’ folder, you will find the CWSDPMI.exe program. Do remember this location for future reference.

Step 6: For now, you can try running it and then head over to your main VIM installation folder, where you can run vim.exe. The editor works but is a bare-bones version.

Step 7: Go to the FTP link provided earlier in the article and look for ‘vim73rt.zip’. Click on it and the download should begin. Unzip the zip file. Go to the ‘VIM73’ folder inside the ‘VIM’ folder and copy(cut) the entire content of the folder. Plonk it all into the same ‘VIM73’ folder created earlier.

Step 8: Head to the location of the CWSDPMI.exe file from Step 5. Run ‘CWSDPMI’ or  ‘CWSDPMI.exe’ and head back to the VIM73 folder.

Step 9: Run ‘install’ or ‘install.exe’. Read the options at the prompt. We have typed ‘d’ and moved on, but this is up to you.

Here the difficult part is over.

Usage:

To use the installed DOSBox follow the below steps:

Step 1: The ‘vim.exe’ is the program you run to use vim(with the filename as argument). It is located in the same ‘VIM73’ folder.

Step 2: When you go running vim.exe, the response is ‘Load error: no DPMI – Get csdpmi*b.zip’. You have to run CWSDPMI.exe(like in Step 7 of Installation). The problem is that it asks you to do this every time you want to run vim.

Step 3: There might be a better way of solving this, but thankfully writing a batch script didn’t take that long.

That’s it! Whenever you want to run VIM, I run this script. If no arguments are provided it opens VIM with splash-screen. Otherwise, it opens (or creates and then opens) the file. However, it only does that for one file at a time. Modifying this to open multiple files is left as an exercise for the adventurous reader.


Last Updated : 20 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads