
Note that % disappeared, global is abbreviated as g and delete as d.Īs you might imagine the result is: var myList = null Which can also be abbreviated as :g/echo/d So you'll simply have to use the following function: :%global/echo/delete You want to delete these lines so you'll have to use the command :delete You know that the lines you want delete all matches the pattern echo The command with % (or with nothing since % is the default range). You can apply your global command on the whole file so you'll have to prepend Now let's say that you're sure this code works and you want to delete these Take the following pseudo code which isn't pretty interesting and have a lot of


Matching a pattern, once again that's a good way to apply the same change onĭifferent place without needing multiple cursors. The global command is a tool which allows to apply an ex mode command on lines In Sublime Text I would normally put the first cursor, then go to the next position with the arrows keys and put the second one.įollowing a comment, my interest in doing so appeared when trying to write Sed do eiusmod tempor incididunt ut labore et dolore magna For example ( are the cursor positions): Lorem ipsum dolor sit amet, consectetur adipiscing elit, I would like to put cursors exactly where I want.
