Skip to content
This repository was archived by the owner on Mar 5, 2020. It is now read-only.
This repository was archived by the owner on Mar 5, 2020. It is now read-only.

Wrong cursor placement when marker is indented #37

@olmokramer

Description

@olmokramer

I have this snippet in ~/.vim/minisnip/_c_main:

int main(int argc, const char **argv)
{
	{{--}}

	return EXIT_SUCCESS;
}

But when I'm in a C file and expand the snippet, I get this (| is the cursor):

int main(int argc, const char **argv)
{
  |

	return EXIT_SUCCESS;
}

Now I've figured out that the behavior depends on the virtualedit setting (I use set virtualedit=all), when I disable that with set virtualedit= the cursor is on the first column after snippet expansion. That's much better already because then when I press <Tab> I won't get the 2 leading spaces and mixed indentation, but I would've expected the cursor to appear at the exact position of the marker.

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