Does anyone know how to either add back in the EditorConfig Designer as a program to open files with or how to reset the default editors for file types?
After changing the default editor for .editorconfig files to be something other than the EditorConfig Designer the option to set the default editor back to the designer or to open with the designer is now gone.
I know I can probably delete my appdata folder or something like that and reset it that way, I'm looking for a way to do it that doesn't take doing that. I did a quick search in some of the xml files visual studio uses but realized it would take some time to figure out exactly what to do to add it back in myself, thus I'm asking with hopes someone has experience doing this.
One work around I have found is to set the files to open with a text editor with text encoding then hit cancel when it asks which encoding to use. It then opens the designer but it still won't show up as an option to set as the default or in the open with items, which is what I want.
I have written a core java internationalization program but in eclipse console I am not able to see the out put message. The reason is its not ASCII code. I changed the console preferences to UTF-8 then also not able to see the result.
This issue is Windows-only and believe it or not, it is not related to console encoding. It is related to source file encoding.
In the Project Explorer (or Package Explorer, it doesn't matter) right-click on a source file and choose Properties. Alternatively, you can use Alt+Enter on a selected source file to activate the same dialog.
In the Properties dialog make sure that Resource tab is selected and at the bottom of this tab switch text file encoding to UTF-8 (by default it will be Windows-family encoding...).
Run the program again and that should do the trick.
Each file that does any printing must be encoded like that. Don't ask me why, I guess it has something to do with Eclipse long history of weirdness.
We're using Visual Studio 2010 professional to develop and maintain our company ASP (classic ASP, not ASP.NET) e-commerce web site, and I'm having file encoding issues every time I create a new page.
Every page in our web site is saved as Windows-1252, and when I create a new page (or randomly when I modify an existing one) Visual Studio saves the page using the UTF-8 encoding, screwing up extended characters or #includes (since the included file is saved as Windows-1252 and the page including it is UTF-8, when displayed the included content goes haywire).
I've tried searching everywhere, but the only solution I found is "Save every file manually with "File" → "Save as" → "Save with encoding", which is quite an hassle to do every time (and I'm totally going to forget to do it sometime).
I already tried deselecting the option "Save documents as Unicode when data cannot be saved in codepage" in "Environment" → "Documents" settings but to no avail.
Am I really stuck with the manual thing?
I'm way late answering this, but I had the issue myself and this is the first hit on google, so I'll document it here if anyone else wants to know. :)
The default encoding of a new file in Visual Studio depends on the template for that kind of file.
The JavaScript file template for instance recides in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Web\WebNewFileItems\JScript.js (on my box).
If you edit that file and save it with your encoding of choice, all new javascript files created with VS will be of that encoding.
Hence you can set the encoding of each file type independently.
I don't know if there is a setting in VS to change the default encoding (though I highly doubt it). You can however quite easily write a little add-in that gives you a "Save as 1252" command which can then be mapped into any menu you like.
Lars-Erik's answer does the trick.
Just add some information:
For those who want to change default encoding of MFC files, here're the templates:
...\Microsoft Visual Studio 10.0\VC\VCWizards\CodeWiz\MFC\Simple\Templates\LANG_CODE
LANG_CODE is the language of your VS 2010 (1033: en-us, 2052: zh-cn, etc.)
In my case, the language of VS is en-us, and MFC template files
are all written in English (only ASCII characters) without UTF8 BOM, which
means they can be interpreted as either a UTF8 file or a file in my OS code
page (cp932). Files created by those templates are treated in cp932 instead of
Unicode by default, so I have to add BOM to those templates to make VS 2010
save files explicitly in UTF8 (also with BOM).
Can't find it, but builtin workaround is, File > Save As > then where the save button is, there is a Down arrow, give you the option of "Save with Encoding"
I select US ASCII Cause I'm getting the BOM on all my documents, once published.
I much prefer Wordpad to Notepad in Windows 7 for quickly checking out source files, namely because Notepad doesn't display most correctly if the file was written in Unix.
However it saddens me that I can't chose the plain-text mode's default font.
Is there a way to change it? I'm guessing registry here, if at all.
Open a new document, set the default font and size, and save the file as
"wordpad.wri". Close wordpad. Right click on the saved file and select
Properties. On the general tab check read-only, apply your changes and
click OK.
Whenever you want to launch wordpad, do so by double clicking the saved
wordpad.wri.
[src: Tom Porterfield ]
You can change also the Icon of the shortcut, putting the icon of the Wordpad program, and to change also the name of the shortcut, so it will look as it's really the Workpad program.
Is there any way to force Visual Studio to copy selected code to the clipboard as unformatted text?
When I am copy-pasting code into Word or more often Outlook I have to do it via Notepad to get rid of the formatting...there has to be an easier way!
This feature can be turned off by editor.copyWithSyntaxHighlighting.
Visual Studio does put unformatted text on the clipboard, but it also puts formatted text. (The clipboard supports multiple simultaneous formats, and the OS assumes that they're simply different representations of the same data, although there's no technical enforcement of that point.)
The application you're using to paste then chooses its preferred format. In Word, and maybe Outlook as well, there is a "Paste Special" command that allows you to choose which format you want to use.
My department uses PureText. Sits in the system tray; copy text, click-it - strips all formatting leaving the plain-vanilla text. I'm sure it's much like PlainTextClipboard.
"PureText is basically equivalent to
opening Notepad, doing a PASTE,
followed by a SELECT-ALL, and then a
COPY. The benefit of PureText is
performing all these actions with a
single Hot-Key and having the result
pasted into the current window
automatically."
The goad for this was flaky Lotus Notes; likes to crash when pasting HTML-marked-up-text that I innocently copied from a web-page....
If you press CTRL+Z after pasting, it will reverse to the non-formatting one, because the formatting actually counts as one step after the regular paste.
When I do it choosing the little pop-up menu option attached to the wee clipboard item "Match Destination Formatting" does the trick for me.
From this blog post I got these instructions for getting rid of the black background when copying & pasting out of VS with the 'Dark Theme' activated, but the html in it can be tweaked to alter the rest of the formatting as required (e.g. set all text to black).
If required, install Productivity Power Tools
Open Tools → Extensions and Updates
Select Online (Visual Studio Gallery) and search for Productivity Power Tools 2012/2013
Download and restart Visual Studio when prompted
Productivity Power Tools Settings
Open Tools → Options → Expand Productivity Power Tools
select HTML Copy
Change the BeforeCodeSnippet option to:
<style type="text/css">.identifier {color:black !important;}</style>
<pre style="{font-family}{font-size}{font-weight}{font-style}">
Change EmitSpanClass to: True
Check EmitSpanStyle is: True
You might find http://www.extrabit.com/plaintextclipboard/ to be a useful tool. Some applications have a paste option which strips formatting, but what you really need is a copy operation that strips formatting, which VS does not offer.
In Outlook 2007, I've changed my default paste to do text only.
Go to Editor Options | Advanced
Under the "Cut, copy, paste" heading choose Pasting from other programs: [Keep Text Only]
And if you still want to paste formatted (less often in my case), use paste special...
Search editor.copyWithSyntaxHighlighting in Settings and disable it. Whoever enabled it by default must be flogged.
This Microsoft Office site offers a workaround that involves writing a macro to replace ctrl+v functionality to paste plain text all the time, but that may not be what you want. You can alternatively remap an unused shortcut (ctrl+?) to provide you with this functionality so you don't have to keep enabling / disabling the macro.
For applications that do not have a "paste special" you could use an application like PureText
The Visual Studio Extension Copy for review may be handy for you. Actually, it does not do unformatted copying, but applies it's own simple text-based template.
It supports a "Stack Overflow" format, which just removes the leading whitespace, while keeping the indentation as much as possible, and introduces some sort of header.
Get it from the from the Visual Studio Gallery and try it out.
Disclosure: I am the author of that Extension. Please notfiy me, if I can improve it to your needs.
A trick when applies:
You don't want to install an extension
Your destination application doesn't have options such as "Paste Special"..
You can copy the code and paste it in VS Code search box (shows when you press Ctrl+F). Then copy it again from there.
Then you can paste unformatted text anywhere you want.