Using find and replace: Hit CTRL-H to open the Replace dialogue box enter String .* into Find what leave Replace with empty(/1) Select Regular expression and .matches newline Click on Replace ref:https://superuser.com/questions/233562/how-can-i-delete-rest-of-the-line-after-a-specific-string