aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2013-09-10 00:37:28 +0200
committerMatěj Cepl <mcepl@cepl.eu>2015-02-06 13:16:39 +0100
commit1ffef6a96dd2a7519ad25051d8db10c2e01f3851 (patch)
tree066b35ab602da3d4d463d4cd5a284eb53f5025e4
parent4c595eec4698bc8cdcfdd344c3c5eeca6bf67bdc (diff)
downloadvim-diff_navigator-1ffef6a96dd2a7519ad25051d8db10c2e01f3851.tar.gz
Don't redefine major vim commands.
Instead of redefining D and S, use <leader>-prepended mappings instead. Also fix header of the file.
-rw-r--r--ftplugin/diff_navigator.vim17
1 files changed, 10 insertions, 7 deletions
diff --git a/ftplugin/diff_navigator.vim b/ftplugin/diff_navigator.vim
index d8f5df8..efce948 100644
--- a/ftplugin/diff_navigator.vim
+++ b/ftplugin/diff_navigator.vim
@@ -1,9 +1,10 @@
" ============================================================================
" File: diff_navigator.vim
" Description: Filetype plugin to ease navigation in (unified) diffs
-" Maintainer: Petr Uzel <petr.uzel -at- centrum.cz>
-" Version: 0.1
-" Last Change: 27 Aug, 2008
+" Maintainer: Petr Uzel <petr.uzel -at- centrum.cz>,
+" Matěj Cepl <mcepl -at- cepl dot eu>
+" Version: 0.2
+" Last Change: 10 Sep, 2013
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
@@ -15,9 +16,11 @@
"
"
" TODO: show current hunk in status line
-" TODO: delete hunk/whole file diff - like http://www.vim.org/scripts/script.php?script_id=444)
+" TODO: delete whole file diff -
+" like http://www.vim.org/scripts/script.php?script_id=444)
" TODO: incorporate more patchutils functionality
-" TODO: something like taglist for diff (shows all files/hunks in the diff)
+" TODO: something like taglist for diff (shows all files/hunks in
+" the diff)
" TODO: option for *Next|Prev* funtions to wrap around end of file
" ============================================================================
@@ -303,5 +306,5 @@ nnoremap <silent> <script> { :call <SID>DiffPrevFile()<CR>
nnoremap <silent> <script> ) :call <SID>DiffNextHunk()<CR>
nnoremap <silent> <script> ( :call <SID>DiffPrevHunk()<CR>
nnoremap <silent> <script> ! :call <SID>DiffShowHunk()<CR>
-nnoremap <silent> <script> S :call <SID>DiffSplitHunk()<CR>
-nnoremap <silent> <script> D :call <SID>DiffDeleteHunk()<CR>
+nnoremap <silent> <script> <leader>s :call <SID>DiffSplitHunk()<CR>
+nnoremap <silent> <script> <leader>d :call <SID>DiffDeleteHunk()<CR>