55 lines
2.4 KiB
HTML
55 lines
2.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="stylesheet" href="main.css" type="text/css" />
|
|
<link rel="stylesheet" href="blog.css" type="text/css" />
|
|
<link rel="alternate" type="application/rss+xml" title="Subscribe to this page..." href="feed.rss" />
|
|
<title>Powershell syntax now supported by ALE (Vim) plugin</title>
|
|
</head><body>
|
|
<div id="divbodyholder">
|
|
<div class="headerholder"><div class="header">
|
|
<div id="title">
|
|
<h1 class="nomargin"><a class="ablack" href="http://zigford.org/index.html">zigford.org</a></h1>
|
|
<div id="description"><a href="about.html">About</a><a href="links.html"> | Links</a><a href="scripts.html"> | Scripts</a><br>Sharing linux/windows scripts and tips</br></div>
|
|
</div></div></div>
|
|
<div id="divbody"><div class="content">
|
|
<!-- entry begin -->
|
|
<h3><a class="ablack" href="powershell-syntax-now-supported-by-ale-vim-plugin.html">
|
|
Powershell syntax now supported by ALE (Vim) plugin
|
|
</a></h3>
|
|
<!-- bashblog_timestamp: #201904151145.28# -->
|
|
<div class="subtitle">April 15, 2019 —
|
|
Jesse Harris
|
|
</div>
|
|
<!-- text begin -->
|
|
<p><a href="https://github.com/w0rp/ale">ALE</a> project has approved my PR to show powershell syntax errors by parsing
|
|
the powershell by powershell itself. If the current buffer has a filetype of
|
|
Powershell, the buffer is run through the following powershell script to check
|
|
for syntax errors. Errors are then displayed in Vim by ALE:</p>
|
|
<hr />
|
|
<pre><code> Param($Script)
|
|
trap {$_; continue } & {
|
|
$Contents = Get-Content -Path $Script;
|
|
$Contents = [string]::Join([Environment]::NewLine, $Contents);
|
|
[void]$ExecutionContext.InvokeCommand.NewScriptBlock($Contents);
|
|
};
|
|
</code></pre>
|
|
<p>Tags: <a href='tag_ale.html'>ale</a>, <a href='tag_vim.html'>vim</a>, <a href='tag_powershell.html'>powershell</a></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- text end -->
|
|
<!-- entry end -->
|
|
</div>
|
|
<div id="footer">© <a href="http://twitter.com/zigford_org">Jesse Harris</a> — <a href="mailto:jesse@zigford.org">jesse@zigford.org</a><br/>
|
|
Generated with <a href="https://github.com/cfenollosa/bashblog">bashblog</a>, a single bash script to easily create blogs like this one</div>
|
|
</div></div>
|
|
</body></html>
|