Skip to content
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

ST3: Auto-closing tag doesn't indent properly #128

Open
abramadams opened this issue Sep 27, 2013 · 9 comments
Open

ST3: Auto-closing tag doesn't indent properly #128

abramadams opened this issue Sep 27, 2013 · 9 comments

Comments

@abramadams
Copy link

When I type the > on a cf tag, i.e. <cfif ...> it auto inserts the closing tag two lines down (which is good), but the closing tag is completely flushed left instead of at the same indentation as the opening tag. You end up with something like:

      <cfif something is true>
         |
</cfif>
@danshort
Copy link

danshort commented Oct 7, 2013

I'm seeing the same behavior.

@sekanitembo
Copy link

I'm also seeing this behavior:

SublimeText/ColdFusion dev branch
commit 4d61227
ST3, Stable, Build 3047
OSX 10.9
3.2 GHz Intel Core i5
8 GB RAM

screen shot 2013-12-04 at 3 05 04 pm

Let me know if you need any more info. or reproduction info.

@nwinters71
Copy link

Sorry for the dumb question, but how do we apply this fix to the code? It doesn't appear to be included in the development branch. Can I just modify the coldfusion-plugin.py file and save or does it need to be compiled or what?

@atuttle
Copy link
Collaborator

atuttle commented Jul 9, 2014

It hasn't been merged into the project yet. Right now it's just a pull request.

@nwinters71
Copy link

Thanks for the response. When you say that it's just a pull request, does that mean that I can't use it yet or if I can, what exactly do I need to do. I've updated the coldfusion-plugin.py (which I'm guessing is a python file) with the changes, but it's not having any effect. I have no idea if it needs to be compiled or what.

@atuttle
Copy link
Collaborator

atuttle commented Jul 9, 2014

I don't actually know (if it needs to be compiled -- though I suspect not). It sounds like @rossmd is working on a fix though, so probably best to just be patient. :)

@nwinters71
Copy link

Thanks. I'll try to be patient.

@abramadams
Copy link
Author

fwiw, you just need to edit the coldfusion-plugin.py file and save it. You can change line 143 to:

 self.view.insert(edit,temp.b,"\n\t\n</" + tag_name + ">")

Also found changing line 141 to:

indent = not s.get("auto_indent_on_close")

fixes a bug with <cfouptut>

@nwinters71
Copy link

That worked. Thanks for the info regarding cfoutput, that fixed an even more bothersome issue for me. The end tag was being added, but the cursor would go the line above. At least now cfoutput is working the same way as the other tags that have closing tags. Not perfect, but much better. Thanks!

seancoyne added a commit to seancoyne/ColdFusion that referenced this issue Jul 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants