Basic text editor in command prompt? [closed]
Matthew Martinez
I know for linux and Unix machines there is emacs and vi text editor and gcc is built in to compile c code? what would be the Windows text editor in cmd and are there any compilers built in?
615 Answers
I made a simple VIM clone from batch to satisfy your needs.
@echo off
title WinVim
color a
cls
echo WinVim 1.02
echo.
echo To save press CTRL+Z then press enter
echo.
echo Make sure to include extension in file name
set /p name=File Name:
copy con %name%
if exist %name% copy %name% + conHope this helps :)
2There is also a port of nano for windows, which is more more akin to notepad.exe than vim is
Get the WINNT zip. Tested in Windows 7 works as expected
2I want to add that it is very strange to introduce Core and Nano servers without native console full-featured editor. Like others I`ll recommend to use vim or nano. But my suggestion is to install it via OneGet (require WMF5)! They both are presented in Chocolatey repository so installation is simple and fast:
PS C:> Find-Package -Name vim | Format-Table -AutoSize
Name Version Status ProviderName Source Summary
---- ------- ------ ------------ ------ -------
vim 7.4.638 Available Chocolatey chocolatey Vim is an advanced text editor...PS C:> Install-Package vim
MS-DOS Editor (or just edit) is a 16-bit text editor that is still included with 32-bit versions of Windows XP, Vista, 7, 8 and 8.1. It can edit files upto 65,279 lines long and has mouse support. Being an 16-bit DOS editor, it cannot run directly on 64-bit versions of Windows. It can be launched by typing edit at the command prompt.
There is no command based text editors in windows (at least from Windows 7). But you can try the vi windows clone available here :
2There is no command based text editors in windows (at least from Windows 7). But you can try the vi windows clone available here :
You are Wrong! If you are using Windows 7, you can using this command:
copy con [filename.???]Or if you using Windows XP or lower, use (is have a DOS GUI):
editAny comment?
13I also wondered what had happened to the text editor in console mode in windows. I remembered the famous mc from Linux. Of course, it's available for Windows!
GNU Midnight Commander is a visual file manager, licensed under GNU General Public License and therefore qualifies as Free Software. It's a feature rich full-screen text mode application that allows you to copy, move and delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included.
Midnight Commander is based on versatile text interfaces, such as Ncurses or S-Lang, which allows it to work on a regular console, inside an X Window terminal, over SSH connections and all kinds of remote shells.
As mentioned somewhere there are also FAR Manager
vim may be challenging for beginners. For a quick-and-dirty Windows console-mode text editor, I would suggest Kinesics Text Editor.
3There actually is a basic text editor on Windows. In the command prompt simply type edit, and it should take you to there. Now, someone already mentioned it, but they said it's XP or lower. Actually it works perfectly fine on my Windows 7.
Again, I am running Windows 7, so I've no idea if it's still is present on Windows 8.
And as IInspectable pointed out, there's no built in C compilers, which is a disappointment. Oh, well, back to MinGW.
Also, "here" someone mentioned Far Manager, which has ability to edit files, so that's some alternative.
Hope that helps
5You can install vim/vi for windows and set windows PATH variable and open it in command line.
As said by Morne you can use the vi editor for windows
Also you can get CodeBlocks for windows from here
Install it and direct your PATH environment variable of your windows installation to gcc or other binaries in bin folder of codeblocks installation folder.
Now you can use gcc or other compilers from cmd like linux.
There is one built into windows 7 in which you can open by clicking the windows and r keys at the same time and then typing edit.com.
I hope this helped
1The standard text editor in windows is notepad. There are no built-in command line editors.
Windows does not ship a C or C++ compiler. The .NET framework comes with several compilers, though: csc.exe (C# compiler), vbc.exe (VB.NET compiler), jsc.exe (JavaScript compiler).
If you want a free alternative you can download Visual Studio Express 2013 for Windows Desktop that comes with an optimizing C/C++ compiler (cl.exe).
In a pinch, just type 'notepad (filename)' and notepad will pop up with the file you want to edit in it. Otherwise Vim or some such will have to be installed.
1notepad filename.extension will open notepad editor
5