Edit code files using SkyDrive

If you have been following our earlier posts, you may already be aware that SkyDrive.com now lets you edit many kinds of text files in the browser. SkyDrive.com already offers Office Web Apps, where one can view, edit & collaborate Office docs in the browser – so one can already edit text files in the Word web app. But sometimes you may feel the need for a simpler tool to edit things like To-Do lists, scraps of notes etc. For such things and much more SkyDrive.com web app now natively support viewing and editing different kinds of text files.

This was one of the common user requests that has been fulfilled by Microsoft. The best thing is, apart from plain text files, it also supports many kinds of code files, and that too with a bunch of cool features like Line numbers, syntax highlighting and more. Using these features, developers can store, share, edit their code snippets, source codes using this SkyDrive.com HTML 5 based text editor, to the web. Let us check some more details.

Open Notepad and type something and upload to SkyDrive. Now open SkyDrive.com. It’ll display your plain text file.

SkyDrivetxt01

Edit code files using SkyDrive

The real use can be seen when we see a code file. As mentioned earlier, SkyDrive now has native support for viewing and editing various kinds of code files. It includes JavaScript, CSS, HTML, C#, PHP, Ruby, PowerShell scripts, Python , .sql files and many other code files. Code files inbrowser will have features like tab completion, syntax highlighting, completion suggestions, IntelliSense, Find & Replace, ‘diff’ to track changes. Upload a code file to check these features. Here’s a sample CSS file as seen in SkyDrive .com browser

SkyDrivetxt02

 

You can see Syntax highlighting with Line numbers. You can share the file and edit it. As you edit and start typing, it provides auto-complete suggestions. Press Ctrl-Space, like you do in Visual Studio, to get the list of autocomplete option or press Tab if you have multiple matches.

SkyDrivetxt03

For Find & Replace, press Ctrl+F, and you’ll get the Find & Replace window at the top right part of your screen. Or if you select the Match option, you can see all the matches in the document. On the scrollbar all matches are indicated for its position.

SkyDrivetxt04

Click on the arrow beside Find box to Open the Replace box. You also have options in Find – Match Case, Match Whole Word and even ‘Use Regular Expression’ option too, click on the asterisk symbol for that.

SkyDrivetxt05

You have the option of Replace All too. You can also hover on say hexcode for color – it shows the color for it.

SkyDrivetxt06

You can share this code file with others by clicking on the Sharing option, and you can also provide the Edit option, so that they can also make changes and save it.

SkyDrivetxt07a

So when someone opens the file, makes changes to the file you have opened and saves them to SkyDrive, SkyDrive will help prevent conflicting changes. SkyDrive will inform you about the changes and provide the option to compare changes when you try to Save your file.

SkyDrivetxt07

When you click on Compare Changes, you’ll get a side-by-side view of the document in the browser and the version saved to the SkyDrive. You can choose to merge the changes by copying the changes you want to have, with everyone’s changes or you can discard the changes.

SkyDrivetxt08So as you can see, there are so many cool features for editing the code files in the SkyDrive. You have to upload files – you cannot yet create them in the browser. So one can expect that may users will give requests to Microsoft to introduce this feature to create new text files using SkyDrive.

It has been noticed that some languages like CSS have more IntelliSense built in as compared to other languages like .sql . The later don’t yet have syntax highlighting or completion suggestions. So we hope to see improvements soon.

Also remember thatSkyDrive is not an IDE, and is not a replacement for Visual Studio, but it can be useful for code snippets, academic projects, personal projects, etc and for sharing on the web.

Go to Skydrive.com & upload your code file or your notepad text file and give it a try.

Posted by on , in Category General with Tags
The author has been a Microsoft MVP awardee in various Windows categories (2006-2016) and currently a Windows Insider MVP. A Technology Enthusiast, interested in anything technical and is committed to Microsoft technologies and products. He is actively associated with various Microsoft online communities, forums, Newsgroups and has been actively involved in Beta testing various Microsoft products and bug submissions.