diff options
| author | Teddy Wing | 2014-11-10 22:00:07 -0500 |
|---|---|---|
| committer | Teddy Wing | 2014-11-10 22:00:07 -0500 |
| commit | 6423dbd2dcef8607e0c0ec15f0650d86daea38d5 (patch) | |
| tree | ebc52145f0468df555591eae7d0536cde752e4a0 | |
| parent | 4466a22b924a919f732c9a45f0cca94b51b416ff (diff) | |
| download | auditory.vim-6423dbd2dcef8607e0c0ec15f0650d86daea38d5.tar.bz2 | |
autoload/auditory.vim: Add `dd` support
Add support for deleting a line using `dd`. Previously this didn't work
because I created a custom operator for the `d` command.
| -rw-r--r-- | autoload/auditory.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/auditory.vim b/autoload/auditory.vim index cec02df..7609b7e 100644 --- a/autoload/auditory.vim +++ b/autoload/auditory.vim @@ -161,6 +161,7 @@ endfunction " Operators " ========= nnoremap <silent> d :set opfunc=<SID>Delete<CR>g@ +nnoremap <silent> dd :set opfunc=<SID>DeleteLine<CR>g@$ vnoremap <silent> d :<C-U>call <SID>Delete(visualmode(), 1)<CR> function! s:Delete(type, ...) @@ -184,6 +185,10 @@ function! s:Delete(type, ...) let @@ = reg_save endfunction +function! s:DeleteLine(type) + call <SID>Delete('line') +endfunction + " Normal mode " =========== |
