Ask HN: Anything fancy in your .vimrc?

https://news.ycombinator.com/item?id=5202775
by gaving • 13 years ago
2 3 13 years ago

Anything particularly esoteric in your vimrc?

Couple I find invaluable:-

  " Yank block visual selection to space separated line
  vnoremap <Leader>y "+y:let @+ = join(map(split(@+, '\n'), 'substitute(v:val, "^\\s\\+", "", "")'), " ")<CR>

  " Yank block visual selection to comma separated line
  vnoremap <Leader>Y "+y:let @+ = join(map(split(@+, '\n'), 'substitute(v:val, "^\\s\\+\\\|\\s\\+$", "", "g")'), ",")<CR>

Related Stories

Loading related stories...

Source preview

news.ycombinator.com