-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
paste and indent #104
Comments
That is strange. I tested a few cut&paste from other text editors (TextWrangler) and it went ok every time. So not really sure what is going on here. Does inserting this code snippet in something else (like TextEdit) goes ok, so is it only CATS that shows this behaviour? On 23 Aug 2014, at 20:12, alexwall [email protected] wrote:
|
I tried BBedit, TextMate (1.5) and Chocolat BBedit don't insert (smart) indents. But it has a column paste Ctrl+CMD+V, which only works for manually pasted code blocks. TexteMate works correct: It adds necessary level of indent, depends on my current position inside the code (plus the indent from my snippets) Chocolat works best way: It adds necessary level of indent and removes potential unnecessary indents, if my code snippet has wrong code format. It works like:
|
There is actually a feature called getFormattingEditsOnPaste (that is for TypeScript files). I guess worthwhile to check that out and see if that could implement the smart-indent on paste feature. However I also noticed that the current regular formatText option has already some some issues with comments being wrongly formatted, so I guess first to determine what is going on there before implementing that feature. |
Hi,
I use Dash (like TextExpander) to insert common code snippets. The insert is technical a paste command. This is fine for single lines, but when I (Dash) paste a code block the inserted lines starts a the beginning of each new line.
Here an example:
Is it possible to bring cats to add indents?
Maybe by checking if the pasted code contains \n.
The text was updated successfully, but these errors were encountered: