Group:  English: General ยป microsoft.public.windows.powershell
Thread: What editor to use on cmdlets?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

What editor to use on cmdlets?
ryanlsanders[ at ]gmail.com 13.07.2007 15:23:14
I am used to working linux and typing

vi filename

When in msh what do other use to edit? Do you stay in the msh and
type

edit filename

and use dos edit

maybe people use notepad or notepad++

Just trying to get some idea to help me out.

Re: What editor to use on cmdlets?
"Brandon Shell" <tshell.mask[ at ]gmail.com> 13.07.2007 15:38:19
This is up to personal preference, but we had a recent discussion on this
found here:
http://groups.google.com/group/microsoft.public.windows.powershell/browse_thread/thread/d5e89bc433576a7a/0a872cd44f84cb7e?lnk=raot

<ryanlsanders[ at ]gmail.com> wrote in message
news:1184340194.694686.267090[ at ]n2g2000hse.googlegroups.com...
[Quoted Text]
>I am used to working linux and typing
>
> vi filename
>
> When in msh what do other use to edit? Do you stay in the msh and
> type
>
> edit filename
>
> and use dos edit
>
> maybe people use notepad or notepad++
>
> Just trying to get some idea to help me out.
>

Re: What editor to use on cmdlets?
ryanlsanders[ at ]gmail.com 13.07.2007 17:29:39
Perfect!

Thanks!

On Jul 13, 10:38 am, "Brandon Shell" <tshell.m...[ at ]gmail.com> wrote:
[Quoted Text]
> This is up to personal preference, but we had a recent discussion on this
> found here:http://groups.google.com/group/microsoft.public.windows.powershell/br...
>
> <ryanlsand...[ at ]gmail.com> wrote in message
>
> news:1184340194.694686.267090[ at ]n2g2000hse.googlegroups.com...
>
> >I am used to working linux and typing
>
> > vi filename
>
> > When in msh what do other use to edit? Do you stay in the msh and
> > type
>
> > edit filename
>
> > and use dos edit
>
> > maybe people use notepad or notepad++
>
> > Just trying to get some idea to help me out.


Re: What editor to use on cmdlets?
"Jason" <nospam[ at ]nospam.com> 13.07.2007 21:03:54
[Quoted Text]
>I am used to working linux and typing
> vi filename

If you like vi, vim works fine in PowerShell on Windows
(http://www.vim.org/download.php#pc). There's a thread on this posted just
above this one.

Here's a function you can put into your profile so that you can pipe into
vim too (e.g., "dir c:\ | vim"):

function vim ( $path = $null )
{
$vimpath = 'C:\Progra~1\Vim\vim71\vim.exe'
if ($path -ne $null) {invoke-expression "$vimpath $path"}
elseif ( $input.movenext() )
{
$input.reset()
$input | out-string | out-file "$env:TEMP\vimtempfile.txt"
invoke-expression "$vimpath $env:TEMP\vimtempfile.txt"
remove-item "$env:TEMP\vimtempfile.txt"
}
else { invoke-expression "$vimpath" }
}


Cheers,
Jason


------------------------------------------------------
PowerShell Training at SANS Conferences
http://www.WindowsPowerShellTraining.com
------------------------------------------------------



Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net