Sublime Text 2 is a text editor for OS X, Linux and Windows, currently in beta.

-1

Improved Locked Document Editing

Foster Brereton 11 aastat tagasi 0

Problems arise from the following set of steps:


  1. Open a locked document
  2. Make edits to the document
  3. Save -> Get Error about document being locked

The issue is getting the file unlocked painlessly so the user can save the edits made up to this point. I realize there are plugins that exist to auto-checkout files in source control, but this is an orthogonal issue. For example, if the checkout/unlock operation fails, the user is stranded with edits that cannot be saved.


Possible resolutions include:

  • Let the user drag the document icon (in OSX) in the window bar to another application to copy the file path. As of step 2 above it is greyed out and cannot be dragged without undoing the edits. 
  • Prevent the user from making edits in step 2 until the file has been unlocked. This is how other editors like BBEdit and Xcode behave. This would also be the point at which version control plugins would want to attempt to check out the file.
  • The ability to overwrite the locked file during step 3. Some kind of dialog to either cancel the edit or unlock the document. This would be a fallback option in the event a plugin failed to checkout/unlock the document, so the user could still save the edits (they would, of course, be on the hook for checking out the file manually.)
  • The ability to get the full path of the frontmost document quickly copied to the clipboard so it can be pasted in another application to checkout/unlock the locked file, making step 3 succeed.

-1

sublime.status_message() should only be shown in the window were it got invoked in

Oktay Acikalin 13 aastat tagasi uuendatud 13 aastat tagasi 1
-1

Extend scope to included Files

sp0r 13 aastat tagasi 0
Like: function xxx() from file inc.php completes in file index.php because inc.php ist included via include or requiere in index.php
-1

Block comment in Ruby

Alex Luckjanov 12 aastat tagasi uuendatud 12 aastat tagasi 2

I select some lines and press ctrl+shift+/:

Image 178

It's incorrect. I expect to see this:

Image 179

-1

Remove unnecessary/unused File types

vilas kadam 11 aastat tagasi uuendaja Andreas Backx 11 aastat tagasi 1

I primarily use sublime for Web development, and the file types in use are HTML, CSS, JS, PHP.  I want to remove the unnecessary filetypes and syntax files that gets loaded like c++, erlang, java etc. Is there a way to configure this? 

-1

view.show(sublime.Region(a, b)) scrolls to wrong region in view

Oktay Acikalin 13 aastat tagasi uuendatud 13 aastat tagasi 6
I've written center_view_on_line.py. Today I wanted to refactor it 'cause it behaved strangely in some cases. Now I'm trying to come up with an algorithm to center the visible region over the current line or selection. I've got the final row numbers and could translate them into a proper region. If I compare the visible region I get by scrolling there manually and the target region my script calculates they seem to be nearly identical. But the view scrolls somewhere else - often the cursor is at the top of the screen. When querying the visible region again the coords are totally off.

Some vars I work with:
visible_region = (366, 998) # manually centered view
selection = [26, 26] # cursor in line w/o selection
region = [26, 26] # in this case same as selection
visible_region = [16, 36] # first row, last row from above
size = 2099 # self.view.size()
region_size = 0 # diff between region end and begin
visible_size = 20 # diff between last and first row
begin = 16 # calculated first row
end = 36 # calculated last row
target_region = (366, 946) # calculated for self.view.show()
target_region = [16, 36] # translated into first, last row
visible_region = (603, 1351) # region I get after self.view.show()

Any idea?
-1

Bug in multiline commenting

Kim Blomqvist 12 aastat tagasi 0

If I select the following code below and press Ctrl-* to comment the whole block, ST2 only uncomments this line /* Disable master mode and enable as slave with SLA */.


void aery::twi_init_slave(uint16_t sla)
{
	/* Software reset. */
	aery::twi->CR.swrst = 1;
	while (aery::twi->CR.swrst);

	/* Disable master mode and enable as slave with SLA */
	aery::twi->SMR.sadr = sla;
	aery::twi->CR.msdis = 1;
	aery::twi->CR.sven = 1;
}
Result:
void aery::twi_init_slave(uint16_t sla)
{
	/* Software reset. */
	aery::twi->CR.swrst = 1;
	while (aery::twi->CR.swrst);

	 Disable master mode and enable as slave with SLA 
	aery::twi->SMR.sadr = sla;
	aery::twi->CR.msdis = 1;
	aery::twi->CR.sven = 1;
}
Expected result:
// void aery::twi_init_slave(uint16_t sla)
// {
// 	/* Software reset. */
// 	aery::twi->CR.swrst = 1;
// 	while (aery::twi->CR.swrst);

// 	/* Disable master mode and enable as slave with SLA */
// 	aery::twi->SMR.sadr = sla;
// 	aery::twi->CR.msdis = 1;
// 	aery::twi->CR.sven = 1;
// }
-1

"z" key misbehaving in Vintage insert mode

Trevor Whitney 12 aastat tagasi uuendatud 12 aastat tagasi 0
I'm using Sublime Text 2, build 2139, on Ubuntu linux 11.10.

When I enable Vintage and enter insert mode, I am unable to type two consecutive z's. The second z is causing Sublime to replace the previous letter. So, for example, if I type "pizza", I will get "pia". However, type "size" has the expected result. Disabling Vintage alleviates the problem, but then I lose all my wonderful Vi shortcuts, which makes me very sad :(
-1

Bug of replacing text when "preserve case" is active.

Ziang Song 11 aastat tagasi uuendatud 11 aastat tagasi 1

Find What: dddWooID

Replace with: eeeID


However, the result is eeeId


Please fix it. I am using 2.0.1 Build 2217. Thank you.

-1

Using tag#with-hyphen doesn't work.

braftre 12 aastat tagasi uuendatud 12 aastat tagasi 0
Would it be possible allow hypens when using tag#with-hyphen/tag.with-hyphen like in the snippets? As we use it as a common naming convention for css styles.

Also great work mate love this editor more and more.