Editing PowerShell Scripts with VIM

Many *nix folks love the VI editor. There is a very cool improved version of VI called VI Improved, or VIM. VIM is text editor with no mouse. All you get is a keyboard in the console window. They actually do have a GUI’er version that is pretty slick as well. But to really fly on this, the keyboard navigation is the way to go. I am definitely not there but I have found that it can be a nice tool to do a quick update to a script when you are in the console and don’t want to fire up an external editor. Here’s what it looks like

image

There are some plugins that you can get to get PS highlighting that were written by Peter Provost.

If you are an VI type of guy, or gal, this could be a great tool for you.

Comments (4) -

i've got real issues with unicode using VIM and powershell scripts. not pretty.

Thanks for the information on editing scripts with VIM. I was curious whether anyone had created a syntax highlighting plugin for Powershell. If it provides help for omni-completion, that would be very cool. Will check it out.

BTW...There are now x64 binaries available for VIM version 7.2. It's a command line installer, but seems to work fine in Vista x64.

code.google.com/p/vim-win3264/wiki/Win64Binaries

In this blog, I forget my usual habit and I post things here!

Does anyone know if it is it possible to use vim to edit a text file on a remote machine when logged in via PowerShell (i.e. via new-pssession)? Or if there is any alternative way to do this?

Comments are closed