4 ms·
> Vim is Oddly Bad at Indenting Since he mentioned indenting, let me ask: how do you properly indent JSON or XML in Sublime Text 2 out of the box? I've tried
by shurcooL 14y ago
> Vim is Oddly Bad at Indenting
Since he mentioned indenting, let me ask: how do you properly indent JSON or XML in Sublime Text 2 out of the box?
I've tried setting the appropriate syntax, selecting all text, then doing Edit->Line->Reindent but it gives half-broken results. Is that intentional, or am I doing something wrong?
Also, is there a way to quickly select all instances of currently selected identifier within the local scope? Selecting one _highlights_ all other local scope instances, but how do I make it select them all with one action?
- Cyykratahk 14y agoCtrl+D to select the next instance of the current selection.
- shurcooL 14y agoThanks, this is the best I've found. But it doesn't select all the instances within local scope (which happen to be highlighted, so it's not stretch to imagine being able to select them all), you end up having to do it manually by starting with the first entry and then carefully select all others that still fall within the local scope. Isn't it a pretty common thing to rename local variables? I'm not sure why it's not a readily available feature.
- Shorel 14y agoIn sublime text the shortcut is Alt-F3. You get one cursor for each instance, so you can select and then edit all at the same time. I'm sure it is a readily available feature. In fact, I use it every day several times since I first installed ST.
- shurcooL 14y agoAdditionally, does anyone agree with this bug report (or is the current behaviour expected) at the bottom of http://sublimetext.userecho.com/topic/52275-down-arrow-doesnt-make-cursor-go-next-line-if-text-is-selected/ http://sublimetext.userecho.com/topic/52275-down-arrow-doesn... If so, what can be done to make it more visible?