diff options
-rw-r--r-- | vim/doc/copy_linebreak.txt | 6 | ||||
-rw-r--r-- | vim/plugin/copy_linebreak.vim | 15 |
2 files changed, 20 insertions, 1 deletions
diff --git a/vim/doc/copy_linebreak.txt b/vim/doc/copy_linebreak.txt index 285d92ea..15e4b1b0 100644 --- a/vim/doc/copy_linebreak.txt +++ b/vim/doc/copy_linebreak.txt @@ -14,6 +14,12 @@ Mappings: <Plug>CopyLinebreakDisable <Plug>CopyLinebreakToggle +Commands: + + :CopyLinebreakEnable + :CopyLinebreakDisable + :CopyLinebreakToggle + This plugin lives in Tom Ryder's "dotfiles" suite, and will eventually be spun off into a separate distribution as it solidifies and this documentation improves. diff --git a/vim/plugin/copy_linebreak.vim b/vim/plugin/copy_linebreak.vim index cc0cc741..2b5f7243 100644 --- a/vim/plugin/copy_linebreak.vim +++ b/vim/plugin/copy_linebreak.vim @@ -1,6 +1,7 @@ " " copy_linebreak.vim: Bind user-defined key sequences to toggle a group of -" options that make text wrapped with 'wrap' copy-paste friendly. +" options that make text wrapped with 'wrap' copy-paste friendly. Also creates +" user commands if it can. " " Author: Tom Ryder <tom@sanctum.geek.nz> " License: Same as Vim itself @@ -50,4 +51,16 @@ noremap <silent> <unique> noremap <silent> <unique> \ <Plug>CopyLinebreakToggle \ :<C-U>call <SID>CopyLinebreakToggle()<CR> + +" Provide user commands if we can +if has('user_commands') + command -nargs=0 + \ CopyLinebreakEnable + \ call <SID>CopyLinebreakEnable + command -nargs=0 + \ CopyLinebreakDisable + \ call <SID>CopyLinebreakDisable + command -nargs=0 + \ CopyLinebreakToggle + \ call <SID>CopyLinebreakToggle endif |