Thursday 23 December 2010

Set-IseThemeVim.ps1

  1. <# 
  2. .SYNOPSIS 
  3.     This script sets an ISE Theme to similar to the old VIM editor. 
  4. .DESCRIPTION 
  5.     This script sets the key values in $PsIse.Options to values consistent 
  6.     with the VIM editor, beloved by many, particularly on the Powershell 
  7.     product team. This script is based on Davis Mohundro's blog post
  8.     (http://bit.ly/iib5IM), updated for RTM of PowerShell V2.0. See also  
  9. .NOTES 
  10.     File Name  : Set-ISEThemeVIM.ps1 
  11.     Author     : Thomas Lee - tfl@psp.co.uk 
  12.     Requires   : PowerShell Version 2.0 (ISE only) 
  13. .LINK 
  14.     This script posted to: 
  15.         http://pshscriptsbog.blogspot.com  
  16.         http://bit.ly/iaA2iX
  17. .EXAMPLE 
  18.     This script when run resets colours on key panes, including 
  19.     colourising tokens in the script pane. Try it and see it... 
  20. #> 
  21.  
  22.  
  23. # PowerShell ISE version of the VIM blackboard theme at  
  24. # http://www.vim.org/scripts/script.php?script_id=2280 
  25.  
  26. # Set font name and size 
  27. $psISE.Options.FontName = 'Courier New' 
  28. $psISE.Options.FontSize = 16 
  29.  
  30. # Set colours for output pane 
  31. $psISE.Options.OutputPaneBackgroundColor     = '#FF000000' 
  32. $psISE.Options.OutputPaneTextBackgroundColor = '#FF000000' 
  33. $psISE.Options.OutputPaneForegroundColor     = '#FFFFFFFF' 
  34.  
  35. # Set colours for command pane 
  36. $psISE.Options.CommandPaneBackgroundColor    = '#FF000000' 
  37.  
  38. # Set colours for script pane 
  39.  
  40. $psise.options.ScriptPaneBackgroundColor    ='#FF000000' 
  41.  
  42. # Set colours for tokens in Script Pane 
  43. $psISE.Options.TokenColors['Command'] = '#FFFFFF60' 
  44. $psISE.Options.TokenColors['Unknown'] = '#FFFFFFFF' 
  45. $psISE.Options.TokenColors['Member'] = '#FFFFFFFF' 
  46. $psISE.Options.TokenColors['Position'] = '#FFFFFFFF' 
  47. $psISE.Options.TokenColors['GroupEnd'] = '#FFFFFFFF' 
  48. $psISE.Options.TokenColors['GroupStart'] = '#FFFFFFFF' 
  49. $psISE.Options.TokenColors['LineContinuation'] = '#FFFFFFFF' 
  50. $psISE.Options.TokenColors['NewLine'] = '#FFFFFFFF' 
  51. $psISE.Options.TokenColors['StatementSeparator'] = '#FFFFFFFF' 
  52. $psISE.Options.TokenColors['Comment'] = '#FFAEAEAE' 
  53. $psISE.Options.TokenColors['String'] = '#FF00D42D' 
  54. $psISE.Options.TokenColors['Keyword'] = '#FFFFDE00' 
  55. $psISE.Options.TokenColors['Attribute'] = '#FF84A7C1' 
  56. $psISE.Options.TokenColors['Type'] = '#FF84A7C1' 
  57. $psISE.Options.TokenColors['Variable'] = '#FF00D42D' 
  58. $psISE.Options.TokenColors['CommandParameter'] = '#FFFFDE00' 
  59. $psISE.Options.TokenColors['CommandArgument'] = '#FFFFFFFF' 
  60. $psISE.Options.TokenColors['Number'] = '#FF98FE1E' 
Technorati Tags: ,,,

No comments: