Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed vim items in menus and settings

  • Loading branch information...
commit ae010c1514e28d7936b940c6cd9415e529ddda3a 1 parent 8e155fa
@sergi sergi authored
Showing with 14 additions and 4 deletions.
  1. +3 −0  client/ext/vim/settings.xml
  2. +11 −4 client/ext/vim/vim.js
View
3  client/ext/vim/settings.xml
@@ -0,0 +1,3 @@
+<a:application xmlns:a="http://ajax.org/2005/aml">
+ <a:checkbox class="underlined" label="Vim mode" value="[editors/code/@vimmode]" />
+</a:application>
View
15 client/ext/vim/vim.js
@@ -14,6 +14,8 @@ var ide = require("core/ide");
var ext = require("core/ext");
var editors = require("ext/editors/editors");
var handler = require("ext/vim/keyboard").handler;
+var settings = require("text!ext/vim/settings.xml");
+
var cmdModule = require("ext/vim/commands");
var commands = cmdModule.commands;
var cliCmds = require("ext/vim/cli");
@@ -98,12 +100,12 @@ module.exports = ext.register("ext/vim/vim", {
alone : true,
hook : function() {
- var menuItem = ide.mnuEdit.appendChild(new apf.item({
+ var menuItem = new apf.item({
caption: "Vim mode",
type: "check",
checked : "[{require('ext/settings/settings').model}::editors/code/@vimmode]"
- }));
- this.nodes.push(ide.mnuEdit.appendChild(menuItem));
+ });
+ this.nodes.push(mnuView.appendChild(menuItem));
var self = this;
@@ -112,8 +114,13 @@ module.exports = ext.register("ext/vim/vim", {
menuItem.addEventListener("prop.checked", function(e) {
self.toggle(e.value);
});
-
+
+ ide.addEventListener("init.ext/settings/settings", function (e) {
+ barSettings.insertMarkup(settings);
+ });
+
txtConsoleInput.addEventListener("keydown", cliKeyDown);
+
},
toggle: function(show) {

0 comments on commit ae010c1

Please sign in to comment.
Something went wrong with that request. Please try again.