Saturday, October 22, 2016

Some of the important shortcuts for Visual Studio Code

Visual studio code is a Great editor for the web development. I have started using it and I’m loving it more and more. For any editor shortcut keys are important you can do lots more without moving to mouse with a shortcut. In this blog post, we are going to learn about shortcuts for Visual Studio Code.

Ctrl + P:  Goto File, You can move to any file of open solution/folder in Visual Studio code.
Ctrl + Shift + O : Goto Symbol, You can move to any function, variable or symbol of the current file.
F12 : Goto Definition – You can move to the definition of symbol or function with this command
Ctrl + G : Goto line, You can move to particular line number
Alt + Left: Navigate  between files goes to the left side of files
Alt+ Right: Navigate between files goes to the right side of files
Alt + F12: Peek definition, You can see preview of code for a function
Ctrl + Shift + D: Debug folder or file.
Ctrl + Shift + F: Search in all files.
Ctrl + Shift + H: Replace in all the files
Ctrl + T: Go to symbol in all files
Ctrl + B : Toggle Slider Bar
Ctrl + 1: Focus Left Editor
Ctrl+ 2: Focus Right Editor
F2: Rename symbol and function
Ctrl + Shift + X : Goto Extension Window
Ctrl + J: Toggle Panels
Ctrl + ` : Open terminal in VSCode
Ctrl + Shift + U: Show output Window
Ctrl + Shift + M : Show problems, Where you can see all the problems related to code and warnings.

You can find all the shortcuts of Visual Studio code from the following link.
https://code.visualstudio.com/docs/customization/keybindings

That’s it. Hope you like it. Stay tuned for more!!
Share:

Opening ASP.NET Core Visual studio solution in Visual Studio code

In this blog post, We are going to see how we can open an ASP.NET Core solution in visual studio code.  So what we are waiting for. First, we are going to create an ASP.NET Core web application like below.

ASPNETCoreApplication

Then select web application like below.

ASPNETCoreWebApplication

Now once you created Ok it will create an ASP.NET Core Web Application like below.

SolutionExplorer

Now let’s run that application to make sure that its work fine.

edgeASPNETCoreApplication

Open ASP.NET Core Solution in Visual Studio Code:

For those who don’t know What is Visual Studio code is here is the definition from the Wikipedia.

Visual Studio Code is a source code editor developed by Microsoft for Windows, Linux and macOS. It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring
It is a cross-platform open source editor for writing code from Microsoft. You can find more information about that from the following links.

https://en.wikipedia.org/wiki/Visual_Studio_Code
https://code.visualstudio.com/

Now we are going to see how we can open the same application with Visual Studio code. But before doing that we need to make sure that the computer have .NET Core installed on your machine and Also make sure that Visual Studio Code C# support is there in Visual Studio code. You can find more about that from the following link.

https://code.visualstudio.com/Docs/languages/csharp
https://code.visualstudio.com/docs/runtimes/dotnet

Since Visual Studio Code is not a full fledge IDE(Integrated Development Environment) like Visual Studio. We need to open the folder which contains the solution and source code. You can do that from Visual Studio Code.

OpenFolderInVisualStudioCode

Then select the src folder of your application like below.

SRCFolderApplicationinVisualStudioCode

Once you click on “Select Folder” it will open source code like below.

SourceCodeInVisualStudioCode


Now when you open any CSharp file on the right bottom you will see a text like installing OmniSharp.  OmniSharp is a set of tooling and editor integrations and Libraries that together creates great IntelliSense and  other tooling support for popular editors like Code, Sublime Text, Brackets, Atom,Emacs and Vim etc. You can find more information about that on the following link.

http://www.omnisharp.net/

Once you click on that text you can also see the progress of installation of Omnisharp libraries in output windows like below.

OmniSharpOutputWindowVisualStudioCode

Once it installed it will automatically select the project which you have in solution. If you have multiple projects then you can click on that and it will ask you to select the project for which you need all IntelliSense .

SelectApplicationInVisualStudioCode

That’s it. Now you have most of the experience that you got in Full Visual Studio and full fledge IntelliSense to all the .NET Features.

VisualStudioCodeExperience

Disclaimer: I have tested it on the windows machine and its works perfectly fine. For macOS and Linux I would expect the same. For further information, you can follow a GitHub Issue which is already created by the community. You can find that GitHub issue at the following link.

https://github.com/OmniSharp/omnisharp-vscode/issues/283

That’s it. It’s very easy to use light weight Visual Studio Code for same development experience like Full Fledge Visual Studio.
Share:
Sunday, September 25, 2016

3 millions page views for my blog–DotNetJalps.com

I am not super crazy about milestones. But its a big one so I have to share. My blog just completed 3 Million page views it’s an amazing journey so far. Thank you all readers from bottom of my heart. I host my blog on blogger.com. So here is the statistics from blogger.com.


StatisticsBlogger

Here are top most of blogger post for all time.

blog-post-dotnetjalps

Till 2010, I was not tracking my page views but at this time I am getting more than 60k page views per month.  Special thanks to my dear wife, who scarifies her time when I write the blog.
Once again, Thank you dear visitors and reader of my blog, without you, this would not have been possible!.
Share:

Session about Microsoft Azure at SK Patel Institute of Computer Studies

This post was pending for a month!. Sorry for being late. I had got a chance to give a session about Microsoft Azure at SK Patel Institute of Computer Studies, Gandhinagar with Kalpesh Satasiya. It was a great experience interacting with Student after so much time. Had a great time with them.  Thank you Kalpesh for being co-speaker at the event. There are more than 60 students there in the session.

Here are the topics we have covered:

  1. What is the cloud?
  2. What is Cloud Computing?
  3. Life before Cloud
  4. Virtualization and how virtualization works and lay foundation of any cloud technology.
  5. Data centers and Server container
  6. IAAS, PAAS and SAAS
  7. Different Cloud services provided by Azure.
  8. Overview of Azure portal.

Here are some the pics of the session.

DSC_0002

DSC_0005

DSC_0006

DSC_0021

DSC_0028

DSC_0031

  DSC_0036

DSC_0032

And to my surprise, We got highlighted in Local News Paper Gandhinagar Samachar.



Thank you, my friend, Dr. Nidhi Divecha – The professor and Dr. Sanajy M. Shah – Director of SK Patel Institute of computer studies for being amazing host at college. Thank you, students, for listening and asking questions related to it. Overall it was a great experience!.
Share:
Thursday, July 14, 2016

Angular 2 packages for sublime text 3

Recently, I have written a blog post about Angular 1.5 Packages for the sublime text 3. It was a great hit and lots of people were asking for packages for the Angular 2. So I thought it would be a good idea to write a blog post about it. So let’s get started. We have already learned that how we are going to install packages on the sublime text 3. So Followings are packages that are good for angular 2.

As we all know that Angular2 is built with TypeScript and So first thing we need is a Typescript package.

Typescript:

This plugin is developed by Microsoft it self. You can find more information at their Github Repository.

https://github.com/Microsoft/TypeScript-Sublime-Plugin

There are code editing services provided by this package. You can do lots many things with the package like Rename, Format document i.e where different shortcuts are already defined in the GitHub repository. This package is a must for Angular 2 development.

typescript-package-for-sublime-text

Angular 2 snippets:

This package provides code completion and snippets for the angular 2. It has been imported from John Papa’s code completion for visual studio code.

https://github.com/pjlamb12/st3-ng2-snippets

It provides various snippets and code completion for Angular 2.

angular2-component-sublime-text

Once you type ng2 it will have snippets for various things in Angular 2.

angular-2-snippets-demo-for-sublime-text

That’s it. Hope you like it. Stay tuned for more!.
Share:
Thursday, July 7, 2016

BugConf- Building secure software by Kaushal Bhavsar–Director of Pratikar Technologies

Nowadays, Security is a major concern as hackers are so smart that they can break anything.  So this Saturday we have one of the great conferences by Kaushal Bhavsar, Director of Pratikar Technologies. He is going to cover lots interesting topics mentioned below and it is the conference should not be missed. I have heard Kaushal many time and many times we have been co-speaker for the events. When Kaushal speaks about security he is just awesome. Please do register and go there I’m sure it will worth investing your time. Following are the topic sKaushal is going to cover in his conference.

  • Why security for developers?
  • Common threats for software.
  • Integrating security in SDLC.
  • Interactive Panel Discussion.
  • Networking and high tea.



So, I request all my reader who is based at Ahmedabad to register for this event and attend this Conference. Here are the details for venue and time. Just register for the conference via clicking on Add to Calendar list.

When:

Saturday, July 9, 2016, from 4:30 PM to 6:30 PM (IST) – Add to Calendar

Where:

Gujarat Law Society Auditorium - GLS Campus Opp. Law Garden, Ahmedabad, Gujarat 380006 – View Map

You can find more information about Kaushal Bhavsar at his blog: http://kaushalbhavsar.com/

and Here is more information Pratikar Technologies : http://pratikar.com/

That’s it. Stay tuned for more!!.
Share:
Wednesday, July 6, 2016

Angular 1.5 packages for Sublime Text 3

One of my friends was using Sublime text 3 as  editor for the Angular.js application but he was using it without packages so he has to do manually all the things. I suggested him few packages and now he is much more productive than ever. So in the blog post, I’m going to share few tips and packages working with Sublime text.

Installing package on Sublime Text 3:

Sublime Text 3 support packages that make Sublime Text 3 a great choice for any kind of Web Development project. This makes developer’s life easy and developers will be much more productive than ever. Sublime Test does not come with inbuilt package manager but there is a third party package manager called “Package Control”. You can find more information about that on the following location.

 https://packagecontrol.io/

There is instruction provided for installation at the following link.

https://packagecontrol.io/installation

Angular.js 1.5 packages for Sublime text:

JS Hint:
If you have ever work with JavaScript you should be knowing about linter for JavaScript. JS Hint is a JavaScript linter which will look your code and verify that it has proper styling, proper syntax, and error related to JavaScript best practices.

To make sure that this plugin works correctly. You need to install JS Hint installed globally via npm:
npm install -g jshint
Then type Ctrl+ Shift + P and select install package.

package-control-sub-lime-text3

Once you click on Install it will load the extension from the repository and you can install the extension you choose.

image

AngularJS:
This package is developed by Angular UI Team. It contains lots of functionality like
  • Code completion for Inbuilt angular libraries.
  • Angular-Related Snippets.
  • Directive completion of Custom Defined Directives
To Take advantage of this plugin’s syntax highlighting You need to change the view type of your HTML page file View-> Syntax-> HTML(Angular.js).

angular-html-package

And then you can code completion like following.


code-completion-angular-js

JSFormat:
This package helps you format your Javascript and JSON. It is based on JS Beautifier. It highly configurable and you can also define your preferences. There are plenty of options available you can see that on the following link.

https://github.com/beautify-web/js-beautify#options

John Papa’s Angular Snippets for Sublime Text:
John Papa has created great snippets for Angular.js and it’s very useful. He has written a nice blog post about how to install it with Sublime Text. You can refer that from the following link and refer that.

https://johnpapa.net/angularjs-snippets-for-sublime-visual-studio-and-webstorm/

After installing that you can create lots of angular boilerplate code very easily. For example, If you want to create an angular controller just type ngcontroller.

ng-controller-sub-lime-text

Once press tab it will create an angular controller like below. It will also follow best practices written in John Papa’s style guide also.

controller-created-sublime-text

That’s it. Now you should be much more productive with angular and sublime text editor. Hope you like it. Stay tuned for more!!.
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews