4

When I expand an abbreviation with Dash Doc App it starts at the cursor location in my text editor (Sublime Text), but then ignores the original placement of the cursor and the next lines begin on the far left side of the editor (0 column).

I've Google'd for a while and can't seem to find a way to get Dash to respect indentation.

Anyone know? Thanks.

Cory
  • 143
  • 3

1 Answers1

4

I'm Dash's developer. As far as I can tell, Sublime Text does not respect indentation while copy and pasting. What Dash does is just paste some text.

Unfortunately, Sublime Text does not maintain the indentation of pasted text, except for the first line.

The only thing you could do would be to submit a bug report to the Sublime Text team and ask for Sublime Text to maintain the indentation level on paste.

bogdansrc
  • 268
  • 1
  • 5
  • 2
    If you hold Cmd+Shift+V then you can "paste_and_indent" which respects indentation. Is there any way to modify the ST2 plugin so it doesn't just paste, but it does the paste_and_indent command? I browsed the code but can't figure it out. Maybe you know more about it? – Cory May 16 '13 at 00:55
  • If you change the paste_and_indent key to be CMD+V, it should work. – bogdansrc May 16 '13 at 01:24
  • That seems like a bad idea at first glance, but then I realized the only things I don't want to paste and indent are urls and specific little snippets - not more than one line at a time or anything indented. Lemme try it out... WORKS! I still think you could update the plugin somehow to paste_and_indent by default but I'm too lazy/stupid to figure it out so this workaround... works. :) Thanks for the speedy response. I absolutely love your app man. – Cory May 16 '13 at 03:56
  • I could change Dash to send a CMD+Shift+V to initiate a paste instead of a CMD+V for Sublime Text. However, I'm reluctant to do this because there might be a reason for paste_and_indent to not be the default behaviour for Sublime Text. – bogdansrc May 16 '13 at 08:47
  • Give it a shot. It definitely doesn't work as expected right now. I don't know anyone that wants to paste snippets that aren't paste_and_indent. Also, I switched Cmd+v to paste_and_indent and haven't had any weird side effects so the water is safe. ;) – Cory May 16 '13 at 14:34
  • I LOVE options ! lots of options (can) make GREAT Programs GREATER in my opinion. – mjrider May 20 '13 at 23:22
  • Lots of options can make an app unusable (most people don't have time to read through all the configuration options). Treating CMD+V without indentation is Sublime Text's decision and I will respect that, even if it makes absolutely no sense to me. I have changed my key binding for paste_and_indent to CMD+V as well... – bogdansrc May 21 '13 at 00:55
  • @Cory your solution for change cmd+shift+v to cmd+v saved my life. Thanks sir! – Patrick Maciel Aug 20 '15 at 12:37