In order to get completions for this module, one would have to either manually type to run the completion function again, or delete and then re-insert the period. The correct solution is, of course, to fix the Python omnicompletion module. However, this 'feature' is present in all default installations of Vim. imap pumvisible() ? "=(col('.')-1&&match(getline(line('.')), '\\.', \ col('.')-2) == col('.')-2)?\"\C-X>\C-O>\":\"\"" \ : ""
Attributes | Values |
---|
rdfs:label
| - Continue omnicompletion for python modules
|
rdfs:comment
| - In order to get completions for this module, one would have to either manually type <c-x> <c-o></c-o> </c-x> to run the completion function again, or delete and then re-insert the period. The correct solution is, of course, to fix the Python omnicompletion module. However, this 'feature' is present in all default installations of Vim. imap pumvisible() ? "=(col('.')-1&&match(getline(line('.')), '\\.', \ col('.')-2) == col('.')-2)?\"\C-X>\C-O>\":\"\"" \ : ""
|
Version
| |
dbkwik:vim/property/wikiPageUsesTemplate
| |
Previous
| |
Category
| |
Author
| |
Subpage
| |
Complexity
| |
Created
| |
ID
| |
NEXT
| |
abstract
| - In order to get completions for this module, one would have to either manually type <c-x> <c-o></c-o> </c-x> to run the completion function again, or delete and then re-insert the period. The correct solution is, of course, to fix the Python omnicompletion module. However, this 'feature' is present in all default installations of Vim. Here is a stopgap solution. On <cr></cr>, it accepts the current completion, and then runs a <c-r> = </c-r> expression that checks to see if the character before the cursor is a '.'. If it is, then it runs omnicomplete again. The tricky bit about this is that it needs to accept the completion before it can check the cursor position, or else it will be checking against the partially completed text. The col('.')-1 check avoids a problem where you return without a selected match which lands you at column 1 of the next line. imap pumvisible() ? "=(col('.')-1&&match(getline(line('.')), '\\.', \ col('.')-2) == col('.')-2)?\"\C-X>\C-O>\":\"\"" \ : ""
|