Saturday, June 13, 2020

Re: VimScript for Python developers

There is also Vim Script for JavaScripters. https://w0rp.com/blog/post/vim-script-for-the-javascripter/

On Monday, June 1, 2020 at 10:08:04 AM UTC-7, Yegappan wrote:
Hi Christian,

On Mon, Jun 1, 2020 at 9:31 AM Christian Brabandt <cbl...@256bit.org> wrote:

On So, 31 Mai 2020, Yegappan Lakshmanan wrote:

> Hi all,
>
> I have put together the following gist to help Python developers
> with VimScript:
>
> https://gist.github.com/yegappan/16d964a37ead0979b05e655aa036cad0
>
> Let me know if you have any comments/suggestions.

Very nice. Are you keeping this up to date there? Perhaps a link to this
reference should be included in the help

Yes. I am planning to keep this up-to-date.
 

I notice this:

> Finding string length

The mentioned functions (len(), strlen()) do not handle multibyte
characters, but return the byte-length, perhaps explicitly add
strwidth()

> Getting a substring

Again, using str[index] uses byte index, same for strpart, perhaps
mention strcharpart()

> Checking whether a string starts with or ends with a substring

> if str =~# "^ing"

Please use single quotes, so that if one adds other regular expression
atoms such as \+ or \d one do not have to double the backslashes. 
 

Thanks for the review comments. I have updated the gist with these comments.

Regards,
Yegappan

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/71fb3ddb-9f5d-42a0-8222-8c9f49af729do%40googlegroups.com.

No comments: