I've installed the vscode-regex plugin and I'm now attempting to get it to work. I have the following javascript and text document side by side in VSCode:
However I'm not getting any matches in the email.txt document. I tried the keyboard commant ctrl + alt + m, but still no love. Any ideas?
The instructions of the VS-Code Regex Preview Plugin look straightforward: Just open the test and the sample in side-by-side view, hit the hotkey Ctrl+Alt+M (⌥⌘M).
Unfortunately, I run into the same and could not get it working initially.
The solution: I've used the hotkey, then click the grey link: Test Regex...
Actually, the link and the hotkey do the same. However, the hotkey only works after the matching has been triggered by the link or clicking the actual regex pattern (as mentioned by Mark) first.
Related
I want to find the method definition in my AngularJS project but I am not able to find any shortcut to this. I've tried Ctrl + Click but it did take me to the first occurrence of the variable where it was defined in that particular file not to the method definition.
Go to Definition
If a language supports it, you can go to the definition of a symbol by pressing F12.
If you press Ctrl and hover over a symbol, a preview of the declaration will appear:
Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.
Read the full documentation here. Visual Studio Code
I'm running into this weird issue with TinyMCE where selecting a text and adding a link to it without "http://" will cause the new link to append to the current URL.
Example (assume my website is www.example.com):
Now under my settings "click" will link to "www.example.com/linkexample.com". I need it to link to "http://linkexample.com" instead, without manually adding "http://" in the "Url" field in the popup.
I've been trying different solutions online but nothing seemed to work for me.
Here is the list of solutions I've tried so far, none worked for me:
TinyMCE: How to prepend 'http://' to URL if it's not there
All examples from : http://www.tinymce.com/tryit/url_conversion.php
P.S. I'm running the latest TinyMCE 4.1.7
I'm done to try this one. it's worked for me (tell me if this thing
worked for you)
Go to link plugin on tinymce (tinymce/plugins/link)
Edit this file plugin.min.js (tinymce/plugins/link/plugin.min.js)
Find www using Ctrl+F in your editor like Notepad++ or Sublime Text
You will get this code /^\s*www\./i delete www\.
Now your code become /^\s*i
Now Save it. Done
Refresh your code using TinyMCE.
Now try use linkexample.com, You will get notification to add prefix http://
Done. I hope help you out.
In version 4.x this functionality is built in. But unfortunately it's not mentioned in the documentation, it's only documented in the changelog so I would imagine this is widely unknown.
$('textarea').tinymce({
...
link_assume_external_targets: true
...
});
I actually replaced this code:
/^\s*www./i.test(e)
with
!(/^\s*(http://|https://)/i.test(e))
I'm trying to integrate Ace editor to my site. I know that it has keyboard shortcuts for opening the search and replace popups. Is there a way to open them programatically?
I noticed that editor.searchBox is undefined from the start but it is set when I hit cmd+F. I tried to look at ace/ext-searchbox.js but I can't find any method calls to try.
See implementation of find command in default_commands.js.
config.loadModule("ace/ext/searchbox", function(m) {m.Search(editor)});
or you can use editor.execCommand("find")
Im annoyed that this doesn't seem possible, but i wanted to check with the community to see if someone has developed a working version of something similar.
I'm a graduate student and spend a LOT of time online researching, and when I find that sweet paragraph that makes just the argument I've been searching for, I've gotta copy and paste it out of chrome (on mac os x) and into word (2011). I've built a "strip all formatting" macro that works well enough, but what i would like is a pipe from chrome into my open word document that gives me 1 key "send selection to word document" (like ~).
I've got the js working to get selected text and move it around, but i cannot seem to open the document i want to move the text into. Ideally, this would work as a chrome plugin (I've built them before), but I've seen no documentation about JS => Word on other platforms (obviously activeX controls dont work for me).
Any suggestions?
You can use an automator service to do this. Open Applications > Automator, and then create a service, which receives selected text (one of the built in defaults). This works in any app, and is accessible via the Services menu when you right click.
You can do this easily with TextEdit for example using these two actions:
Service receives selected text
New Textedit Document.
I've just tried it to confirm it. It can also copy rich text etc (including links) if you want. I imagine something similar is possible with word, and there is a built in service already to do the same if you have installed TextWrangler (another word processor).
JavaScript is contained within the browser for security reasons, so you will not be able to do it with JavaScript.
The best thing that i can come up with is to write a 'bot' kinda thing that just coppy pastes, so not for in an extention.
I've made a simple bookmarklet, to aid with the reading of Daring Fireball.
http://saltcod.github.com/Snowball/
My issue is that the Drag Me Up, Scottie! link doesn't work when you drag it up. If you manually create the bookmark with the same code (https://raw.github.com/saltcod/Snowball/master/snowball.js) it will work, but it won't work if you try and drag it up.
The link is breaking the block of Javascript somehow. Anyone got any ideas as to what I might do with it?
You messed up the quotation marks; your page is NOT valid HTML.
Inside a link, you cannot use ", but either use ' or encode the quotation marks.
Did you not notice that your javascript link was truncated at the first "?