I recently have started playing around with ionic and ran their ionic start command after generating a new project.
I noticed that when opening any of the TypeScript files ionic generated in vim, the contents of the file is: <?xml version="1.0"?>.
However, if I open the file in sublime text or cat the the file I get the actual contents as I should.
src/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { ListPage } from '../pages/list/list';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
@NgModule({
declarations: [
MyApp,
HomePage,
ListPage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
ListPage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}
I did install typescript-vim, however that doesn't seem to have helped. Vim seems to think it's an xml file, however in my vim footer it is indicating typescript.
Any thoughts on how I can actually open and edit TypeScript files in vim?