Finding Images in Go To Anything - sublimetext

Now that sublime has a nice image viewer, is it possible to search for images in Go To Anything Ctrl+P?

I'm not sure of a way to do it on a project-specific basis, but you can get images to show up in Go To Anything by default, then exclude them from specific projects.
In Preferences > Settings - Default, change:
"binary_file_patterns": ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"],
to
"binary_file_patterns": ["*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"],
If you don't want images popping up in Go To Anything for a particular project, you'll have to exclude them in the project's settings with Project > Edit Project.
{
"folders":
[
{
"path": "/path/to/project",
"file_exclude_patterns": ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga"]
}
]
}

Yes. Just put insert filename of the photo and It'll show up in search results.
Searching by extension also works :

Related

Sphinx search engine creates error in example code

I am working with documentation built with Sphinx. I created a code example:
{
"speechModel" : {
"language": "en-UK",
"features" : [ "advancedPunctuation" ]
}
}
However if I do a search and enter "advanced punctuation" in the filter, it displays as in the screenshot above, which would be misleading to a user. If I copy and paste what looks like "advanced Punctuation", it will render correctly, in camelCase without the space. But it's still problematic that it appears incorrectly.
Has anyone discovered a solution to this search issue with Sphinx?

VuePress Sidebar incorrectly rendering

I was looking for a solution to automatic generation of the VuePress sidebar and found this module which was recommended in this tutorial - solution2
I'm trying to get it working as described however the sidebar displays the actual folder path to the html rather than just the name as can be seen below, i've tried a different folder structure, adding and removing MD files but i cannot get the sidebar to display correctly. Would anyone know how I can fix this / what i've done wrong?
Config.js:
const getConfig = require("vuepress-bar");
module.exports = {
title: 'Hello VuePress',
description: 'Just playing around',
themeConfig: {
...getConfig(`${__dirname}/..`)
}
}
Sidebar result :
I fixed this by adding the correct front matter to my MD files, title and permalink

Deactivating AutoLinking in RTE editor - Typo3

Whenever a link is typed in the RTE editor, it will automatically be enclosed in an tag and converted to a link.
Is there a way to stop this behavior, other than removing each link manually?
I'm not that much of an expert, but I tried to use the "minimal.yaml" configuration for the RTE editor, and It basically done what I wanted since the minimal setting doesn't have the linking option at all, but I need all the other options that are not available in the minimal, and I need the option to create a link manually when needed, just not automatically.
You need to add a custom configuration file for the RTE. Follow this guide to do so : https://usetypo3.com/ckeditor.html
After that, in the removePlugins section, add - autolinking like this :
# Load default processing options
imports:
...
editor:
config:
...
removePlugins:
- autolinking
What I did, I commented the lined where the autolinking.js actually creates a URL from the typed link and commented that out.
I don't think this is the optimal solution, but it's doing what it's supposed to.
/typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Plugins/autolinking.js
editor.on('key', function(evt) {
if (this.mode !== 'source') {
if (evt.data.keyCode === spaceChar || evt.data.keyCode === tabChar || evt.data.keyCode === enterChar) {
//editor.autolinking(evt);
}
}

How could I use per-folder color schemes? (Sublime Text 3)

Here is my problem: when writing javascript for both server and client-side, I regularly share methods and/or have close file names. I would love to be able to keep the context in mind, just by the background color of the opened files. I thus look for a way to tell sublime text to use one color scheme for files in the server folder and an other for those in the client folder: any clue on how I could do that?
I'm not sure it's even possible as it would imply a per-folder config file I guess, but that's my bottle in the sea...
thanks!
The easiest way to do this is with projects. Set up a project for your client-side folder, and another for your server-side folder. Then, go to Project -> Edit Project and you'll see something like this:
{
"folders":
[
{
"follow_symlinks": true,
"path": "/home/mattdmo/Projects/js/MySweetApp/server-side"
}
]
}
There are two other top-level arrays you can add: "settings" and "build_systems". The settings section can include anything that goes in Preferences -> Settings-User, including "color_scheme":
{
"folders":
[
{
"follow_symlinks": true,
"path": "/home/mattdmo/Projects/js/MySweetApp/server-side"
}
],
"settings":
{
"color_scheme": "Packages/Neon Color Scheme/Neon.tmTheme"
}
}
Just edit both .sublime-project files you made earlier to add a settings section and different color_scheme choices within, and you'll be all set.
EDIT
While pondering this again, I came up with a different solution using a plugin. Create a new Python file with the following contents:
import sublime
import sublime_plugin
class ClientServerColorSchemeCommand(sublime_plugin.TextCommand):
def run(self, edit):
if "/server/" in self.view.file_name():
self.view.settings().set("color_scheme",
"Packages/User/server.tmTheme")
elif "/client/" in self.view.file_name():
self.view.settings().set("color_scheme",
"Packages/User/client.tmTheme")
class ClientServerEventListener(sublime_plugin.EventListener):
def on_load_async(self, view):
view.run_command("client_server_color_scheme")
Make sure you adjust the "color_scheme" settings to the color schemes you want to use for client and server files, and feel free to tweak "/server/" and/or "/client/" in the if/elif statements if you want to make them more specific. If you're on Windows, change the forward slashes / to double back-slashes \\. Save the file as Packages/User/client_server_color_scheme.py where Packages is the folder opened when selecting the Preferences -> Browse Packages... menu option.
Once saved, the event listener will start up immediately, and any file you open that contains the specified path will have the color scheme set to whatever you indicate. All other files from other paths will use your default color scheme.
Please note that this plugin will only work in ST3. To make it work in ST2, change def on_load_async to def on_load.
I modified MattDMo's solution and it works with the latest Sublime Text 3 (build 3143):
import sublime, sublime_plugin
class ColorSchemeByPathCommand(sublime_plugin.TextCommand):
def run(self, edit):
settings = self.view.settings()
if "/test/" in self.view.file_name():
settings.set('color_scheme', "Packages/User/SublimeLinter/Orange01 (SL).tmTheme")
else:
settings.set('color_scheme', "Packages/User/SublimeLinter/Blue01 (SL).tmTheme")
class ColorSchemeByPathEventListener(sublime_plugin.EventListener):
def on_load_async(self, view):
view.run_command("color_scheme_by_path")

How to Setup NativeControls in Xcode 4?

I'm building another application for iOS and this time I would like to go more native with PhoneGap, so I saw NativeControls and I loved the plugin features, but how do I get it setup on a Xcode 4 project? I haven't seen any tutorials about this.
First, you must reference the NativeControls.js file in your html page after including it in the www folder. Make sure that this file is located AFTER the phonegap.js file in your html. Next, add the .m & .h files in the plugins folder. Last, add NativeControls as a key in the phonegap.plist file, setting value as string. Also keep in mind this plugin only works for the iPhone.
You may also try checking out http://hiediutley.com/2011/03/30/phonegap-tutorial-series-%E2%80%93-5-third-party-plugins-nativecontrols/
Include NativeControls.js in www folder, and NativeControls.h and NativeControls.m files in Plugins folder in Project. In the Cordova plist file add a key value pair under the item called 'Plugins' as 'NativeControls' (key name and value: NativeControls).
If you are using Native Controls for tab bar, place the following in the onDeviceReady function:
nativeControls = window.plugins.nativeControls;
nativeControls.createTabBar();
// First tab
nativeControls.createTabBarItem(
"tab1",
"Tab1", //Name that appears on tab item
"....png", //Tab image placed in Resources folder
{ "onSelect": function() {}}
);
// Second tab
nativeControls.createTabBarItem(
"tab2",
"Tab2",
"....png", //Tab image placed in Resources folder
{ "onSelect": function() {}}
);
// Third tab
nativeControls.createTabBarItem(
"tab3",
"Tab3",
"....png", //Tab image placed in Resources folder
{ "onSelect": function() {}}
);
// Compile the TabBar
nativeControls.showTabBar();
nativeControls.showTabBarItems("tab1", "tab2", "tab3");
nativeControls.selectTabBarItem("books");

Resources