Basic text editor in command prompt?

WindowsTextCmd

Windows Problem Overview


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?

Windows Solutions


Solution 1 - Windows

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% + con

Hope this helps :)

Solution 2 - Windows

There is also a port of nano for windows, which is more more akin to notepad.exe than vim is

https://www.nano-editor.org/dist/win32-support/

Get the WINNT zip. Tested in Windows 7 works as expected

Solution 3 - Windows

I 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

Solution 4 - Windows

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.

Solution 5 - Windows

There is no command based text editors in windows (at least from Windows 7). But you can try the vi windows clone available here : http://www.vim.org/

Solution 6 - Windows

> There is no command based text editors in windows (at least from Windows 7). But you can try the vi windows clone available here : http://www.vim.org/

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):

edit

Any comment?

Solution 7 - Windows

vim may be challenging for beginners. For a quick-and-dirty Windows console-mode text editor, I would suggest Kinesics Text Editor.

Solution 8 - Windows

I 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

Solution 9 - Windows

There 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.

Wikipedia page

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

Solution 10 - Windows

You can install vim/vi for windows and set windows PATH variable and open it in command line.

Solution 11 - Windows

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.

Solution 12 - Windows

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

Solution 13 - Windows

The 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).

Solution 14 - Windows

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.

Solution 15 - Windows

notepad filename.extension will open notepad editor

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGpipesView Question on Stackoverflow
Solution 1 - Windowsgr1mView Answer on Stackoverflow
Solution 2 - WindowschiliNUTView Answer on Stackoverflow
Solution 3 - WindowsStanT.View Answer on Stackoverflow
Solution 4 - WindowsRohit KharsanView Answer on Stackoverflow
Solution 5 - WindowsMorneView Answer on Stackoverflow
Solution 6 - WindowsBatch GenuineView Answer on Stackoverflow
Solution 7 - WindowsBill_StewartView Answer on Stackoverflow
Solution 8 - WindowsPaulView Answer on Stackoverflow
Solution 9 - WindowsSergiy KolodyazhnyyView Answer on Stackoverflow
Solution 10 - WindowscodingbruhView Answer on Stackoverflow
Solution 11 - Windowskrg265View Answer on Stackoverflow
Solution 12 - WindowsMattView Answer on Stackoverflow
Solution 13 - WindowsIInspectableView Answer on Stackoverflow
Solution 14 - WindowsSkipKentView Answer on Stackoverflow
Solution 15 - WindowsLijoView Answer on Stackoverflow