Skip to content
Browse files

Handle pasting inside of { } blocks

  • Loading branch information...
1 parent 6c0f57f commit 85016a6c78980315028ac0d9edeae2d672202b47 @AndrewRadev committed Oct 30, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 plugin/whitespaste.vim
View
6 plugin/whitespaste.vim
@@ -9,11 +9,13 @@ set cpo&vim
if !exists('g:whitespaste_linewise_definitions')
let g:whitespaste_linewise_definitions = {
\ 'top': [
- \ { 'target_line': 0, 'blank_lines': 0 },
+ \ { 'target_line': 0, 'blank_lines': 0 },
+ \ { 'target_text': '{\s*$', 'blank_lines': 0 },
\ { 'compress_blank_lines': 1 },
\ ],
\ 'bottom': [
- \ { 'target_line': -1, 'blank_lines': 0 },
+ \ { 'target_line': -1, 'blank_lines': 0 },
+ \ { 'target_text': '^\s*}\s*$', 'blank_lines': 0 },
\ { 'compress_blank_lines': 1 },
\ ]
\ }

0 comments on commit 85016a6

Please sign in to comment.
Something went wrong with that request. Please try again.