Browse files


  • Loading branch information...
AndrewRadev committed Jan 20, 2014
1 parent 95a8155 commit f94e64914c0cbda345d98a27f9b79dcd3a2f7d2c
Showing with 6 additions and 0 deletions.
  1. +6 −0
@@ -4,6 +4,8 @@
This plugin remaps the standard `p` and `P` mappings to enhance their functionality. When pasting, it compresses all blank lines that result from the paste to a single one (or none, at the top and bottom of the file). That way, even if you copy any leftover whitespace, it'll be neatly trimmed to just one line. This takes effect only for linewise pasting, since it's not entirely clear what the behaviour should be for characterwise and blockwise pasting.
+### Mappings
If you don't want to clobber your default `p` and `P` mappings, you can make whitespaste use different ones by setting two predefined variables:
``` vim
@@ -24,6 +26,8 @@ xmap ,P <Plug>WhitespasteVisual
xmap ,p <Plug>WhitespasteVisual
+### Special cases
The plugin also takes care of special cases like pasting functions/methods, if-clauses and so on. Currently, these special cases work only with ruby and vimscript, but see below in "Extending" to find out how you can extend the plugin for a different language or change it to fit your own coding style. If you're wondering how this could be useful, consider a ruby example:
``` ruby
@@ -60,6 +64,8 @@ class Test
+### Compatibility
Whitespaste can play well with other plugins like [vim-pasta]( The underlying paste command that is being executed is available as a global variable and can be changed. For example, here's how you could combine whitespaste with vim-pasta:
``` vim

0 comments on commit f94e649

Please sign in to comment.