Updaded nimline docs.
h3rald h3rald@h3rald.com
Sun, 12 Aug 2018 22:39:56 +0200
1 files changed,
8 insertions(+),
2 deletions(-)
jump to
M
assets/nimline/nimline.html
→
assets/nimline/nimline.html
@@ -1369,7 +1369,13 @@ <span class="Identifier">echo</span> <span class="StringLit">"You typed: "</span><span class="Punctuation">,</span> <span class="Identifier">str</span></pre><p>Optionally, you can also configure custom key bindings for keys and key sequences:</p>
<pre class="listing"><span class="Identifier">KEYMAP</span><span class="Punctuation">[</span><span class="StringLit">"ctrl+k"</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Keyword">proc</span><span class="Punctuation">(</span><span class="Identifier">ed</span><span class="Punctuation">:</span> <span class="Keyword">var</span> <span class="Identifier">LineEditor</span><span class="Punctuation">)</span> <span class="Operator">=</span> <span class="Identifier">ed</span><span class="Operator">.</span><span class="Identifier">clearLine</span><span class="Punctuation">(</span><span class="Punctuation">)</span></pre><p>Additionally, you can also configure a <strong>completionCallback</strong> proc to trigger auto-completion by pressing TAB:</p> <pre class="listing"><span class="Identifier">ed</span><span class="Operator">.</span><span class="Identifier">completionCallback</span> <span class="Operator">=</span> <span class="Keyword">proc</span><span class="Punctuation">(</span><span class="Identifier">ed</span><span class="Punctuation">:</span> <span class="Identifier">LineEditor</span><span class="Punctuation">)</span><span class="Punctuation">:</span> <span class="Identifier">seq</span><span class="Punctuation">[</span><span class="Identifier">string</span><span class="Punctuation">]</span> <span class="Operator">=</span> - <span class="Keyword">return</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="StringLit">"copy"</span><span class="Punctuation">,</span> <span class="StringLit">"list"</span><span class="Punctuation">,</span> <span class="StringLit">"delete"</span><span class="Punctuation">,</span> <span class="StringLit">"move"</span><span class="Punctuation">,</span> <span class="StringLit">"remove"</span><span class="Punctuation">]</span></pre></p> + <span class="Keyword">return</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="StringLit">"copy"</span><span class="Punctuation">,</span> <span class="StringLit">"list"</span><span class="Punctuation">,</span> <span class="StringLit">"delete"</span><span class="Punctuation">,</span> <span class="StringLit">"move"</span><span class="Punctuation">,</span> <span class="StringLit">"remove"</span><span class="Punctuation">]</span></pre><p><strong>Note</strong> When compared to the readline or linenoise libraries, this module has the following limitations:</p> +<ul class="simple"><li>It is only possible to edit one line of text at a time. When using the <strong>readLine</strong> method, it will not be possible to physically go to the next line (this simplifies things a bit...).</li> +<li>No UTF8 support, only ASCII characters are supported.</li> +<li>No support for colorized output.</li> +<li>Only limited support for Emacs keybindings, no support for Vi mode and Vi keybindings.</li> +</ul> +</p> <div class="section" id="6"> <h1><a class="toc-backref" href="#6">Imports</a></h1> <dl class="item">@@ -1725,7 +1731,7 @@ <div class="row">
<div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small>Made with Nim. Generated: 2018-08-12 22:27:21 UTC</small> + <small>Made with Nim. Generated: 2018-08-12 22:38:27 UTC</small> </div> </div> </div>