commit
9d4faf8911
9 changed files with 673 additions and 10 deletions
|
|
@ -66,6 +66,8 @@ var bindDropdown = util.bindDropdown;
|
|||
|
||||
var ElasticTabstopsLite = require("ace/ext/elastic_tabstops_lite").ElasticTabstopsLite;
|
||||
|
||||
var IncrementalSearch = require("ace/incremental_search").IncrementalSearch;
|
||||
|
||||
/*********** create editor ***************************/
|
||||
var container = document.getElementById("editor-container");
|
||||
|
||||
|
|
@ -173,7 +175,7 @@ commands.addCommand({
|
|||
exec: function() {alert("Fake Save File");}
|
||||
});
|
||||
|
||||
var keybindings = {
|
||||
var keybindings = {
|
||||
ace: null, // Null = use "default" keymapping
|
||||
vim: require("ace/keyboard/vim").handler,
|
||||
emacs: "ace/keyboard/emacs",
|
||||
|
|
@ -380,7 +382,7 @@ bindDropdown("split", function(value) {
|
|||
sp.setSplits(1);
|
||||
} else {
|
||||
var newEditor = (sp.getSplits() == 1);
|
||||
sp.setOrientation(value == "below" ? sp.BELOW : sp.BESIDE);
|
||||
sp.setOrientation(value == "below" ? sp.BELOW : sp.BESIDE);
|
||||
sp.setSplits(2);
|
||||
|
||||
if (newEditor) {
|
||||
|
|
@ -396,6 +398,14 @@ bindCheckbox("elastic_tabstops", function(checked) {
|
|||
env.editor.setOption("useElasticTabstops", checked);
|
||||
});
|
||||
|
||||
var iSearchCheckbox = bindCheckbox("isearch", function(checked) {
|
||||
env.editor.setOption("useIncrementalSearch", checked);
|
||||
});
|
||||
|
||||
env.editor.addEventListener('incrementalSearchSettingChanged', function(event) {
|
||||
iSearchCheckbox.checked = event.isEnabled;
|
||||
});
|
||||
|
||||
|
||||
function synchroniseScrolling() {
|
||||
var s1 = env.split.$editors[0].session;
|
||||
|
|
@ -451,4 +461,3 @@ var StatusBar = require("./statusbar").StatusBar;
|
|||
new StatusBar(env.editor, cmdLine.container);
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ exports.bindCheckbox = function(id, callback, noInit) {
|
|||
};
|
||||
el.onclick = onCheck;
|
||||
noInit || onCheck();
|
||||
return el;
|
||||
};
|
||||
|
||||
exports.bindDropdown = function(id, callback, noInit) {
|
||||
|
|
@ -235,4 +236,3 @@ function dropdown(values) {
|
|||
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue