Reputation: 1581
Does Powershell have the capacity to generate some kind of terminal-based text editor program? I am switching to Windows because it supports a few programs I can't use otherwise; but I am having trouble discovering some sort of way to edit text files directly from Powershell. Is it possible to create a terminal-based text editor with a Powershell script; and if not is there a simple alternative?
Upvotes: 0
Views: 3454
Reputation: 1007
You use chocolately if it is installed on your powershell if you don’t have it just search for it online
Choco install nano
After this you can use nano
Then just
nano filenam
If it exists it edit it and if it doesn’t it create a new file
Upvotes: 1
Reputation: 309
I would suggest micro
which is a powershell/ cmd/ terminal based text editor for Windows and other OS
Because micro
is flexible cut/copy/paste same keyboard shortcut as notepad
. The best part is, it has color highlighter sensitive to programming language. Here is an image
Note: don't forget the add the micro.exe path to environment variable.
Command to open a file from cmd:
micro ./file.xyz
Upvotes: 1