I am a user and developer of eclim ( http://eclim.org/ ).
How does autocompletion work: when user presses <C-X><C-U>, current buffer
is saved and i need to give current cursor position to eclimd
(eclim-daemon), this is needed to say Eclipse what we want to autocomplete.
So, if my &encoding is 'cp1251', and &fileencoding is 'utf-8', then current
position becomes wrong, and autocompletion is broken.

The same way works some code markers (it becomes moved to several lines
down if my buffer contains multi-byte character)

20 декабря 2011 г. 0:58 пользователь Andy Wokula <[email protected]> написал:

> Am 19.12.2011 13:35, schrieb Дмитрий Франк:
>
>> Citation from help: "Return the *byte count* from the start of the buffer
>> for line {lnum}"
>>
>> Returned *byte count* is wrong. It returns character count instead of byte
>>
>> count.
>>
>> Your suggestion to use strchars() is too expansive - i need just get byte
>> count, and i need to allocate a huge string for this (say, i edit 500-Kb
>> file), and do split() or substitute(). This isn't good solution.
>>
>
> When the file is already loaded into a *buffer*, why do you need a byte
> offset
> within the *file*?  Can't you use the data from the buffer?
> What are you trying to accomplish?
>
> --
> Andy
>
>
> --
> You received this message from the "vim_dev" 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 from the "vim_dev" 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

Raspunde prin e-mail lui