I would like to insert the number
1, and then increase the number with calling
evil-numbers/inc-at-pt from the package evil-numbers.
So I went looking into the source code of the function
(defun evil-numbers/inc-at-pt (amount &optional no-region) "Increment the number at point or after point before end-of-line by `amount'. When region is selected, increment all numbers in the region by `amount' NO-REGION is internal flag that allows `evil-numbers/inc-at-point' to be called recursively when applying the regional features of `evil-numbers/inc-at-point'. " (interactive "p*") [...]
This function don't need any region by the way. You can place your cursor after the number, without any region. It will increase the number if there is no region, then it will look for any number and increase it.
So I created a function around this
(defun eshell-go-to-number-down () (interactive "p*") (evil-insert) (insert "0") (evil-numbers/inc-at-pt 1))
So when I call that function, it will insert the number and increase it. I plan to modify it, when there is already a number then don't insert any number. But that's a later concern. I'm trying to figure out how I call
As it seems from the source code, the function
a number, which I provide with
1 But I get the error message:
funcall-interactively: Wrong number of arguments: (lambda nil (interactive "p*") (evil-insert) (insert "1") (evil-numbers/inc-at-pt 1)), 1
So where went I wrong? Please don't verdict me, I'm trying to learn Lisp.