Is it not possible to access user snippets from command palette? - code-snippets

I have created a few user snippets in VS Code, brought up Command Palette and searched for them with no results.
I know that I can access these in the actual code editor inline by using the prefix.
Is there a way to see all matching snippets when searching in command palette like how it's possible in Sublime Text?

Related

Unable to customize specflow report with screenshots path

I am trying to generate specflow mstestexecution report with the screenshots path mentioned as link. I made use of Console.Writeline() to mention the screenshots path but its getting dispalyed as text in the report. Please provide your inputs on the same.
The HTML report sees everything as plain text even if you use HTML tags. This is by design. You can change the behaviour of specflow.exe yourself, it is an open source project on GitHub.
When you don't want to dive to deep into that, you need a more ugly work around: You could consider to tag your links with another token (like {img} instead of ) and than search and replace in the .html file for all {img} to for example.

Delphi: Set Browsers Homepage

I want my application to be able to set IE, Firefox, Chrome & Operas homepages when a button is pressed. I understand IEs homepage is set in the registry, which I understand how to change, but can anyone give me any help with the others? Thanks
Chrome stores the homepage in a file called 'Preferences'. On Windows XP, this is located at;
C:\Documents and Settings\USERNAME\Local Settings\Application
Data\Google\Chrome\User Data\Default
On Vista+, it's located at;
C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data\Default
This file is JSON format, and so it can be opened and viewed as plain text. In order to change the homepage, you'd need to load the JSON from this file, and change the homepage field value. You may also need to change the homepage_changed field value in order for it to stick. Using something like SuperObject to change the field would be an easy solution (if I get time, I'll write up some example code later).
Firefox uses a pref.js file to store it's settings, and realistically, a way of changing this would be to load this file, find the something that's along the lines of;
user_pref("browser.startup.homepage", "[URL]");
...and edit it as appropriate before saving the file. This should be a simple task using some simple find-and-replace code. I'd strongly advise that you use a pos() function though, as it could be that the end-user has already got their own custom homepage set and so searching for a preset string (e.g. [URL]) may not work, and certainly wouldn't be reliable.
A quick search hasn't given me enough information about Opera to provide a solution, but I'll keep looking and respond if I do find such a way.
Note that none of these methods have been tested and are merely provided based upon some very quick research.

.chm file opening at a given index page from Matlab

I am trying to open a specific page within a .chm file from a Matlab GUI with the web function. Following the instructions and comments found here I have got the url of the desired page (mk:#MSITStore:D:\POv9\Ayuda\ayuda.chm::/html/ayuda1.html). However, when I write the command I need at the prompt
web('mk:#MSITStore:D:\POv9\Ayuda\ayuda.chm::/html/ayuda1.html','-browser')
it does not work (nothing happens neither an error message). I also have tried the following:
web('D:\POv9\Ayuda\ayuda.chm::/html/ayuda1.html','-browser')
web('ayuda.chm::/html/ayuda1.html','-browser')
without success.
I would like to know what I am doing wrong.
If you're on windows this works:
!hh mk:#MSITStore:D:\POv9\Ayuda\ayuda.chm::/html/ayuda1.html
This opens the help file in the Microsoft Help Viewer at the specified page.

textarea that was using plain text with option of markdown or textile filter now needs images

My clients can enter text into textarea and have the option to use the markdown or textile filters for each textarea.
With some models (articles, newsletter, etc) they can upload images to associate with the model, which are displayed in a column next to the text of the text.
This worked fine for a while, but they have now told me that the want the ability to put the images INSIDE the text a specific positions.
What is the best way to go about this? I suppose I may have to use a wysiwyg for this, but would rather not. And how would this work for images which are not yet on the server, etc?
There are different directions you could go to:
Follow the path of Confluence, which released in their new version 4.0 a rewritten WYSIWYG editor, that stores as source XHTML, not any more wiki markup.
Leads to an update of all pages when migrating.
Was pretty difficult to implement. I do not know if they use any more the TinyMCE editor of previous versions.
Follow the format of markdown how to include images in your source format. So by typing: This is my text. !image.png! The inline image shows ..., you will have a format that is understandable.
You have to expand the interpretation, so that the !<filename>! will be mapped that is stored locally anyway.
You have to add clear-up dialogs for the images that are yet not known, so doing bulk uploads ...
You may provide a drag area on your view, that then shows the filename and gives examples how to include that inside the text area.
Go for something in between, by allowing users to drag images inside the editor. There are plugins written in Javascript that allow you to do that, e.g. UI Draggable for jquery
I have no idea how to integrate that image inside the text editor. Overlay?
So the second one is the easiest, and the user knows how to do it. If they only decide that this is the solution they want to have :-)
I think I'm going to use a combination of #2 above, and the Liquid templating engine.

Change highlight colors in minted

I was setting up a nice environment to present my code in printed documentations. First I was using the lstlisting package for Latex but then I stumbled upon minted.
minted is really great, but is there a way to change the highlight colors?
Since minted uses the Pygments library, I assume Pygments is the key to the color, but I haven't found it yet.
Could anyone explain how it can be done or post a link that shows how it's done?
You want
\usemintedstyle{<name>}
where you can get <name> by doing
pygmentize -L styles
at the command prompt/terminal. For example, the minted documentation itself uses the trac style.

Resources