Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3282304
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:54:47+00:00 2026-05-17T19:54:47+00:00

Today I saw a neat copy function in VI, in which you could copy

  • 0

Today I saw a neat copy function in VI, in which you could copy an entire line until a stop character.

e.g. if( copy == this );

With VI he could copy everything inside the parenthesis. I wonder if you can do it with emacs as well? (Without using ctrl+space and manually marking what I want to kill)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:54:48+00:00Added an answer on May 17, 2026 at 7:54 pm

    Try

    M-z CHAR
    

    Which kills the text through the next occurrence of CHAR. Aka M-x zap-to-char. Of interest might be the documentation for Other Kill Commands.

    Edited to add: Upon request, here is zap-to-before-char, which just took the source code for zap-to-char and removed a comment (and updated doc string):

    (defun zap-to-before-char (arg char)
      "Kill up to and ARGth occurrence of CHAR.
    Case is ignored if `case-fold-search' is non-nil in the current buffer.
    Goes backward if ARG is negative; error if CHAR not found."
      (interactive "p\ncZap to char: ")
      ;; Avoid "obsolete" warnings for translation-table-for-input.
      (with-no-warnings
        (if (char-table-p translation-table-for-input)
            (setq char (or (aref translation-table-for-input char) char))))
      (kill-region (point) (progn
                             (search-forward (char-to-string char) nil nil arg)
                             (goto-char (if (> arg 0) (1- (point)) (1+ (point))))
                             (point))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today I saw a JavaScript syntax (when invoking a function) that is unfamiliar to
I'm writing bug tracking software in PHP, and today I saw this in another
Today, I ran into this weird problem with a user using Mac OS X.
Today I was listening to the Hanselminutes show about .NET 3.5 SP1...What's inside ,
Today I stumbled about a Problem which seems to be a bug in the
Today I had a discussion with a colleague about nested functions in Javascript: function
Today I saw a demonstration of the episerver cms and it had a few
Today I saw a job description that requires significant experience coding in C++ and
Today I saw a JUnit test case with a java assertion instead of the
I've been using C++ for a few years, and today I saw some code,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.