Selecting entire function definition in Vim

前端 未结 11 678
醉话见心
醉话见心 2020-12-07 14:14

I\'ve been trying Vim for any text editing work for almost a week now. I want to know the fastest way to select a C function definition.

For example, if I have a fun

11条回答
  •  时光取名叫无心
    2020-12-07 14:24

    Use this simple way

       1.Go to the function definition 
       2.dd  - delete function definition 
       3.d    -start delete operation 
       4.shift+5(%) - delete the lines between { to }
    

提交回复
热议问题