A good Code snippet tool or plugin for Word documents? - plugins

Does anyone know of a good tool or plugin that enables Microsoft Word or OpenOffice Writer to add code snippets to a document in a clean manner?
I'm not sure if such a plug-in even exists, so redirecting me to any other tool that can help me would be appreciated.

I simply type out the snippet in Visual Studio and then copy paste it into word. It preserves all the code formatting.
The only other thing I do is change the font to Consolas.

I love codekeep for VS.. But it's only available for VS

Snip-It Pro is a stand alone code snippet tool that works with word or open office. It docks to the side of the screen and snippets can be drag dropped into any application. It has syntax highlighting too.
disclaimer: It's my product :)

Related

How can I copy the text of the Interactive Playground page in VS Code?

I thought this page would be very useful for me. So I wanted to save it on my local computer. But I could not copy the text in it.
I tried several ways:
right-click: invalid
try to find the file: don't know the name
search on Google but there is no solution now
Can somebody help me? Thank you very much!
The file is called vs_code_editor_walkthrough.ts in the GitHub repository for Visual Studio Code. You stated you were after the text of the file, so if you view it in its raw form you can easily get all of the text in its markdown format.
It won't look anywhere near as pretty as Visual Studio Code renders it. If you want to achieve that look, you'll probably need to be savvy with TypeScript, something I am not.

visual studio code editor not autocompleting, colour coding or giving suggestions

UPDATE: I solved my own problem. Solution is at end of this post
Original Post:
Intro:
Hi, I had Visual Studio Code (VSCode) installed a long time back for use with Unity but ended up not using it and opted for Visual Studio instead because that was what my Unity course was using.
I am now learning HTML so I now want to use the Visual Studio Code as the editor.
Problem:
When I type out my HTML code, VSCode is not autocompleting any of my code or giving me any suggestions or colour coding the text.
Troubleshooting steps done:
I completely uninstalled Visual Studio Code including the user data folders: .vscode in users and Code in Appdata/Romaning (which were advised on the visual Studio code website uninstall instructions).
I then installed a fresh version. But the same problem persists.
Update: I have learnt that the feature that I have an issue with is called Intellisense. CTRL-SHIFT-R is supposed to refresh this feature module. So did this and I get the message "No refactorings available". So perhaps I am missing a module or plugin that I am supposed to also install?
I'd appreciate someone's help to solve this.
Many thanks.
PS This is my first StackOverflow question, I hope it's not a forehead slapping debut!
UPDATE: SOLUTION
I just solved my own problem...and it's probably a beginner's mistake...
I discovered at the bottom right corner of the editor, this a menu tray. One of these items showed "Plain Text". On clicking it, it showed a list of programming languages. Naturally HTML was one of them and I upon clicking it. The editor Intellisense auto completion, suggestions etc kicked in.
If I may comment, I wonder why this element is somewhat conspicuous. It's not obvious for a beginner to know to click on "Plain Text" at the bottom right corner without scouring the interface or try to find a third party tutorial video. Perhaps, I can give that as a feedback to the developers.
I just solved my own problem...and it's probably a beginner's mistake.
I discovered at the bottom right corner of the editor, this a menu tray. One of these items showed "Plain Text". On clicking it, it showed a list of programming languages. Naturally HTML was one of them and I upon clicking it. The editor Intellisense auto completion, suggestions etc kicked in.

How to hook into the Visual Studio IntelliSense completion keys to change when it triggers

Visual Studio 2015 does not have a way to only select IntelliSense when I press Enter or Tab anymore in C# for 2015. It's available for JavaScript but not C#.
I'm trying to create a MEF project and hook into the IntelliSense to change this behaviour for C# files. Just to get started, I tried to implement this sample plugin from Microsoft:
https://msdn.microsoft.com/en-us/library/ee372314.aspx
The sample compiles, but it does not work. Nothing in the code is triggered from the debugged IDE. The samples tells to start a new text file and press "a" to get demo IntelliSense, but it never trigger.
Here's the code project if anyone want to look into it:
http://ontime.zdata.no/donwload/ProperIntellisense.zip
Could someone guide me in the right direction here, the documentation in this area is very fluid.
There isn't a supported way to use the APIs to customize this. The behavior you're looking to change falls under the Roslyn project on GitHub so you're more than welcome to file a bug there as feedback. You're also welcome to send a pull request, but at this point it's really tricky to make a change to the editor components of Roslyn and apply those to your locally installed Visual Studio. It's something we're working on fixing but it's not done yet.
The workaround is to press Ctrl+Alt+Space when inside the editor. That will toggle into the correct IntelliSense behaviour. Not a very easy thing to find, but it saved my day. They should probably give better information about this toggle feature, and make it more visible.. Still, it will not be remembered after closing the IDE, so you have to do it every time you start the IDE.

Is there a code editor that will allow copying of syntax highlighting to an Office Document for Windows?

Is there a code editor that will allow copying of syntax highlighting to an Office Document for Windows?
I want to be able to copy code into a Word doc or EMail and preserve the Formatting when explaing code changes.
I will need support for multiple languages including C, C++, TCL, Javascript, Basic, and couple others.
The ability to include the line numbers for reference purposes would be a nice additional feature. I had one customer that required all code to be submitted with line numbers in a Word or PDF document.
I used Notepad++ in the past. It has a plug-in called NppExport and I think it has everything you need. The catch is that you have to write/open your source files with Notepad++, then export them to rtf, open the rtf and copy the pretty-formatted text to your doc file.
Here is the link to Notepad++ and to a good article to get you started with NppExport plugin.
Visual Studio (2010 Professional) "works fine" for copying code and formatting/coloring to MS Word (2010) and Outlook (2010)*. It supports at least C/C++/C#, and JavaScript code. It might support TCL/BASIC (it does support VB/VB.NET), but I do not use those languages. And, of course, VS is a full-blown IDE.
Visual Studio 2010 Express is free (as in beer). But as my company pays for my copy, I can only hope the copy'n'paste support works in Express as well ;-) In any case, it might be worth a try.
I am not sure if line-numbers can be exported via copy'n'paste, but I sort of doubt it. It's not a use-case I've run into.
Personally, I'd recommend doing the review via a SCM/code-review process and not manually, which just sounds like a nightmare. There are additional advantages of using tooling designed for this purpose including history management and talking about what really is, or could be (in relation to what was), and not a copy of what might have been.
Happy coding.
*After pasting into Microsoft Word, disable the "Add space after every paragraph" option to remove what appears to be blank lines from the pasted code.
Eclipse will do fine if you install the language support for all the wanted languages.

Which tools exists for byte-level inspection of files?

I have a partially corrupted MS-Word file which I'd like to inspect in the byte-level.
HexEdit is pretty nice (allows you to edit files too)
What you need is a hex editor. Some text editors can run in this mode. I always used PSPadfor this
As always there's emacs, hexl-mode allows you to view and edit hex-files.
I like the freeware hex editor xvi32 for this kind of task.
I'm sure there are many, but Ultraedit does this.
If you have Visual Studio installed, you can add the .dat extension to the file and open it in Visual Studio to get a hex/ASCII display.
010 Editor is nice for looking at files that follow some template, it'll try to turn the raw data into meaningful labeled values for you.
Take a gander at BeyondCompare for file comparisons; version 3 has comparisons for Word files as well. You'd be surprised at how often you'll use it once you have it.