navigation - In Vi, navigate / jump to the brackets around the current block -


supposing have code:

var f = function(a) {   var g = {"b" : "c",            "m" : "n" // cursor here            "d" : "e",            "h" : {              "i" : "j",              "k": "l"              },            "m" : {              "n" : {"o":"p"}              }            } // want here } 

what economic command in vi navigate / jump closing bracket current scope.

bear in mind:

  • we can't use % because we're not on opening brace.
  • we can't use [{ beacause it's not unmatched
  • we use /{ , n, cumbersome , requires more thinking should necessary.

?{ <enter> %
first line of commands go last opened {
% find matching brace


Comments

Popular posts from this blog

python - Mongodb How to add addtional information when aggregating? -

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

java - Incorrect order of records in M-M relationship in hibernate -