0

I just downloaded and started using Vim so I'm still a bit confused with it. I've been watching tutorial videos and I see that I can open Vim by typing vim in command. However when I do it I get

'vim' is not recognized as an internal or external command, operable program or batch file

Did I need to install something else? Also I want to code and compile C in vim, would I need to install a compiler?

5
  • 1
    Is the executable in your $PATH? Also yes, you'd need to install a compiler, vim doesn't compile code for you. Commented Jan 4, 2014 at 5:18
  • Are you sure you are not trying to use gvim (the gui vim editor)? If you are, then you can use gvim to start it or just click on the .exe file. Otherwise you can try the vi command to start it. Commented Jan 4, 2014 at 5:28
  • What environment are you on by the way? Windows, Mac OS X, Linux? Commented Jan 4, 2014 at 5:29
  • I'm using Windows. Sorry I'm really new at this. Commented Jan 4, 2014 at 5:34
  • I voted to close, sorry, because it has nothing to do with vim editing, even if the problem is about vim. in general, it is a kind of using application under windows question. you can s/vim/any/ Commented Jan 4, 2014 at 17:04

3 Answers 3

1

You have to invoke Vim (or gvim, the GUI application) with the full path, e.g.

"C:\Program Files\vim\vim74\vim.exe"

The Vim installer doesn't add the location to the PATH. In Windows, you can create a shortcut (*.lnk) in your Start Menu, or re-run "C:\Program Files\vim\vim74\install.exe", which has an option to install batch files to C:\Windows, or manually add "C:\Program Files\vim\vim74" to your PATH via the Control Panel.


Vim is just a (very advanced and powerful) text editor, so it ships with syntax highlighting for most programming languages, but unlike IDEs, it doesn't come with the full toolset of compiler, linker, debugger, etc. You need to separately install that (e.g. mingw, or Microsoft's compiler from the Windows SDK, or any other).

Sign up to request clarification or add additional context in comments.

Comments

0
C:\>vim somefile.txt

During Vim (for Win32) install, you have the option to install batch files for launching vim from the command-line.

1 Comment

That doesn't work for me. And is it too late to install that?
0
  1. make sure you install vim properly. (https://www.vim.org/download.php)

  2. On Windows. Don't forget to set the environment variables (simply add \vim\vim**; at the end of the classpath)

  3. Type vim at command line (gvim.exe will start the Graphic user interface software).

If you want to compile and run c program using the command line, you should download the GCC Compiler and follow the same procedure as mentioned before (The classpath thing). Then you can compile C program using gcc command.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.