Skip to content

Commit

Permalink
now works correctly with the kill-ring
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinlacewell authored and habnabit committed Aug 28, 2012
1 parent fb3b907 commit e96b269
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base-keymap.json
Expand Up @@ -182,7 +182,7 @@
"args": {
"forward": true
},
"command": "delete_word"
"command": "emax_delete_word"
},
{
"keys": ["meta+backspace"],
Expand Down
12 changes: 12 additions & 0 deletions emax_commands.py
Expand Up @@ -272,6 +272,18 @@ def run(self, edit):
)
set_clipboard(kill_ring.kill_ring.top())

class EmaxDeleteWord(EmaxHelper):
"""
Mimic 'delete-word' also known as 'M-d'.
"""

def run(self, edit, **kwargs):
self.deactivate_mark()
self.view.run_command(
"delete_word",
kwargs
)
set_clipboard(kill_ring.kill_ring.top())


class EmaxYank(EmaxHelper):
Expand Down

0 comments on commit e96b269

Please sign in to comment.