tags:

views:

211

answers:

2

I look around for the preferences in TextMate and there seems to be no method to set the indent to 2 spaces when we highlight some code and choose

Text -> Shift Right

Right now it is indenting 4 spaces but is there a way to make it 2?

+3  A: 

It's on the bottom bar off the application towards the middle. It'll say something like 'Soft Tabs: 4' if you click it you can change it to do 2 spaces for tabs.

Justin
if it is changed to 2, and then "Text -> Shift Right" is used on highlighted text, then a tab is actually inserted for each line... it shows as 2 spaces, but the compiler for HAML will complain that it is tab instead of space.
動靜能量
you may want to look into using the `expand` command in the terminal for your compiler.
Jweede
@ Jian LinWhen you select the the little drop down to set the tab size (it either says `Soft Tabs: 4` or `Tab Size: 4`) ensure that there is a check at the bottom where it says `Soft Tabs (Spaces)` this will use spaces for indentation and tabs.
Justin
Did this fix the issue for you?
Justin
yes i think so... just that at first, when i click "right arrow" there after soft tab is inserted, it moved 2 spaces by 2 spaces, making me thinking that it is not space but was a tab that was inserted... i had to copy and paste that code to another text editor to verify that it was 2 spaces.
動靜能量
+1  A: 

Also you can edit multiple lines by holding Option and dragging your mouse along the spot in the lines. When you type, the text will be on all the lines you selected at that spot.

Jweede