Disable Marks Column from Sublime Text 2 Gutter - sublimetext2

Is there a way to disable the marks column in the gutter on the left side of Sublime Text 2?
I was able to disable the fold_buttons using the following setting in the settings file:
"fold_buttons": false
In case it isn't clear, I'm talking about the whitespace reserved for the mark (dot) shown below:

Find "Settings - User" from Sublime Text 2 menus (its location depending on the platform). When you click it, it will open a new, empty or almost empty file. Here is a sample portion of it:
{
"auto_complete": true,
"auto_complete_commit_on_tab": true,
"gutter": true
}
The setting you are asking for is the "gutter". Make it false and you will achieve what you asked for.
Things to note:
The curly braces at the beginning and end are important.
Each setting has a comma after it. Except the last one.

Related

turning off auto completion of matching brackets in Adobe Brackets

I have only just started using Adobe Brackets for HTML development. As a programming newcomer, I am still not savvy enough to look in all the right places to change defaults. When I type a beginning tag in Brackets (HTML) like < p >, the editor automatically adds the ending tag < /p >, assuming that I will enter text between the two tags. So I get < p > < /p >. Often I want to put the tags around existing text and do not want the auto completion of the end tag upon entering the beginning tag. How do I change the default in Adobe Brackets so that I do not get the auto-completion of the end tag?
You can do this by setting the dontCloseTags option in the Brackets preferences file.
Go to the Debug menu and select Open Preferences File. You will see a side-by-side view of defaultPreferences.json on the left and brackets.json on the right. These are Brackets' default settings and your settings file, respectively. defaultPreferences.json lists all the possible options that can be set and their default values, but the file itself can't be modified.
Look at the comments in defaultPreferences.json for closeTags. What we care about is dontCloseTags.
Set dontCloseTags inside of closeTags. For example, my defaultPreferences.json file looks like this:
{
"fonts.fontSize": "12px",
"fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",
"themes.theme": "dark-theme",
"useTabChar": true,
"tabSize": 5
}
And so I would set it up like this, adding a comma after the last entry before starting a new one below:
{
"fonts.fontSize": "12px",
"fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",
"themes.theme": "dark-theme",
"useTabChar": true,
"tabSize": 5,
"closeTags": {
"dontCloseTags": ["p", "img"],
"whenOpening": true
}
}
I set whenOpening to true because I found that sometimes Brackets won't autocomplete any tags without me asserting that value, even though it's the default.
Press Ctrl + S to save your preferences and then close the two files.
Click on the icon next to the settings icon next to the Left heading in the sidebar, then select No Split. This will remove the two columns.
I hope this helps, and have fun looking at the other settings in defaultPreferences.json, since Brackets won't add a front-end for those settings for a while (it's in the works). Just make sure to match the syntax exactly as it is in defaultPreferences.json (except for the comments). JSON also wants commas between stuff inside {} and [], but do not add a trailing comma after the last item in each grouping. If the option you want is inside another option (for example, dontCloseTags is inside of closeTags{}), you need to include the main option and its grouping symbol thing.
Just use a boolean "false" for the value of the field name(s) if you want to shut that object to not function at all
"closeTags": {
"whenOpening": false,
"whenClosing": false
}
This sets the value of the closeTag field with Boolean defined values of two more objects which results with all auto-completing, closing tags to stop working.
After saving your changes, be sure the new file is loaded by restarting the application. All save does is saves your edits, any changes will not be seen until you restart the application.

Change settings of BracketHighlighter Package Sublime Text

how can i change the threshold in my BracketHighlighter to highlight brackets that are farther apart?
Instead of displaying a question mark in the left bar I still want to be able to locate the brackets
You can change the settings either in
~/Library/Application Support/Sublime Text 2/Packages/BracketHighlighter/bh_core.sublime-settings
or in your user settings
~/Library/Application Support/Sublime Text 2/Packages/User/bh_core.sublime-settings
Relevant settings include:
// Match brackets only when the cursor is touching the inside of the bracket
"match_only_adjacent": false,
// Character threshold to search
"search_threshold": 55000,
// Set mode for string escapes to ignore (regex|string)
"bracket_string_escape_mode": "string",
// Set max number of multi-select brackets that will be searched automatically
"auto_selection_threshold" : 10000,
While in Sublime navigate to preferences then goto package settings and select bracket - user settings. Insert the following lines to increase threshold or ignore (not recommended). The default is 5K.
// Character threshold to search
"search_threshold": 1005000,
// Ignore threshold
"ignore_threshold": false,

Unintentionally Sublime-text different setting for two file

I have problem with sublime tab indent.
I have to file: reply.php and view.php
==============================================
view.php:
Tab indents is replaced with spaces.
One tab equals with 2 space.
==============================================
reply.php:
Tabs is not replaced with spaces
One tab equals 4 spaces.
==============================================
Why? I want reply.php indent and setting. How I can fix this?
Go to View -> Indentation and make sure that Tab Width is set to 4, then click on Convert Indentation to Tabs. Double-check the other options there to make sure nothing is set that you don't want, such as Indent Using Spaces.
To make sure that PHP files are always displayed with tabs, save the following as Packages/User/PHP.sublime-settings:
{
"tab_size": 4,
"translate_tabs_to_spaces": false
}

sublime text2 text replace pattern in all files except one or more files

I want to find and replace a particular word in all my project files except one or more files in sublime text. I am not sure how to specify that.
SO basically I want to exclude
/Uses/project_name/css/my_file.css
/Uses/project_name/css/my_file2.css
Menu: Find-> Find in Files...
Sublime is gonna open a new panel at the bottom, you just need to fill the fields.
Find: the_word_you_are_looking_for
Where: your_project_directory
Replace: the_word_that_is_going_to_replace_the_old_one
Then click on the button ... located on the right side of the field Where:, and after click in the option Add Exclude Filter; replace the -*.txt with my_file?.css or my_file*.css

Sublime Text 2, faster alternative to find and replace regex?

$_POST['daily_limit'];
$whatever = $_POST['smoke'];
$_POST['soup'] + $_POST['cake'];
to
$this->input->post('daily_limit');
$whatever = $this->input->post('smoke');
$this->input->post('soup') + $this->input->post('cake');
In this example, is there any faster way to switch from $_POST[] to $this->input->post() without writing up a regular expression find and replace? I don't care if it takes multiple steps. Writing the regex for this (find: \$_POST\[(.*?)\] replace: \$this->input->post\($1\)) takes longer than changing them all manually (maybe I'm just not good at regex). Any ideas?
I'm making a brash assumption here, that you have only one variable within each pair of brackets and that the variables only contain alphanumeric characters. ['soup'+'bacon'] will break this trick, as will ['soup-with-bacon'].
With your cursor, highlight an instance of $_POST[ - nothing else.
Hit Alt+F3 if you're on Windows/Linux (Cmd+ShiftG in Mac?)
Try to scroll through and see if everything that's selected is everything you want to replace.
Type $this->input->post( - nothing else.
Press → to move all cursors to the right of the first quote.
Press Ctrl+→ (this is the only remotely wtfh4xxy part of the process, and only if you're not used to navigating by word with the cursor) to navigate over the variable.
Press → twice to move all cursors to the right of the next quote.
Replace the ]with a ).
#nnnn I did a variation of your version to remove the wtfh4xxy part.
select:$_POST
altf3
type: $this->input->post(
ctrlshiftm
ctrlx
ctrlshiftm
ctrlv
type: )
Sublime text ftw!