OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How can I figure out the meaning of a Vim error code?

  • Thread starter Thread starter cgsdfc
  • Start date Start date
C

cgsdfc

Guest
The way Vim handles error or exception is to give an error code like E107 with a piece of message like Unknown function: a. To figure out the details about an error code I can use :h E107 or trigger the error to see what will happen.

However, some error codes remain opaque to me since the document just list them rather than giving a description. For example, the document of E107 also list the code E117, but the meaning of it is not stated clearly. What's worse, :h E107 shows that there is no individual document for this error code.

Below is the relevant document. Since the paragraph mentions range a lot, I guess E117 is to do range.

Code:
                                          :cal :call E107 E117
:[range]cal[l] {name}([arguments])
        Call a function.  The name of the function and its arguments
        are as specified with |:function|.  Up to 20 arguments can be
        used.  The returned value is discarded.
        Without a range and for functions that accept a range, the
        function is called once.  When a range is given the cursor is
        positioned at the start of the first line before executing the
        function.
        When a range is given and the function doesn't handle it
        itself, the function is executed for each line in the range,
        with the cursor in the first column of that line.  The cursor
        is left at the last line (possibly moved by the last function
        call).

As I am quite new to the errors that vim can produce, all I can do is guessing. Generally speaking, is there a better way I can figure out the meaning of a Vim error code? Thanks a lot.
<p>The way Vim handles error or exception is to give an error code like <code>E107</code> with a piece of message like <code>Unknown function: a</code>. To figure out the details about an error code I can use <code>:h E107</code> or trigger the error to see what will happen.</p>

<p>However, some error codes remain opaque to me since the document just list them rather than giving a description. For example, the document of <code>E107</code> also list the code <code>E117</code>, but the meaning of it is not stated clearly. What's worse, <code>:h E107</code> shows that there is no individual document for this error code. </p>

<p>Below is the relevant document. Since the paragraph mentions <code>range</code> a lot, I guess <code>E117</code> is to do <code>range</code>.</p>

<pre><code> :cal :call E107 E117
:[range]cal[l] {name}([arguments])
Call a function. The name of the function and its arguments
are as specified with |:function|. Up to 20 arguments can be
used. The returned value is discarded.
Without a range and for functions that accept a range, the
function is called once. When a range is given the cursor is
positioned at the start of the first line before executing the
function.
When a range is given and the function doesn't handle it
itself, the function is executed for each line in the range,
with the cursor in the first column of that line. The cursor
is left at the last line (possibly moved by the last function
call).
</code></pre>

<p>As I am quite new to the errors that vim can produce, all I can do is guessing. Generally speaking, is there a better way I can figure out the meaning of a Vim error code? Thanks a lot.</p>
I have found how to fix this.
 

Latest posts

B
Replies
0
Views
1
Blundering Ecologist
B
Top