<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/lua/commands_spec.lua, branch fix_repeatcmdline</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>fix(excmd): append original command to error message</title>
<updated>2023-05-05T02:43:28+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2023-05-04T22:32:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=4a098b97e53551a3383e669f4730be542c61e012'/>
<id>4a098b97e53551a3383e669f4730be542c61e012</id>
<content type='text'>
Revert the change to do_cmdline_cmd() from #5226.

This function is used in many places, so making it different from Vim
leads to small differences from Vim in the behavior of some functions
like execute() and assert_fails(). If DOCMD_VERBOSE really needs to be
removed somewhere, a do_cmdline() call without DOCMD_VERBOSE is also
shorter than a do_cmdline() call with DOCMD_VERBOSE.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revert the change to do_cmdline_cmd() from #5226.

This function is used in many places, so making it different from Vim
leads to small differences from Vim in the behavior of some functions
like execute() and assert_fails(). If DOCMD_VERBOSE really needs to be
removed somewhere, a do_cmdline() call without DOCMD_VERBOSE is also
shorter than a do_cmdline() call with DOCMD_VERBOSE.
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.2.4890: inconsistent capitalization in error messages</title>
<updated>2023-05-05T01:20:30+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2023-05-04T23:14:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=88cfb49bee3c9102082c7010acb92244e4ad1348'/>
<id>88cfb49bee3c9102082c7010acb92244e4ad1348</id>
<content type='text'>
Problem:    Inconsistent capitalization in error messages.
Solution:   Make capitalization consistent. (Doug Kearns)

https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa

Co-authored-by: Bram Moolenaar &lt;Bram@vim.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Inconsistent capitalization in error messages.
Solution:   Make capitalization consistent. (Doug Kearns)

https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa

Co-authored-by: Bram Moolenaar &lt;Bram@vim.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(heredoc): allow missing end marker for scripts</title>
<updated>2023-04-29T01:39:55+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2023-04-29T01:23:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7b6d041baed712b071acfa8bb71727a5f5e27561'/>
<id>7b6d041baed712b071acfa8bb71727a5f5e27561</id>
<content type='text'>
Also do not crash when getting heredoc fails.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also do not crash when getting heredoc fails.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lua): allow `:=expr` as a shorter version of `:lua =expr`</title>
<updated>2023-03-22T08:10:04+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2023-03-20T20:11:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a92b38934a2d00c13ee4d1969d994da15e0857ab'/>
<id>a92b38934a2d00c13ee4d1969d994da15e0857ab</id>
<content type='text'>
existing behavior of
  :=
and
  :[range]=

are unchanged. `|` is still allowed with this usage.

However,
   :=p
and similar are changed in a way which could be construed as a breaking
change. Allowing |ex-flags| for := in the first place was a mistake as
any form of := DOES NOT MOVE THE CURSOR. So it would print one line number
and then print a completely different line contents after that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
existing behavior of
  :=
and
  :[range]=

are unchanged. `|` is still allowed with this usage.

However,
   :=p
and similar are changed in a way which could be construed as a breaking
change. Allowing |ex-flags| for := in the first place was a mistake as
any form of := DOES NOT MOVE THE CURSOR. So it would print one line number
and then print a completely different line contents after that.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor!: rename vim.pretty_print =&gt; vim.print</title>
<updated>2023-03-13T00:25:09+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2023-03-07T15:04:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=673d2b52fa4335aa083c52e6686f0728e25b8ebd'/>
<id>673d2b52fa4335aa083c52e6686f0728e25b8ebd</id>
<content type='text'>
Problem:
The function name `vim.pretty_print`:
1. is verbose, which partially defeats its purpose as sugar
2. does not draw from existing precedent or any sort of convention
   (except external projects like penlight or python?), which reduces
   discoverability, and degrades signaling about best practices.

Solution:
- Rename to `vim.print`.
- Change the behavior so that
  1. strings are printed without quotes
  2. each arg is printed on its own line
  3. tables are indented with 2 instead of 4 spaces
- Example:
  :lua ='a', 'b', 42, {a=3}
  a
  b
  42
  {
    a = 3
  }

Comparison of alternatives:
- `vim.print`:
  - pro: consistent with Lua's `print()`
  - pro: aligns with potential `nvim_print` API function which will
    replace nvim_echo, nvim_notify, etc.
  - con: behaves differently than Lua's `print()`, slightly misleading?
- `vim.echo`:
  - pro: `:echo` has similar "pretty print" behavior.
  - con: inconsistent with Lua idioms.
- `vim.p`:
  - pro: very short, fits with `vim.o`, etc.
  - con: not as discoverable as "echo"
  - con: less opportunity for `local p = vim.p` because of potential shadowing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The function name `vim.pretty_print`:
1. is verbose, which partially defeats its purpose as sugar
2. does not draw from existing precedent or any sort of convention
   (except external projects like penlight or python?), which reduces
   discoverability, and degrades signaling about best practices.

Solution:
- Rename to `vim.print`.
- Change the behavior so that
  1. strings are printed without quotes
  2. each arg is printed on its own line
  3. tables are indented with 2 instead of 4 spaces
- Example:
  :lua ='a', 'b', 42, {a=3}
  a
  b
  42
  {
    a = 3
  }

Comparison of alternatives:
- `vim.print`:
  - pro: consistent with Lua's `print()`
  - pro: aligns with potential `nvim_print` API function which will
    replace nvim_echo, nvim_notify, etc.
  - con: behaves differently than Lua's `print()`, slightly misleading?
- `vim.echo`:
  - pro: `:echo` has similar "pretty print" behavior.
  - con: inconsistent with Lua idioms.
- `vim.p`:
  - pro: very short, fits with `vim.o`, etc.
  - con: not as discoverable as "echo"
  - con: less opportunity for `local p = vim.p` because of potential shadowing.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lua): print multiple return values with =expr (#16933)</title>
<updated>2022-01-06T18:42:31+00:00</updated>
<author>
<name>Shadman</name>
<email>13149513+shadmansaleh@users.noreply.github.com</email>
</author>
<published>2022-01-06T18:42:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=287d3566de11f82aa86448998fd4703b1db328bd'/>
<id>287d3566de11f82aa86448998fd4703b1db328bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lua): make =expr print result of expr</title>
<updated>2022-01-04T10:08:07+00:00</updated>
<author>
<name>shadmansaleh</name>
<email>13149513+shadmansaleh@users.noreply.github.com</email>
</author>
<published>2022-01-04T05:05:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d44254641ffb5c9f185db4082d2bf1f04bf1117e'/>
<id>d44254641ffb5c9f185db4082d2bf1f04bf1117e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lua): enable stack traces in error output (#16228)</title>
<updated>2021-11-06T14:26:10+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>8965202+gpanders@users.noreply.github.com</email>
</author>
<published>2021-11-06T14:26:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=03b805aee617f67eb7f33a54822bc76c23a2c5f5'/>
<id>03b805aee617f67eb7f33a54822bc76c23a2c5f5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(tests): remove redir_exec #15718</title>
<updated>2021-09-19T09:29:37+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2021-09-19T09:29:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2afbce7651f79b0626ebeae3688274ce18ac2920'/>
<id>2afbce7651f79b0626ebeae3688274ce18ac2920</id>
<content type='text'>
Problem
- `redir_exec` is obsolete, but it keeps getting used in new tests
  because people copy existing tests.
- Disadvantages of `redir_exec`:
  - Captures extra junk before the actual error/message that we _want_ to test.
  - Does not fail on error, unlike e.g. `command()`.

Solution
- Use new functions like `nvim_exec` and `pcall_err`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem
- `redir_exec` is obsolete, but it keeps getting used in new tests
  because people copy existing tests.
- Disadvantages of `redir_exec`:
  - Captures extra junk before the actual error/message that we _want_ to test.
  - Does not fail on error, unlike e.g. `command()`.

Solution
- Use new functions like `nvim_exec` and `pcall_err`.</pre>
</div>
</content>
</entry>
<entry>
<title>test/vim.validate(): assert normalized stacktrace</title>
<updated>2020-10-05T13:47:59+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2020-09-13T02:04:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=8e77d70e29f936f4e708ee3244046188b8ad0383'/>
<id>8e77d70e29f936f4e708ee3244046188b8ad0383</id>
<content type='text'>
- The previous commit lost information in the tests. Instead, add some
  more "normalization" substitutions in pcall_err(), so that the general
  shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- The previous commit lost information in the tests. Instead, add some
  more "normalization" substitutions in pcall_err(), so that the general
  shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches()
</pre>
</div>
</content>
</entry>
</feed>
