PyCharm Template Tags Paste Inline Instead of Where my Caret Is in Editor

I've wanted to ask this question for a while, but it seems so knit-picky, and it's nothing super-serious or urgent but more of a preference.

The problem: when my caret is after a Django template tag, and I want to paste another template tag, the editor doesn't paste where my caret is and instead goes to the previous line and puts it inline with the previous template tag.

For example, say my caret is below `{% load static %}`:

Then I paste `{% load pipeline %}`:

PyCharm doesn't paste it below load static where I wanted and instead pastes it inline with the previous line above.

Is there a setting to prevent this? I want the tags to paste in the exact spot where I pasted them.

Like this:

 

2 comments
Comment actions Permalink

Hi,

I can't reproduce this behavior.
Do you have Reformat on paste set to None in Settings/Preferences | Editor | General | Smart Keys?

Does Paste as Plain Text shortcut help? You can find it in Settings/Preferences | Keymap

0
Comment actions Permalink

Your tip helped. When Settings/Preferences | Editor | General | Smart Keys: Reformat on paste is set to "Reformat block", this behavior happens. I'll try Indent Block or Indent Each Line to see if I like that behavior.

0

Please sign in to leave a comment.