Re: [dev] [sandy] [PATCH] VIM key bindings.

From: Dimitris Zervas <>
Date: Fri, 11 Jul 2014 01:26:38 +0300

On July 11, 2014 1:26:08 AM EEST, Maxime Coste <> wrote:
>On Thu, Jul 10, 2014 at 11:45:07PM +0300, Dimitris Zervas wrote:
>> On July 10, 2014 11:29:59 PM EEST, Evan Gates <>
>> >> I will agree that it's super easy to implement and understand and
>> >covers most needs.
>> >> But how about search?
>> >> Is it fast?
>> >
>> >What about structural regular expressions as found in sam that
>> >limited to lines?
>> >-emg
>> Oh, I've got a lot more to learn...
>> and how will you pass the whole text?
>It is very fast to search or use regexes with that, as long as your
>supports strings in multiple part (PCRE does, I am not familiar enough
>Posix regex API to tell if you can easily use multiple strings in
>them). But
>that is a requirement for any buffer storage strategy besides a big
>In C++, I basically use a std::vector<std::string> so I do not have to
>about maintaining the sizes and capacities myself, but in C a buffer
>struct line_t
> char* data;
> size_t size;
> size_t capacity;
>struct buffer_t
> line_t* lines;
> size_t size;
> size_t capacity;
>Accessing a character is just buffer.lines[line].data[column],
>on character is just incrementing column, checking if column ==
>and if so setting column to 0 and incrementing line.
But how are you going to deal with lines longer than the capacity of a line? or buffers longer than the capacity of buffer?
Received on Fri Jul 11 2014 - 00:26:38 CEST

This archive was generated by hypermail 2.3.0 : Fri Jul 11 2014 - 00:36:07 CEST