Jorenar / miniSnip

Lightweight snippet plugin for Vim
MIT License
53 stars 8 forks source link

Snippets that contain an indent do not expand to spaces when `'expandtab'` is set #41

Closed jmcantrell closed 1 year ago

jmcantrell commented 1 year ago

If a snippet file foo.snip contains something like (where <tab> is a tab character):

<tab>test

And the buffer contains (where * is the cursor position):

foo*

And 'expandtab' is set, the buffer will be the following after expansion:

<tab>test

Where it should be (given a 'shiftwidth' setting of 4:

    test
Jorenar commented 1 year ago

Weird, b99bc0e should have already addressed exactly this scenario

jmcantrell commented 1 year ago

For some reason, I did not get that commit when I last pulled. It is expanding the tabs now, but they are expanded to the value of 'tabstop' and not 'shiftwidth'.

I'll open a new issue.