Brackets : How to only select (String) Instead whole ($String) like SublimeText.? - sublimetext

how to select only value instead $value by double-click in brackets.?
SublimeText $String
Brackets $String

That's because Sublime Text by default handles $ as a word separator. You can change this by changing the settings.
If you want to change it only for the current syntax select in the main menu Preferences > Settings - Syntax Specific (for everywhere select Preferences > Settings).
Now you see the default preferences on the left side and the syntax specific preferences on the right side. Search for the key word_separators on the left side and copy it to right side. Afterwards remove the $ from the value. Ensure that the settings are a valid json object.
The result should look like this:
{
"word_separators": "./\\()\"'-:,.;<>~!##%^&*|+=[]{}`~?"
}

Related

How to highlight all occurrences of selected word in scintilla/scite?

In Notepad++, when select a word by double click or by cursor select, all other occurrences of the word will be selected.
What is the API to call to achieve this in Win32 (C++) platform.
Please checkout the "MatchMarker.cxx" file in SciTE source.
You can set
highlight.current.word=1
in SciTEUser.properties file which can be accessed from the menu Options > Open User Options File.
More options refers to https://www.scintilla.org/SciTEDoc.html .

Em-Editor Custom TSV

I usually deal with large standardize delimiters similar to a “xxxx”,”xxxxx” (comma separated with quotes). Instead of those characters we use the following
Text Character ASCII Character
———————————————
Comma ————-> 20
Quote ————-> 254
NewLine ————-> 174
Multi Value ————-> 059
Nested Value ————-> 082
Currently i use a macro with RegEx to converted to Tab Format by replacing \x{00FE}\x{14}\x{00FE} with \t Is there a method of creating a TSV definition in EE? so i can quickly switch from format to format?
I have attempted without success, changing the delimeter in the Tools → Customise → CSV section, but there is method of replacing quote character
I tried replacing the delimiter in two was \x{14} and \x{00FE}\x{14}\x{00FE}
http://nextcloud.eclipsephoto.net/nextcloud/index.php/s/5b8pen55LW43cPr
I have already tried but did not seem to work,
thank you in advance.
Please enter \xfe\x14\xfe in the Delimiter text box in the CSV page of the Customize dialog box.
Alternatively, you can replace \xfe with a double quote, and \x14 with a tab after you open your file. I wrote a macro for you:
batch_list = editor.filters;
batch_list.AddReplace("\\xfe","\\x22",eeFindReplaceCase | eeFindReplaceEscSeq,0); // replace \xfe with a double quote
batch_list.AddReplace("\\x14","\\t",eeFindReplaceCase | eeFindReplaceEscSeq,0); // replace \x14 with a tab
document.selection.BatchReplace(batch_list,eeReplaceAll,0); // batch replace
editor.ExecuteCommandByID(22529); // TSV mode
editor.ExecuteCommandByID(3894); // heading 1
You can run this macro after you open your data file. To do this, save this code as, for instance, OpenDataFile.jsee, and then select this file from Select... in the Macros menu. Finally, open your data file, and select Run in the Macros menu while your data file is active.
Updates
EmEditor v20.0.901 now allows any arbitrary character to be used as a quotation mark for a CSV format. Please update EmEditor to v20.0.901 (or above), select Customize on the Tools menu, select the CSV page, and click the Reset button to add the Concordance load file (DAT) format to the CSV format list, or you can manually add a new format to your existing list with the delimiter of \x14 and the quotation mark of \xfe.
After you open a DAT file, you can click the "DAT" button in the CSV/Sort toolbar. To select the DAT format automatically when a file is opened, select Properties for Current Configuration on the Tools menu, select the File page, and set the Concordance Load File (DAT) (or your new CSV Format) check box in the CSV files to Detect list box.
If you want to remove quotation marks (or thorns) after you open a DAT file, you can click the CSV Converter button in the CSV/Sort toolbar, and click Remove Unnecessary Quotes button.

Xcode: How to find something only in specific file type?

In Android Studio, I could search something in certain file type using the File mask as shown below. e.g. I could search on Kotlin (*.kt) files only
In Xcode, is it possible to do so as well? E.g. I would like to search only on the Swift file (*.swift). I don't see any filter as shown below, other than Ignore/Matching Case
Below the search field, there's an icon with three dots and a line above and below. In the default case, "In Workspace" is printed next to it.
Click this icon/text and a list of scopes is shown. Click the "+ New Scope…".
You can define complex rules for your scope, but in your case you would just need one: select File extension in the attribute field, is equal to in the condition field and swift in the value field.
You can give your scope a name and save it if you need it often.
But there is also a second solution: just do your search. At the very bottom of the search panel you see a circle icon with three lines, similar to the "ground" symbol used in electrics (IMHO); next to it is a text field with placeholder "Filter". Enter *.swift here to filter the search results for hits in Swift files.
An alternative way and arguably quicker way to do it is to just type the extension in the filter section below the list of matches.

Sublime Text 2 loading all shell scripts as plain text [duplicate]

I'd like Sublime 2 editor to treat *.sbt files (to highlight syntax) as Scala language, same as *.scala, but I can't find where to set this up. Do you happen to know?
In Sublime Text (confirmed in both v2.x and v3.x) there is a menu command:
View -> Syntax -> Open all with current extension as ...
I've found the answer (by further examining the Sublime 2 config files structure):
I was to open
~/.config/sublime-text-2/Packages/Scala/Scala.tmLanguage
And edit it to add sbt (the extension of files I want to be opened as Scala code files) to the array after the fileTypes key:
<dict>
<key>bundleUUID</key>
<string>452017E8-0065-49EF-AB9D-7849B27D9367</string>
<key>fileTypes</key>
<array>
<string>scala</string>
<string>sbt</string>
<array>
...
PS: May there be a better way, something like a right place to put my customizations (insted of modifying packages themselves), I'd still like to know.
I put my customized changes in the User package:
*nix: ~/.config/sublime-text-2/Packages/User/Scala.tmLanguage
*Windows: %APPDATA%\Sublime Text 2\Packages\User\Scala.tmLanguage
Which also means it's in JSON format:
{
"extensions":
[
"sbt"
]
}
This is the same place the
View -> Syntax -> Open all with current extension as ...
menu item adds it (creating the file if it doesn't exist).
For ST3
$language = "language u wish"
If exists, open ~/.config/sublime-text-3/Packages/User/*$language*.sublime-settings
else just create it.
And set
{
"extensions":
[
"*yourextension*"
]
}
This way allows you to enable syntax for composite extensions (e.g. sql.mustache, js.php, etc ... )
There's an excellent plugin called ApplySyntax (previously DetectSyntax) that provides certain other niceties for file-syntax matching. allows regex expressions etc.
There is a quick method to set the syntax:
Ctrl+Shift+P,then type in the input box
ss + (which type you want set)
eg: ss html +Enter
and ss means "set syntax"
it is really quicker than check in the menu's checkbox.
I know this topic is old now, but let me state a new approach, some people might find this easy to understand and do.
Open Sublime Text(make sure you have Package Control installed and ready in your Sublime Text):
Ctrl+Shift+P(or Cmd+Shift+P for MacOS guys)
Type "PRV"(Package Resource Viewer), select the one ending with :Open Resource
Type "SCALA"/"scala" and press Enter
Type Scala.sublime-syntax and press Enter and press Esc to close the
open list
Now in Scala.sublime-syntax goto the section file_extensions: and add your file extension sbt(like - sbt) in the end of that section
Save and close the file and restart Sublime Text, you'll now have
Scala syntax highlighting for your custom .sbt extension. Same steps can be done with any file type like XML, PHP, HTML, JS etc.
Pretty easy to follow, right ?

How to customise file type to syntax associations in Sublime Text?

I'd like Sublime 2 editor to treat *.sbt files (to highlight syntax) as Scala language, same as *.scala, but I can't find where to set this up. Do you happen to know?
In Sublime Text (confirmed in both v2.x and v3.x) there is a menu command:
View -> Syntax -> Open all with current extension as ...
I've found the answer (by further examining the Sublime 2 config files structure):
I was to open
~/.config/sublime-text-2/Packages/Scala/Scala.tmLanguage
And edit it to add sbt (the extension of files I want to be opened as Scala code files) to the array after the fileTypes key:
<dict>
<key>bundleUUID</key>
<string>452017E8-0065-49EF-AB9D-7849B27D9367</string>
<key>fileTypes</key>
<array>
<string>scala</string>
<string>sbt</string>
<array>
...
PS: May there be a better way, something like a right place to put my customizations (insted of modifying packages themselves), I'd still like to know.
I put my customized changes in the User package:
*nix: ~/.config/sublime-text-2/Packages/User/Scala.tmLanguage
*Windows: %APPDATA%\Sublime Text 2\Packages\User\Scala.tmLanguage
Which also means it's in JSON format:
{
"extensions":
[
"sbt"
]
}
This is the same place the
View -> Syntax -> Open all with current extension as ...
menu item adds it (creating the file if it doesn't exist).
For ST3
$language = "language u wish"
If exists, open ~/.config/sublime-text-3/Packages/User/*$language*.sublime-settings
else just create it.
And set
{
"extensions":
[
"*yourextension*"
]
}
This way allows you to enable syntax for composite extensions (e.g. sql.mustache, js.php, etc ... )
There's an excellent plugin called ApplySyntax (previously DetectSyntax) that provides certain other niceties for file-syntax matching. allows regex expressions etc.
There is a quick method to set the syntax:
Ctrl+Shift+P,then type in the input box
ss + (which type you want set)
eg: ss html +Enter
and ss means "set syntax"
it is really quicker than check in the menu's checkbox.
I know this topic is old now, but let me state a new approach, some people might find this easy to understand and do.
Open Sublime Text(make sure you have Package Control installed and ready in your Sublime Text):
Ctrl+Shift+P(or Cmd+Shift+P for MacOS guys)
Type "PRV"(Package Resource Viewer), select the one ending with :Open Resource
Type "SCALA"/"scala" and press Enter
Type Scala.sublime-syntax and press Enter and press Esc to close the
open list
Now in Scala.sublime-syntax goto the section file_extensions: and add your file extension sbt(like - sbt) in the end of that section
Save and close the file and restart Sublime Text, you'll now have
Scala syntax highlighting for your custom .sbt extension. Same steps can be done with any file type like XML, PHP, HTML, JS etc.
Pretty easy to follow, right ?

Resources