symphony
symphony

Reputation: 27

Is there any quick way that I can select method code block in vim

For example, that's a really common situation that I want to select all method code block for search,is there anyway to do that ?

    search(key){
    this._dataSet=this._userOriginSet.filter(r=>r.map.NickName || 
    r.map.Name)
              .filter(r=>{
                if(r.map.NickName){
                  return r.map.NickName.indexOf(key.trim())>-1
                }
                if(r.map.Name){
                  return r.map.Name.indexOf(key.trim())>-1
                }
              });
     }

Upvotes: 1

Views: 99

Answers (1)

sudavid4
sudavid4

Reputation: 1131

with your cursor inside the method type Va{. now depending on where your cursor was positioned you won't get the full code block. Type a{ another few times to expend the selection till you get what you need.

Upvotes: 4

Related Questions