Does anyone know how I can use the SASS Indent based syntax in visual studio 2015 with highlighting.
I am not too fussed about compilation because I am using grunt for this anyway.
I am trying to get the company I work for to switch towards SASS indent syntax from LESS and so far everything looks as if I am winning in doing so.
The only issue is I think they will just scrap it off if I cant supply a way of using the syntax in VS2015 properly
anyone know any plugins etc?
thanks in advance,
Kieran
If I understand your question correctly: do the following
tools > options > text editor > sass > tabs
check "smart"
choose the tab size
check "insert spaces"
This will give you the automatic indenting that you can get from CTRL + D to format your document.
As far as Highlighting intellisense, this should have been featured in your VS2015, but if it's not, Go to Extensions and Updates and search for "SassyStudio". This has intellisense in it
Here is another link for .sass files syntax highlight. I was able to use this with no internet connection workstations (government). I think this will help
Related
Using VS2015, in C# or other languages when you type part of an identifier, then punctuation, it auto-completes. eg type 'conso' then '.' and it will complete it to 'Console.'. I like this!
But in Typescript, I have to press enter or tab to get the completion. So 'docum' then enter then '.', to get 'document.'
Is there a config option to make the Typescript completion work like C#? The difference is annoying.
Thanks
It seems like at the moment this is not supported, but it is a known issue.
this will be fixed in 2.0. autocompletion on most characters...
Following the trail leads me here.
Where I found
I have a fix for this, and it should be part of the final 2.0 release.
I'm a pretty heavy user of colon hashes but the default Aptana Studio Ruby doesn't provide any highlighting for them.
Here's a colon hash in Ruby 1.9:
{ animal: "duck" }
Does anyone know what bits I need to punch to make the "animal:" part display in another colour?
Update:
It seems from reading the source that the PLists file isn't being used by Aptana and that the feature is presently incomplete.
https://github.com/textmate/ruby.tmbundle/issues/17
I've tried changing the scopes in source but it doesn't seem to update for me.
To find the scope Aptana is trying to highlight
Commands -> Bundle Development -> Show Scope and Matching Theme Rule (alternatively the default shortcut is Ctrl+Alt+P)
Read the box. It may list several scopes.
The way you add a scope:
Window -> Preferences
Select Aptana Studio then the Themes option.
Press the + button next to the Scope Selector textbox.
Add your scope and set the colours.
Apply and click OK
I'm all out of ideas. Hopefully this will help someone get closer.
Aptana Studio 3 uses TextMate themes for syntax highlighting, so you just need to find a TextMate theme that supports it.
I'm using VS2010 with ReSharper and "Son Of Obsidian" theme and have the following frustrating highlighting issue in String.Format sections.
Selecting a method (or any) parameter gives the grey background - see string bString in picture. But the highlighting inside the String.Format string is different, and unreadable.
In "Tools > Options > Font and Colors" I've tried: "Selected Text", "Inactive Selected Text" and "Highlighted Reference" both in vain.
So please:
a) What do I need to change
b) Is there a decent way of finding it out (I've tried doing a screen grab for the Hex color code and searching for that in the style XML, but that doesn't work)
After an age of trying this out on my home PC I've discovered the element in question is ReSharper Matched Format String Item
There should really be an easier way of finding this stuff out
It appears your cursor is in an Intellisense Code Snippet field.
Could it be Code Snippet Field?
Paddy's reply pointed me in the correct direction, but my issue was slightly different. I'm going to post my solution here in the hope that it might help others.
I'm using VS2013 and Resharper 8. My issue was that Resharper had not been able to import it's own Font and Colour settings on installation. For me, the Resharper options shown in Paddy's image were not visible. This is a known issue with Resharper installation and the solution is as follows:
1) Close all Visual Studio instances
2) Open C:\Program Files (x86)\Microsoft Visual Studio {VS version}\Common7\IDE\Extensions\extensions.configurationchanged file
3) Type anything there
4) Save the file
5) Open VS and check Fonts and Colors in Tools | Options | Environment
(source)
For me, as soon as I reopened VS, Resharper had been able to import its own settings and the highlighting issue was already fixed without needing any further action from me.
Now, when trying to edit the extensions.configurationchanged file, I also ran in to an "Access is Denied" error message (I'm running Windows 7 as an admin). To overcome this I had to open Notepad as an administrator (Start > right click notepad > Run as administrator) and then use File > Open to open the extensions.configurationchanged file.
I hope this helps people in the future!
I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting?
PS: The assignment is solving a math problem, so the choice of language isn't important and the teacher doesn't need to compile and run the program. She just wants to see our approach and results.
There is an extension now :) Visual Studio 2010 Color Printing Extension
Works well! :)
The best way I've found to accomplish this is to copy from Visual Studio and paste into something like MS Word or OpenOffice Writer.
This gives you full source code, with syntax highlighting. You can then print from Word (including adding your intro documentation before the code, etc).
Just to let everyone know, unfortunately printing in color was cut from Visual Studio 2010 because of resource constraints. Since we've rewritten the editor from scratch in WPF, we didn't have time to reimplement everything so we had to sacrifice this feature. We will try to implement this in the next version of Visual Studio. For now, copy to clipboard and paste into other app such as Microsoft Word is the recommended solution for printing code with color.
If you go to Tools -> Options -> Environment -> Fonts and Colors you can change settings to print with syntax highlighting (change 'Show settings for' dropdown to 'Printer'). But you will need to change all the individual settings to match your IDE (I don't know of a way to make it automatic)
Edit: you can use that "Use..." button next to the dropdown to copy settings from the Text Editor
Simplest of all copy code to clipboard and paste into MS-Word is the way I do and it works...
Have a look at VS.NETcodePrint 2010 availabe from www.starprinttools.com. You will be able to print and export the color coded output to PDF.
Joginder Nahil
Due the fact MSVS does not support it anymore I think the best way is really to copy the code and paste it into WinWord.
The advantages are listed below. You can
set the font/size exactly how you want it.
set the format of line numbers.
have your own header/footer.
remove #region from printing.
add a watermark to the output.
For me - I print once in 2 months a source code - it is a very comfortable way which I never could achieve with any 3rd party extension.
I coded a Mancala game in Java for a college class this past spring, and I used the Eclipse IDE to write it. One of the great (and fairly simple) visual aids in Eclipse is if you select a particular token, say a declared variable, then the IDE will automatically highlight all other references to that token on your screen. Notepad++, my preferred Notepad replacement, also does this.
Another neat and similar feature in Eclipse was the vertical "error bar" to the right of your code (not sure what to call it). It display little red boxes for all of the syntax errors in your document, yellow boxes for warnings like "variable declared but not used", and if you select a word, boxes appear in the bar for each occurrence of the word in the document.
A screenshot of these features in action:
After a half hour of searching, I've determined that Visual Studio cannot do this on its own, so my question is: does anyone know of any add-ins for 2005 or 2008 that can provide either one of the aforementioned features?
Being able to highlight the current line your cursor is on would be nice too. I believe the add-in ReSharper can do this, but I'd prefer to use a free add-in rather than purchase one.
There is a RockScroll alternative called MetalScroll which is essentially the same thing with a few tweaks and improvements.
Also there is a small and simple WordLight plug-in that only highlights the identical tokens.
Both are open source and support code folding which is nice.
Imho, the bar next to the scroll bar in Eclipse is a lot more elegant solution than the scroll bar replacement of RockScroll/MetalScroll. Unfortunately I couldn't find any VS plug-ins that do it the Eclipse way, so I just stick with WordLight.
Check following addins
Productivity Power Tools- Displays error in scrollbar and
Highlight selected word
In a different question on SO (link), someone mentioned the VS 2005 / VS 2008 add-in "RockScroll". It seems to provide the "error bar" feature I was inquiring about in my question above.
RockScroll
EDIT: RockScroll also does the identical token highlighting that I was looking for! Great!
Old question but... Visual Studio 2010 has this feature built-in, at last.
The highlight functionality is conveniently implemented in VisualAssist.
In my opinion, they are both must-have.
1) Highlight identifier under editing caret:
Options -> Advanced -> Refactoring -> Automatically highlight references to symbol under cursor
2) Highlight search result - in all windows. Works for RegExps!
Options -> Advanced -> Display -> Highlight find results
About RockScroll: It doesn't highlight the identifiers. It only highlights the same string in the source code! If there are similar identifier declared : ex. _test and test, and test is highlighted it will highlight the string "test" in variable _test too! And it will also highlight the same string in a method called "sometesting()". So it isn't exactly like eclipse and doesn't work for me.
The automatic highlight is implemented in Visual Assist as the refactoring command "Find References". It highlights all occurences of a given variable or method, but that's not automatic (binded to a keyboard shortcut on my computer).
Here is an exmaple:
DevExpress CodeRush does this when you press TAB when the cursor is in an identifier, you can then tab through all the highlighted instances. There's also a DXCore plugin (the foundation upon which CodeRush/Refactor Pro are built) that does current-line highlighting.
In VS 2017, this can be solved by installing the Match Margin plugin.
It appears to be part of the Productivity Power Tools (which might be worth looking at for other features), but surprisingly, installing PPT didn't solve the problem for me, I had to install Match Margin separately.
The "error bar" functionality is provided in JetBrains ReSharper. I'm not sure if it does highlighting of references to the currently selected identifier.
For selected word(s) highlight function only, there is also StickyHighlight.
StickyHighlight supports Visual Studio 2010 & 2012.