atom-haskell / ide-haskell

Haskell IDE plugin for Atom editor
https://atom.io/packages/ide-haskell
Other
233 stars 30 forks source link

Annoying auto-ident behavior when pasting code #202

Closed jhrcek closed 7 years ago

jhrcek commented 7 years ago

When I want to paste some code (using Ctrl+V) the editor does not take the current cursor's position into consideration. Instead it indents the pasted code below previous definition.

Steps to reproduce: Write a function with some indented code like

f :: Int
f = g 0
  where
    g x = x + 1

Then copy it and paste it below the definition, making sure the cursor is in the first column below the definition before pressing Ctrl+V. Actual behaviour: the pasted definition is indented below g of previous definition Expected behaviour: the pasted definition begins where I placed the cursor.

Would it be possible to let the code be pasted where my cursor was without indenting it (which is the most intuitive behaviour you get in most other text editors)?

annoyinautoindent

lierdakil commented 7 years ago

Not really related to ide-haskell package, but oh well... image

jhrcek commented 7 years ago

Oh, so that was the cause :-) Thanks for the tip. I'm closing the issue.