The fold arrow in the gutter doesn't have arrows for all indented elements in HTML, only a few:
It only shows an arrow on line #2 and #6. This is with reindenting and --- "tab_size": 2, "translate_tabs_to_spaces": true --- in my user settings.
Is anyone else experiencing this? I have the fold arrows set to always show and it'd be so much faster to be able to collapse each respective HTML element when necessary.
Thanks!
Your indentation must to be well done to have folding arrows :
Preferences
"tab_size": 4,
"tabs_small": true,
"translate_tabs_to_spaces": true
Reiterating to what Alex has said, if Indentation is what's causing this .. Have
[
{"keys": ["f12"], "command": "reindent"}
]
in your user preferences. Ctrl+A and then f12 and see if you get the collapsing arrows.
Related
I have the same spec for the charts below, except for the selection
One with brush selection (editor, and one with click selection (editor)
As you can see, one has the orange and one has the blue---I only intend the orange colors to be used within a selection (e.g., a brush or a click). The second chart (with click) does what I wish, but the first (with brush) does not.
I'm not sure why selection vs. brush would have caused this difference.
Thanks so much for your help!
The difference is that your click selection specifies "empty": "none", while your brush selection does not.
"empty": "none" indicates that an empty selection should be treated as if it contains none of the points.
"empty": "all" (the default) indicates that an empty selection should be treated as if it contains all of the points.
Add "empty": "none" to your brush selection, it will have the same behavior as your click selection. See Common Selection Properties in the docs for more details.
This is hopefully a simple issue, but I'm struggling to find a solution. I am designing a Microsoft Access form where the user can click a VBA-powered option button to toggle the Enabled property on and off for certain fields in the form. The toggling behaves as expected, here is an example with a toggle button called "ExtraRows" that toggles an extra address field called "C/o" ("C_o" in the code):
Private Sub ExtraRows_Click()
Select Case ExtraRows
Case True
Me.C_o.Enabled = True
Case False
Me.C_o.Enabled = False
End Select
End Sub
The problem is that the placement of the label caption jumps a few pixels up/down and left/right when the option button is clicked, while the content of the related text box stays in place. The difference is illustrated below.
Field is disabled: the label caption ("C/o") sits two pixels below "Content".
Field is enabled: the label caption sits one pixel above "Content":
I would like the caption to stay in the same place all the time. I have tried resizing the label box and playing around with properties for margins and padding as wells as various special effect properties. What am I missing?
I'll answer my own question. I was too fast when I said I had played around with margins and padding. The issue disappears when the respective margin (top and right in the example) are set to zero. So it turns out that the margin settings for labels (but not text boxes) behave differently depending on whether the enabled property is set to true of false. A bug?
(Note: I had not set any margins myself; this was the default behavior.)
When the lines are longer than the width of the screen, SublimeText, by default, forces the end of the line to be displayed on a second line.
Is there a way to tell SublimeText to not do that? I'd like the whole line to remain on one line and have a horizontal scroll bar.
I am using SublimeText 2 Version 2.0.2
Use "word_wrap": false in your User Preferences
You could also add the following to your user key-bindings file (Preferences -> Key Bindings - User) to add a key or a key combination to toggle between the two modes. I use CTRL+ALT+W, but the key combination could be anything you want.
{
"keys": ["ctrl+alt+w"],
"command": "toggle_setting",
"args":
{
"setting": "word_wrap"
}
}
When I click on the line numbers in the margin, it highlights the entire line and moves the cursor to the beginning of the following line (presumably so that you can quickly copy that line to the clipboard).
Is there any way to disable this behaviour and have the cursor simply jump to the beginning of the line that was clicked?
On OS X, hold down ⌥ (Option key, or Alt) while clicking on the margin. On Windows and presumably Linux, you can click using the middle mouse button.
If you want to make this the default behavior for mouse button 1 (the left button), create a new file with JSON syntax and the following contents:
[
{
"button": "button1",
"press_command": "drag_select",
"press_args": {"by": "columns"}
}
]
Save it in your Packages/User directory as Default (your_OS).sublime-mousemap, where your_OS is one of OSX, Windows, or Linux. You can find the Packages directory by clicking on Preferences -> Browse Packages....
Warning!
This will make your left mouse button act like the center mouse button - you won't be able to double-click to select words, and click-drag events will select columns instead of lines. There is no way to isolate this behavior to just the margin, unfortunately.
how to set the same tabsize width with 4 space in sublime text?
I like verdana font ,then I set font to it in sublime text, but it appears that the 1 tab is much wider then 4 space. why? how to fix?
Probably, this is a problem related to how Sublime handles tabsize.
It seems to use the size of an em-dash (—), instead of the size of a space. In monospaced fonts, of course, those sizes are the same, but in proportional fonts, such as Verdana, they are quite different:
" " (4 spaces)
"————" (4 em-dashes)
So, I think that the only way to solve your problem is to convert tabs to spaces with View/Indentation/Convert Indentation to Spaces. And be sure to have "translate_tabs_to_spaces": true in your preferences and Indent Using Spaces set in Indentation menu:
The particular file you've included as a screenshot forces itself to use tabs instead of spaces, so that could be why it seems much too large of a space. Even if you set "translate_tabs_to_spaces": true, in your User Settings, this isn't applied to the Settings files themselves.
You can make sure what you're seeing is actually spaces/tabs by turning on draw_white_space in the preferences. You can do this by editing your User Settings (Preferences -> Settings -> User) and adding the line "draw_white_space": "selection", (remember not to include the comma if this is the last line of your settings).
This value can be set to "none" to turn off drawing white space, "selection" to draw only the white space within the selection, and "all" to draw all white space.
If you do that, then restart Sublime Text 2, it might give you a good idea of what's going on.