Open thirtythreeforty opened 8 years ago
Sorry for slow response.
It is caused by r
flag of formatoption
option set by default filetype plugins.
As a workaround, remove r
flag from formatoption
like below
autocmd BufWinEnter c,cpp,rust setlocal formatoption-=r
Ideally, however, lexima should work despite formatoption
.
I will try to fix this problem but need more time.
I see. formatoption=r
had been irritating me for some time now (although
I didn't know what it was called), so thanks for the workaround suggestion.
I have the same problem and there is another similar problem which I think may be the same as yours, to reproduce, say if I have (in a shell script):
foo(){
|
}
Then I continue typing:
foo(){
if [ 1 = 1| ]
}
After I press escape
it becomes:
foo(){
if [ 1 = 1 ]
}
I tried to remove r
from formatoptions
but it didn't work, the problem still exists.
Hi! Fantastic plugin you've written. Far better, consistency-wise, than delimitMate, at least in my experience.
I've noticed behavior which is almost certainly wrong, but I'm not sure if it's lexima.vim's fault. When I type the following (
|
is the cursor):then it correctly expands to the following:
But a common thing for me to do is to type out a bunch of empty functions and just put a comment in them, getting the skeleton ready for actual implementation later. From the above expansion, still in Insert mode, I type:
When I hit Escape, this happens:
Obviously this is not what I meant to happen; I'd rather the closing brace stay uncommented. Pressing
u
at this point corrects the issue, for whatever reason:This only happens in files where a source code filetype is set (such as
c
,cpp
, orrust
). That is, in an empty buffer, the closing brace stays put.Do you have any idea what could be causing this behavior, and how to make it stop?