oni icon indicating copy to clipboard operation
oni copied to clipboard

Indent for python code snips is buggy

Open yush3n9 opened this issue 8 years ago • 2 comments

Oni Version: 0.3.6 Neovim Version (Linux only): 0.2.2 Operating System: linux/mint

Issue: Indent for python code snips (using vs code python snips) is buggy. Indent is only correct if the snips were triggered at the beginning of a line. If the snips is triggered inside a function or inside a for-loop or at any already indented line, the indent will be wrong.

Expected behavior: Indent of a function body or a for-loop body must be relative to trigger point

Actual behavior: The indent of snip body is absolute to line begin.

Steps to reproduce: Trigger the snip at an already indented line (i.e. inside a function, inside of a class)

yush3n9 avatar Jul 03 '18 19:07 yush3n9

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Jul 03 '18 19:07 oni-bot

Cheers for raising this, I think this is covered over in #2242.

I'll close this out since I think there is more information over there, but I might take a look at this tomorrow, it doesn't seem too bad and its been holding me back from using snippets more.

CrossR avatar Jul 03 '18 20:07 CrossR