Reputation: 27
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
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