Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get rid of the alt-menu shortcuts
- atom.menu.template.forEach(function(t) {
- t.label = t.label.replace('&', '');
- });
- atom.menu.update();
- atom.commands.add('atom-text-editor', 'user:append-semicolon', function(e) {
- var editor = atom.workspace.getActiveTextEditor();
- var pos = editor.getCursorBufferPosition();
- editor.moveToEndOfLine();
- editor.insertText(';');
- editor.setCursorBufferPosition(pos);
- });
- atom.commands.add('atom-text-editor', 'user:append-comma', function(e) {
- var editor = atom.workspace.getActiveTextEditor();
- var pos = editor.getCursorBufferPosition();
- editor.moveToEndOfLine();
- editor.insertText(',');
- editor.setCursorBufferPosition(pos);
- });
- atom.commands.add('atom-text-editor', 'user:auto-brace', function(e) {
- var editor = atom.workspace.getActiveTextEditor();
- editor.moveToEndOfLine();
- editor.insertText(' {');
- editor.insertNewlineBelow();
- editor.insertText('}');
- editor.insertNewlineAbove();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement