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.

Auto indent snippets after inserting #50

@gpanders

Description

@gpanders

It would be nice if snippets were auto-indented to match the "target" file's indenting scheme after they are inserted, for example using vim's native = feature. A use case for this might be Python snippets, where some source files use tabs and others use spaces. Snippets files should be agnostic to whatever indenting level/style is used in the source file they are used in.

One way to do this would be to just run = over the inserted snippet. This works fairly well in my limited tests, but it does fail the included vader tests for the indented multiline snippets (vim will remove extraneous indents with =). I made a PR for this here but I wanted to maybe open this up for discussion.

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