Integrating VIM with the IDE
From Open Watcom
VIM is a popular editor based on VI for unix. It it very useful for editing C/C++ files. This document explains how to integrate it with the watcom IDE.
Contents |
Procedure
- Open up the OpenWatcom IDE
- Select File | Set Text Editor from the menu.
- Set Editor Type to exe.
- Browse for the path of gvim.exe on your machine. On mine its "C:\Program Files\Vim\vim70\gvim".
- For editor parameters enter --servername VIMIDE --remote-tab-silent "+call cursor (%r, %c)" %f
Features
Goto Errors
When doubleclicking an error line then it opens in gvim and if gvim already was running, a new tab is opened, if necessary.
Running wmake from VIM
There are two solutions. Placing a make.bat file in the project directory, and creating a vim macro.
Bat file
Place a "make.bat" into your projectdirectory that has the contents: wmake -f <yourprojectname>.mk1. This causes the "make" command (:make from command mode) in vim to work. There is probably a less hackish way of doing this.
VIM macro
Put the following command in your .vimrc command -nargs=* Wmake !wmake <args> in vimrc. :Wmake will run wmake.
What doesn't work
- Getting clib and the sdk help by selecting words.
- You have to save the file before recompiling. This issue applies to all external editors.
Categories: VIM | IDE | Text Editors

