Skip to content

'set cpoptions=n' causes vim-endwise producing 'r' symbol instead of new line #139

@drew1kun

Description

@drew1kun

Hi, I have updated my vim Plugins including vim-endwise using vim-plug recently (unfortunately I haven't done it for years) and this has revealed some interesting issue...
Now in the Insert Mode when pressing 'Enter' key ('Return' key on MacOS to be precise), neovim produces 'r' symbol instead of new line...
I had 52 plugins installed (lol) so it took some time to find out that the problem ceases when I unplug the single vim-endwise plugin. I also have some custom configuration in my ~./vimrc, so I disabled all the plugins and gradually commenting and uncommenting my config and testing the problem I have found out that using 'set cpoptions=n' in conjunction with vim-endwise causes the issue. I use it for wrapping the long lines in neovim this way:

"================================ BREAK LINES ==================================
let &showbreak = ''               " Symbol shown on the left when long line is broken into multiple lines
set wrap                            " Show long lines as multiple lines (for gpg, ssh keys etc.)
set cpoptions=n

As stated here the 'n' flag does the following:
Screen Shot 2022-08-07 at 4 48 46 PM
So it makes just a bit of difference but may break someone's setup as it has broken mine:
Screen Shot 2022-08-07 at 4 48 10 PM

So to fix the issue for now the one has to chose either to remove 'set cpoptions=n' from ~/.vimrc or to disable vim-endwise plugin, but why is that the case and why it did not do it before? Just curious...
I guess it will take some time to find out at which point in time the breaking changes happened.

Tested it on two different MacBookPros with Monterey and Catalina.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions