Skip to content

How can I select until the end of line and kill the meow way? #617

Answered by underside
arthsmn asked this question in Q&A
Discussion options

You must be logged in to vote

Well, I see a couple of options here.

I Option (press 's')

  1. Put cursor to the place after which you want to delete line
    (dfndsoigfhs gerg) ; ;djhsdgfhghsidug
  2. Press 's' - it will remove to the end of the line
  3. Repeat on each line

II Option (using Emacs 'query-replace-regexp')

  1. Select text block with 'x' or any expand command
  2. Ctrl-Alt-5 (or M-x query-replase-regexp)
  3. Use regexp, for your case ";.*"
  4. Enter
  5. confirm line change with 'y' (for each case) or '!' (replace in all places)

II option is much more usefull and flexible.

P.S. Also you can try to use multiline editing in some cases, but in your particular case it's not convinient.
To use multi line editing: Select text block -> 'G' -> edit…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@arthsmn
Comment options

Answer selected by arthsmn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants