Skip to content

Commit 2dcfe47

Browse files
log out when VIM is enabled
1 parent 273bb99 commit 2dcfe47

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
export const EXTENSIONS_LOCATION = process.env.VSCODE
22
? '/vscode/extensions-bundle'
33
: '/public/vscode-extensions/v10';
4+
5+
export const VIM_EXTENSION_ID = 'vscodevim.vim';

packages/app/src/app/overmind/effects/vscode/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import sandboxFsSync from './sandboxFsSync';
3030
import { getSelection } from './utils';
3131
import loadScript from './vscode-script-loader';
3232
import { Workbench } from './Workbench';
33+
import { VIM_EXTENSION_ID } from './constants';
3334

3435
export type VsCodeOptions = {
3536
getCurrentSandbox: () => Sandbox;
@@ -173,8 +174,9 @@ export class VSCodeEffect {
173174
}
174175

175176
public setVimExtensionEnabled(enabled: boolean) {
177+
console.log('SET VIM MODE!!', enabled);
176178
if (enabled) {
177-
this.enableExtension('vscodevim.vim');
179+
this.enableExtension(VIM_EXTENSION_ID);
178180
} else {
179181
// Auto disable vim extension
180182
if (
@@ -188,7 +190,7 @@ export class VSCodeEffect {
188190
);
189191
}
190192

191-
this.disableExtension('vscodevim.vim');
193+
this.disableExtension(VIM_EXTENSION_ID);
192194
}
193195
}
194196

@@ -397,7 +399,8 @@ export class VSCodeEffect {
397399
initializeSettings();
398400

399401
if (localStorage.getItem('settings.vimmode') === 'true') {
400-
this.enableExtension('vscodevim.vim');
402+
console.log('SET VIM MODE IN INITIALIZE!!');
403+
this.enableExtension(VIM_EXTENSION_ID);
401404
}
402405

403406
this.workbench.addWorkbenchActions();

0 commit comments

Comments
 (0)