News for hackers. Stuff that matters.
Re:Vim 8.0 is coming by grayrest on Wednesday April 13, 2016 @01:43PM (#11490395)
> deleting word while curser is in the middle of that word

:help text-objects

Text Objects are really the best thing about vim after the command grammar itself.

> insert parantesis around the word im on

Install surround.vim and add the following to your .vimrc (I think s duplicates c too closely for the prime keyboard position. Therefore, s is for surround):

    nmap s      ysi
    nmap S      ysa
    nmap s$     ys$
    nmap sv     gvs
You can then surround whatever text object you want. Surround the current word with `sw(`, surround the current braces with `s{(`, etc. The `sv` prefix lets you surround the thing you just surrounded: `sw"sv(` turns `wo|rd` -> `("wo|rd")`.

There are no comments on this comment yet.