Tuesday, March 8, 2016

Re: Is there any way to count all latin characters in utf-8 as 1 byte?

2016-03-08 14:03 GMT+03:00 rameo <raiwil@gmail.com>:
>> Better `vim.Function('getline')(linenr)
>
> You seems to know everything in every computer language :)
> Yes I use Pyth3 and many times also `vim.current.buffer[linenr-1]`
> or things like this `r = vim.current.buffer[startline:endline]`
>
> To avoid decoding errors it is better to switch all these statements to:
> vim.Function('getline')(linenr) ?
> p.e. line 3 in vim: vim.current.buffer[2]` --> vim.Function('getline')(2)?
> How does python know from which buffer it has to capture the line and what would be the vim.Function statement in this case with a slice: `vim.current.buffer[startline:endline]`?

:h getline()
:h getbufline()

vim.Function does nothing more then creating a reference to a Vim function.

>
> --
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment