code_junkie

How do I insert a linebreak where the cursor is without entering into insert mode in Vim?

Nov 11th, 2011
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. if (some_condition) {[ ]return; }
  2.  
  3. :map g i[Ctrl+V][Enter][Ctrl+V][Esc][Enter]
  4.  
  5. :map g i^M^[
  6.  
  7. f}i^M^[O
  8.  
  9. :s/{/{r/
  10.  
  11. :map g :s/{/{r/ ^M :s/}/r}/ ^M
  12.  
  13. :map <C-m> i<CR><Esc>h
  14.  
  15. :map g ^f{malr<CR>`a%hr<CR>`a
Add Comment
Please, Sign In to add comment