Home Download Buy Blog Forum Support

Comment on new line

Comment on new line

Postby LatencyK on Sun Nov 17, 2013 6:51 pm

Hi,

I'm writing Ruby in ST2 and would like to change the behavior when I hit return on a line that is a comment.

Code: Select all
1. # My current line
2. # <-- after hitting return on line 1, line 2 starts out with a new comment character

I don't want line 2 to contain a comment character. Is there is preference I can change to get eh behavior I want?

Thanks!
LatencyK
 
Posts: 7
Joined: Wed Sep 12, 2012 2:39 pm

Re: Comment on new line

Postby subhaze on Sun Nov 17, 2013 11:03 pm

Testing on Sublime Text 2, OS X 10.8.5

Code: Select all
# I start out with a comment
I hit return and there is no comment character
subhaze
 
Posts: 238
Joined: Tue Apr 09, 2013 3:22 am

Re: Comment on new line

Postby LatencyK on Sun Nov 17, 2013 11:11 pm

Thank you for the response but that doesn't help me determine why I'm seeing the behavior where the new line starts off with a comment character. Does anyone know which setting controls this behavior?

Thank you
LatencyK
 
Posts: 7
Joined: Wed Sep 12, 2012 2:39 pm

Re: Comment on new line

Postby subhaze on Mon Nov 18, 2013 12:54 am

I would assume that it's a plugin causing this issue, have you tried testing this on a fresh ST setup?
subhaze
 
Posts: 238
Joined: Tue Apr 09, 2013 3:22 am

Re: Comment on new line

Postby LatencyK on Tue Nov 19, 2013 7:33 pm

Thanks for the response subhaze. Is there an easy way to launch ST without having it load 3rd-party packages? I'm not sure how I would do that.

Thanks!
LatencyK
 
Posts: 7
Joined: Wed Sep 12, 2012 2:39 pm

Re: Comment on new line

Postby subhaze on Wed Nov 20, 2013 12:31 am

It's not too difficult, info on reverting to a fresh state can be found here http://www.sublimetext.com/docs/2/revert.html

I recommend moving/renaming this folder and not deleting it, that way you can easily put it back in place and not lose your original data.
subhaze
 
Posts: 238
Joined: Tue Apr 09, 2013 3:22 am

Re: Comment on new line

Postby skuroda on Wed Nov 20, 2013 1:42 am

As an alternative to reverting, you can try logging the command. Enter "sublime.log_commands(True)" into the console. Get the comment to appear and see what command is running. You can then use https://github.com/skuroda/FindKeyConflicts to display all key bindings in a buffer. It also displays the command and associated package the binding is located in. Of course, reverting works too.
skuroda
 
Posts: 687
Joined: Fri Oct 05, 2012 8:11 am

Re: Comment on new line

Postby LatencyK on Thu Nov 21, 2013 4:45 pm

Thank you skuroda - using sublime.log_commands(True) I was able to track down the offending package: DocBlockr.
LatencyK
 
Posts: 7
Joined: Wed Sep 12, 2012 2:39 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 27 guests