• Stars
    star
    236
  • Rank 164,818 (Top 4 %)
  • Language
    Python
  • License
    Other
  • Created almost 10 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sublime extension for ASP.NET vNext

Sublime Kulture

A Sublime Text 3 extension for ASP.NET vNext

In this readme you will learn how to install the components to get started with ASP.NET in Sublime Text 3. There is also a getting started tutorial to show you some of the features included with this release.

Video

Installation: Mac OS X

  1. Install ASP.NET vNext Command Line Tools

  2. Download Sublime Text 3

  3. Install Sublime Kulture Using the Package Control Plugin

  • Follow these instructions to install package control
  • Bring up the Command Palette (Cmd + Shift + P on OS X, Ctrl + Shift + P on Windows).
  • Select Package Control: Install Package
  • Select Kulture when the list appears.
  • Package Control will automatically keep Kulture up to date with the latest version.

Manual Install

  • Install Sublime Kulture by cloning this repo into /Users/{user}/Library/Application\ Support/Sublime\ Text\ 3/Packages
    git clone https://github.com/ligershark/Kulture.git

Installation: Windows

  1. Install ASP.NET vNext Command Line Tools
  • Perpare Powershell execution policy. In an Admin PowerShell window execute the following command.
Set-ExecutionPolicy RemoteSigned
  • From an admin command prompt window run the following command
powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"
  • Close the command prompt window and open a new command prompt window and run the following commands
kvm upgrade
  • If Sublime was already installed and running while installing ASP.NET vNext Command Line Tools, you will need to restart Sublime for the changes to work.
  1. Download and Install Sublime Text 3

  2. Install Sublime Kulture

Using the Package Control Plugin

  • Follow these instructions to install package control
  • Bring up the Command Palette (Cmd + Shift + P on OS X, Ctrl + Shift + P on Windows).
  • Select Package Control: Install Package
  • Select Kulture when the list appears.
  • Package Control will automatically keep Schema Validator up to date with the latest version.

Manual Install

  • Install Sublime vNext by cloning this repo into C:\Users\{user}\AppData\Roaming\Sublime Text 3\Packages
    git clone https://github.com/ligershark/Kulture.git

Note: The Sublime Text 3 directory may not exist if you have never launched Sublime before. If you are unable to locate this directory try launching Sublime and try again

#Getting Started

This tutorial will show you how you can get started with ASP.NET vNext in Sublime Text 3. After completing this tutorial you will be familiar with how to use Sublime Kulture and its primary features.

The first thing we will do is grab the samples. Using your favorite git client clone the repo at ASP.NET vNext Home

git clone https://github.com/shirhatti/Home.git

If you prefering using yo instead you can download our yeoman generator

Note: This requires you to have node.js and npm already installed

npm install -g yo
npm install -g generator-aspnet

To run the yeoman scaffolder, type

yo aspnet

Let's go ahead and open the included HelloMvc sample in Sublime. In Sublime, click on File -> Open Folder and navigate to the Home\Samples\HelloMvc to open it up.

Note: In Sublime for Mac use the File -> Open command

Since we just grabbed this from source control there are NuGet packages which this project requires that are missing. To restore the NuGet packages

  • Press Ctrl(Cmd) + Shift + P to bring up the command palette
  • Type Run K Commands and hit Enter (Return)
  • Type kpm restore and hit Enter (Return)

Note: when executing kpm restore if you get an error about missing NuGet packages you can execute the alternate command kpm restore -s https://www.myget.org/F/aspnetvnext/api/v2

You should see a Terminal/Powershell window launch and execute your commands.

Now, let's go ahead and tell Sublime to use ASP.NET as the build system. To do this, click Tools -> Build System -> ASP.NET

  • Press Ctrl(Cmd) + B or F7 to build projects

You should be able to see the output of your build in the output window towards the bottom of your screen. At this point your code should have built successfully.

Now let's see what the experience looks like if there is an error in your .cs file. Introduce an error in the Startup.cs file and try building again. You should now see errors in the output window. You can navigate through the errors as follows

  • F4 takes you to the next error
  • Shft + F4 takes you to the previous error

When an error has focus it will be highlighted in the build results and your cursor will be taken to the line and column where the error was reported.

After we resolve all the errors we have introduced, let us try and run the application

  • Press Ctrl(Cmd) + Shift + P to bring up the command palette
  • Type Run K Commands and hit Enter (Return)
  • Type k web and hit Enter (Return)
  • If you are on a Mac, type k kestrel and hit Enter (Return)

You should see a Terminal/Powershell window launch and start running your server. You can navigate to http://localhost:5001 (or http://localhost:5000 on a Mac) in your favorite browser you view the website.

#Intellisense

To be able to get intellisense working within Sublime please install OmnisharpSublime (follow the instructions in the README).

To get intellisense with ASP.Net vNext projects you need to create a project file in Sublime. Go to Project - Save Project As and enter in a name for your project. OmniSharpSublime will use this to know what files and assemblies it needs to provide intellisense for (TIP : Close & Re-Open Sublime if you do not see intellisense, it may take 10 secs for the intellisense server OmniSharpServer to start once Sublime has loaded all the plugins)

Once OmniSharpSublime is installed and you have a project file you should be able to see intellisense:

intellisense

Credits

Sublime Terminal

All of Sublime Terminal is licensed under the MIT license.

  Copyright (c) 2011 Will Bond 

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.

More Repositories

1

WebOptimizer

A bundler and minifier for ASP.NET Core
C#
724
star
2

side-waffle

A collection of Item- and Project Templates for Visual Studio
JavaScript
656
star
3

psbuild

This project aims to make using MSBuild easier from powershell
PowerShell
121
star
4

ChromeExtensionProjectTemplate

Visual Studio template for Chrome extensions
JavaScript
99
star
5

CoreTemplatePack

A collection of .NET Core project templates
JavaScript
82
star
6

VoiceExtension

C#
65
star
7

WebOptimizer.Sass

C#
61
star
8

template-builder

This project will output a NuGet package which can be used to help create Visual Studio Item Templates and Project templates
C#
42
star
9

AzureJobs

C#
38
star
10

sidewafflev2

C#
30
star
11

generator-aspnet

yo generator for ASP.NET vNext
JavaScript
21
star
12

dotnet-new-ui

Helps you install and manage project templates while also helping to create projects from templates.
C#
20
star
13

pecan-waffle

PowerShell
16
star
14

nuget-powershell

Simplifies consuming nuget packages in powershell
PowerShell
16
star
15

WebOptimizer.TypeScript

C#
8
star
16

publish-ignore

C#
8
star
17

webjobsvs

C#
6
star
18

WebOptimizer.Markdown

C#
5
star
19

microsoft-templateengine

Forward only stream mutations including replacements and conditionally included regions. This will process the replacements and conditions in projects in SideWaffle, PecanWaffle and DotNetWaffle.
C#
5
star
20

JavaScriptLocalizer

Localizes strings inside JavaScript files when they run though ASP.NET Optimization
JavaScript
5
star
21

OpenFromPortal

Visual Studio extension for opening web sites directly from Azure Websites
C#
4
star
22

SideWaffleWebsite

The home of SideWaffle - sidewaffle.com
HTML
3
star
23

WebOptimizer.Less

C#
3
star
24

aspnet_vnext_samples

Seed projects for the Yeoman generator for ASP.NET. File any issues at https://github.com/ligershark/generator-aspnet/issues.
C#
2
star
25

WebOptimizer.AutoPrefixer

C#
1
star
26

WebOptimizer.i18n

C#
1
star
27

vsfolders

C#
1
star
28

AzureJobsDemoSite

CSS
1
star
29

WebOptimizer.Analyzers

C#
1
star
30

analyzers

Roslyn analyzers for ASP.NET 5 NuGet packages
1
star