words completion problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

words completion problem

Peng Yu

Hi,

Suppose I have 's', then I type 'in(_th'. At this time, I end up with
'sin(_th'. Now, I type ctrl+P. Then 'sin(_th' becomes 's' and will
never come back again. BTW, this is in a .cc file and I don't have
other instances of 'sin' in the same file and buffers.

Can somebody let me know how to make gvim aware that 'sin(_th' are two
words?

Thank,
Peng
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: words completion problem

Tony Mechelynck

On 14/07/08 06:12, Peng Yu wrote:

> Hi,
>
> Suppose I have 's', then I type 'in(_th'. At this time, I end up with
> 'sin(_th'. Now, I type ctrl+P. Then 'sin(_th' becomes 's' and will
> never come back again. BTW, this is in a .cc file and I don't have
> other instances of 'sin' in the same file and buffers.
>
> Can somebody let me know how to make gvim aware that 'sin(_th' are two
> words?
>
> Thank,
> Peng

WFM.

Here, when I do what you describe in a .cc buffer, I see text on the
command-line going too fast to be read, and when it stabilizes I see:

sin(_th

in the buffer, followed by the Insert-mode cursor, and at the bottom

Scanning tags.
-- Keyword completion (^N^P) Pattern not found

Maybe you have a mapping for Ctrl-P? Try the following:

        :verbose map!   <C-P>

with the exclamation mark (<C-P> here is five characters). What is the
answer? Also, what does Vim answer to

        :verbose set complete? completeopt?

in that .cc file?


Best regards,
Tony.
--
He was a fiddler, and consequently a rogue.
                -- Jonathon Swift

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: words completion problem

Peng Yu



On Jul 13, 11:39 pm, Tony Mechelynck <[hidden email]>
wrote:

> On 14/07/08 06:12, Peng Yu wrote:
>
> > Hi,
>
> > Suppose I have 's', then I type 'in(_th'. At this time, I end up with
> > 'sin(_th'. Now, I type ctrl+P. Then 'sin(_th' becomes 's' and will
> > never come back again. BTW, this is in a .cc file and I don't have
> > other instances of 'sin' in the same file and buffers.
>
> > Can somebody let me know how to make gvim aware that 'sin(_th' are two
> > words?
>
> > Thank,
> > Peng
>
> WFM.
>
> Here, when I do what you describe in a .cc buffer, I see text on the
> command-line going too fast to be read, and when it stabilizes I see:
>
> sin(_th
>
> in the buffer, followed by the Insert-mode cursor, and at the bottom
>
> Scanning tags.
> -- Keyword completion (^N^P) Pattern not found
>
> Maybe you have a mapping for Ctrl-P? Try the following:
>
>         :verbose map!   <C-P>
>
> with the exclamation mark (<C-P> here is five characters). What is the
> answer? Also, what does Vim answer to
>
>         :verbose set complete? completeopt?
>
> in that .cc file?

Hi Tony,

Here is the example that demonstrates the problem.

Suppose I have the following file.

$ cat vim_test.txt
numerical
num

I do the following things.

1. I press <C-P> when my cursor is after 'num' in the second line
(INSERT mode). gvim would complete it to 'numerical'.
2. I delete 'al' by pressing <BS> twice.
3. I type '_', ending up with 'numeric_'
4. I press <C-P> again. gvim would give me 'num'. I could not get back
'numeric_' by pressing <C-P>. I would think gvim should give me
'numeric_' in this case.

Thanks,
Peng
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---