I want to be able to quickly and easily enter the Zodiac signs (via their Unicode characters) into Visual Studio. I can copy+paste them in just fine, but that becomes tiring when needing to write code for a project that uses them extensively. I want something a bit faster that doesn't require paging back and forth between a sheet with copy+paste.
I tried using the Alt+Code entry but, for some reason, it enters the wrong characters into Visual Studio, despite working fine in most other applications I have tried. For example, when I tried to enter Aries '♈' it gives me 'H' (Alt+9800).
I read in a few places online that Unicode characters can be entered by typing their numeric value and then pressing Alt+X, but this seems to have no effect in my instance of Visual Studio. I thought that perhaps that key-binding wasn't enabled, but I had no idea what such a key binding would be called in order to rebind it.
So, my question to you, wise Stack Overflow, is this: What's the fastest and easiest way to repeatedly enter the Zodiac Unicode characters into Visual Studio?
I never found a faster solution to enter the characters as if I was typing a key on the keyboard. I even went as far as attempting to bind custom keys on my Razer peripheral devices, but they don't have a means to set "Enter character of choice" as a binding.
Ultimately, what I found was the fastest and easiest in this case, was to declare a public static class that includes const chars that are named appropriately and copy+paste the characters themselves in exactly once. Then, I simply allowed code-complete to handle using these in code.
It makes the code more verbose in every location that uses one of these chars, but does have the added benefit that, in the future if we were to decide that a different Aries character, for example, was preferable, we could change all of the characters globally from a single place without needing to find+replace-all.
public static class Zodiac
{
public const char Aries = '♈';
public const char Taurus = '♉';
public const char Gemini = '♊';
// ...
}
Related
In searching to resolve this issue I have found several lists of codes that appear to be the same special character, but give different codes from each other. And since I can't seem to type them, I can't verify if any of them is the correct code for a domain name.
The domain name URL for purposes of this inquiry is the http://sǝx.com IDN. If you paste that in, it goes to a landing page; but how would you TYPE it in?
In comparison, £.com (symbol for the British Pound) is pretty straight forward: you just hold down the Alt key, tap 0, tap 1, tap 6, and tap 3 — all on the numpad — and then release the Alt key and press enter. Bam! You just created the £ needed to go to the £.com website (which resolves and redirects to poundsymbol.com).
But how do you do this for the "ǝ" in sǝx.com? The domain name converts to "xn--sx-73a.com" in your browser once you press enter, so I thought that might give me a clue to typing in the character. But if so I missed it.
However, in researching the "ǝ" symbol I ran across this URL:
http://easycaptures.com/fs/uploaded/1110/6435628828.jpg
(That's an image of it, since when I paste it in this editor it ends up like this instead: ?text=%C7%9D)
Anyway, that URL implies that there are many different versions of the letter available in several different character sets. If so, would they all work the same in a browser for resolving to the same domain name? If so, is any particular character set easier to work with on a standard US keyboard?
There are also other URLs that seem to give different information about the actual code for the letter, such as wikipedia:
https://en.wikipedia.org/wiki/%C6%8F
(and others, but I'm at my link limit)
While they all look similar, I am wondering if the distinction between them is enough to prevent the URL from resolving properly based on which exact character from which exact character set is deployed.
And again, I am only unable to test this more as I cannot ascertain how to type most of them into the browser - particularly if the code has a letter, as that seems to start triggering shortcuts on the browser instead of considering it as URL input.
Please help me decipher the mystery (to me) of the "ǝ" (apparently also called schwa) and how I would find and type the correct code to get to "sǝx.com" or "pǝt.com" or any website that included "ǝ" in its name.
Thanks in advance!
I am curious if VS2013 has the possibility to make it's intellisense auto-complete a little more effective.
I am used to have classes like MyClassInCamelCase and MyClassAgainInCamelCase even MyClassYetAgainInCamelCase. The way intellisense works for me is that I type My and I get a list of the 3 possible classes that match this word. But things will be a lot easier if I could make it like a command prompt and hit some special key that will autocomplete the word until the next CamelCase word, so I could get "My", then "MyClass" and then the next character I type can define a unique word (or just hit ; for example and auto-complete the current selected word on the list).
Also, the possibility to navigate between CamelCase words will be of great help.
Does anyone knows if this is a hidden feature or something? Or if there are external plug-ins that can make this possible?
This might not directly answer your question, but note that with camel-cased type names, you can do better than to start typing the beginning of a type name (My):
Typing an enclosed part of the name:
Again will suggest MyClassAgainInCamelCase and MyClassYetAgainInCamelCase.
Yet will suggest just MyClassYetAgainInCamelCase.
Typing just the capitalized letters:
MCY will suggest MyClassYetAgainInCamelCase.
Both of these shortcuts can be combined, btw.
I think the hotkey combination is Ctrl + Space to open Intelisense, than Tab, Enter or Space to insert.
There is a complete word option in the Intelisense settings, check if that's toggled on.
While programming I often realize that I need to add something before already typed code. For example I type the name of the variable:
input[0]
and then I realize that my array is of type string and I need to convert it. So, I move to the beginning of the word (with Ctrl-Left Arrow) and start typing
Convert.To|input[0]
with pipe used to show the position of my cursor. I get some suggestions from Intellisense, including the ToInt32() method I am looking for. But as long as I confirm this suggestion with Tab or Space, I get the following:
Convert.ToInt32(|)[0]
So, the text from the cursor position to the end of the word is substituted with suggestion, and this is definitely not what I want.
This problem is not specific for VS 2012 and might be due to some extensions I have installed, but my attempt to pursue its origin did not yield anything. I have following extensions installed: ReSharper, PowerCommands, Productivity Power Tools.
If you are entering an unrelated expression before an identifier, add a space before you start typing the new expression. This will prevent the completion from replacing the existing identifier.
For example, if | marks the caret, the following scenario would avoid the problem you are facing.
Convert.To| input
This code completion feature is designed to prevent the insertion of incorrect identifiers. If Visual Studio behaved like some other IDEs I know of, using the code completion feature in your original example would result in the insertion of ToInt32input, which would never be valid.
If you are interested in additional thoughts regarding this feature in general, I have described this as the Extend (default for Visual Studio) and No-extend (default for NetBeans, Eclipse, and others) modes in my blog article Code Completion filtering, selection, and replacement algorithms.
A two years later answer. But it might still be useful for some.
What helped for me in VS2015 (which might also work in VS2012) is to add the a space character to the list of 'Member List Commit Characters' in the Intellisense settings.
After this the characters after the cursor are not removed by an auto-completion.
As denoted in This Article ReSharper's .sln.DotSettings file contains only those settings which values changed from default ones. Is there a way to store all the code editting and code inspection settings in a team-shared layer, regardless of the value being changed or default?
The only way to do this I see is changing each and every value and switching it back (so all of them end up in .sln.DotSettings file), however this seems to be quite a time-consuming task.
The problem I'm trying to avoid is as follows:
Suppose a team has 2 developers, say Jessika and John, and they decide that they are OK with Resharper's default to prefix private fields with with an underscore:
int _myPrivateField = 1;
So they are not changing the "Instance fields(private)" setting under "C# Naming Style" section and check in the .sln.DotSettings file.
However, when Jessica checks out the source code on her home laptop it Resharper still suggests using
int myPrivateField = 1;
because her computer has its setting changed to have no prefix, saved as "Save to this computer". As denoted in Resharper's docs if a "This Computer" layer has a value for a setting, whereas the other layers don't the value will be applied (see the middle green setting in this picture: http://blogs.jetbrains.com/dotnet/wp-content/uploads/2012/08/layers3.png
Regrettably, at the moment we can offer no option other than changing options one by one and saving them in the requisite layers. We are aware that this approach is inconvenient, and are in discussions as to how to best handle this.
I am currently developing some functionality that implements some complex calculations. The calculations themselves are explained and defined in Word documents.
What I would like to do is create a hyperlink in each code file that references the assocciated Word document - just as you can in Word itself. Ideally this link would be placed in or near the XML comments for each class.
The files reside on a network share and there are no permissions to worry about.
So far I have the following but it always comes up with a file not found error.
file:///\\165.195.209.3\engdisk1\My Tool\Calculations\111-07 MyToolCalcOne.docx
I've worked out the problem is due to the spaces in the folder and filenames.
My Tool
111-07 MyToolCalcOne.docx
I tried replacing the spaces with %20, thus:
file:///\\165.195.209.3\engdisk1\My%20Tool\Calculations\111-07%20MyToolCalcOne.docx
but with no success.
So the question is; what can I use in place of the spaces?
Or, is there a better way?
One way that works beautifully is to write your own URL handler. It's absolutely trivial to do, but so very powerful and useful.
A registry key can be set to make the OS execute a program of your choice when the registered URL is launched, with the URL text being passed in as a command-line argument. It just takes a few trivial lines of code to will parse the URL in any way you see fit in order to locate and launch the documentation.
The advantages of this:
You can use a much more compact and readable form, e.g. mydocs://MyToolCalcOne.docx
A simplified format means no trouble trying to encode tricky file paths
Your program can search anywhere you like for the file, making the document storage totally portable and relocatable (e.g. you could move your docs into source control or onto a website and just tweak your URL handler to locate the files)
Your URL is unique, so you can differentiate files, web URLs, and documentation URLs
You can register many URLs, so can use different ones for specs, designs, API documentation, etc.
You have complete control over how the document is presented (does it launch Word, an Internet Explorer, or a custom viewer to display the docs, for example?)
I would advise against using spaces in filenames and URLs - spaces have never worked properly under Windows, and always cause problems (or require ugliness like %20) sooner or later. The easiest and cleanest solution is simply to remove the spaces or replace them with something like underscores, dashes or periods.