From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12349 invoked from network); 8 Nov 2021 23:10:58 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Nov 2021 23:10:58 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1636413058; b=sHrs5sjmImYMN7qnOA18Xs8Wqd8LmIg0XljLajMyYUoPlqmq/ZGa6nakF2PZZbM6sLi0WtvRft +hqH8lZSZIEZ3cci4yZ3262iDx9OHx34ukxkSBJgqAjwrE24dfecrfdRNZWEX4+AAoxTXXQJZC B8ykE6UNb0J71d7phgjEcMnMUigKouEYmCWc7wEknhGj6vVVMhOORxUK57r+MjKlgZi1mkXIOi C32k2X7LcNibJI4sRgHAB+igqX2XRkPe0mIadd23+gk045i1J0TVrFbCfMpCp49RDYIH50MkcU MoDKVo96uiwJGY10uqSgyANYcvA9JX2n0NpAflMjb6NwlQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f170.google.com) smtp.remote-ip=209.85.219.170; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1636413058; bh=sLz56TNfn2VhNixo5HJ+JQ6FOhfpVnssl9n2OCMCpt8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=USsHc6FQ6Mb0trZXbt7nD4/7t3msnAh6f6yT8tGv0DkTfjxXzT/wovPjosLS/oG4/E1OJumIPy lYFgzAAOMChLPNbEZ/2ba8qdpulS585IoZzTFje5Zqeans714Iheyz4fA8F1jD6evxyEEKfsnY Pl4irS8jb1CHixrk+3RoOCBQNfHXz/INIrTB00UtQ/vrDwswCeTMiEjPrW7NWG81ppGREuk72+ JKccBYWD/GOTObdJCOfC3E8vkVDu77qj+O9DXwLVUJpgJxjeSogXemM0h05fK+xfvcYe8c8hXV K4f6PRpvfN3F0iPn3q5v0VTAwtk1+dhI+/nUmrfdDQVX8w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=N2GEAuxwLsND7fP/i6JXSHnApIOUysbcZe+LhY8iII0=; b=Wl7sLGe2GhXZiwoinW6BTqy6Ip RO1dLo9LIsY6ScokFtaFKERK9HQtIMSatvr5YYYtMfroOpBIdc55oHPUXxg582WLYWOCitIpmGsn7 3F9+lqNPnIF9KUaDSMsXq0bm1YNS4eU/qYj1wT5DxgHMd/Uecke3EGDvbkmrFP7Ch3SjKD8rfW3Mj ILKwqsLyqd4H2YyugbPeoweaDYah/YorBk77sZEL+2xV3iDJBe1V3cGu7wt8Ansb0jvxXM2AguMe0 o5foOCOTOSGKg0uqtrYQodxbuwcnymiBtbvkp04KJ3N5bYsaNWxVYlsyvstfRm0dW+xN0AAEDJeS3 vH+rzuSw==; Received: from authenticated user by zero.zsh.org with local id 1mkDmz-000MPG-8l; Mon, 08 Nov 2021 23:10:57 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f170.google.com) smtp.remote-ip=209.85.219.170; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f170.google.com ([209.85.219.170]:43535) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mkDhZ-000LRz-JA; Mon, 08 Nov 2021 23:05:22 +0000 Received: by mail-yb1-f170.google.com with SMTP id a129so47870676yba.10 for ; Mon, 08 Nov 2021 15:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N2GEAuxwLsND7fP/i6JXSHnApIOUysbcZe+LhY8iII0=; b=uWywWhmMQP0R013k7Koz70xj1A9+F3YR6UMMuswhUq2OB8KWpjtQG5+stDDWS6PcNd FMdQKzf2MwFCmgtEENYCq3Pi3Hf2bhVLs/S1mTyE9bQ201BHOy89g1TI/OGSPPdLJJ+O SRukFSdgQ65y985kVnx4eYBtyUxWxGkQbYFgXmRKFWC6ciFVGGpdRYRjsRiAhFfnstrO 7d3T6y94CvBgKIjtomtp4ABkZ5hgNpaOkesEKQKjIu28fnhyWXOj23fFCUcqzf8b69nQ nRBlZ89mLpm1jMSj+6G2dBfzOme4pq/JoCHVuwzFf2fzLfntlvEz+Dnrl9CopOYcUC+h ddZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N2GEAuxwLsND7fP/i6JXSHnApIOUysbcZe+LhY8iII0=; b=JXC3diCLi9YtT2LDZFettWx8p9rA+IZiIxP6ZaMjyOQgvIYtXBkgk200IyYSUv1Pwq URLwCGsRZoueHaicT8WtS7Z0p/Cdw2thXvxAtk4L+rskzOfaFOz9AJLmZbcssmsjdi0s VenTxD/DGEsgCmeeK4If7DxiiyYGbBENQYykzKrVcTjMJ8wZJkBiP8bLrdIXITh580c2 UOrf1gmtrsaYvfPPaRhCbBIa4F8Xth+1Eg1GmutkcDpdNni5YZP8/+aOY3qIwRCSCPBr m0/LL5FTDRl0T/TwLuOFbGirT7dF/5eMDk7KYbePs5s5TbPiRJaQY5K/K/F/CmiXGnQ5 K9HA== X-Gm-Message-State: AOAM533o7jfNA4wyNgG7HDdZKSWscdrA8EzL47w/A0PFCW75Js0UdNyi famd3hl5CvILpyYWWVPAfTFRKfguMB8ljqOJIi//ZMQa/VOIgQ== X-Google-Smtp-Source: ABdhPJzDS46POw/hcef6veFL8K6gpnHFVizOyarjdu0/0mQm/YeszZgVDAcGgZGPC9GKN25qQ7W64oaiWKqd9BsID9g= X-Received: by 2002:a25:24d4:: with SMTP id k203mr3372700ybk.365.1636412720500; Mon, 08 Nov 2021 15:05:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Mon, 8 Nov 2021 15:05:09 -0800 Message-ID: Subject: Re: Prevent new line when using edit-command-line To: Pier Paolo Grassi Cc: Muhmud Ahmad , Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27332 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Mon, Nov 8, 2021 at 2:30 PM Pier Paolo Grassi wrote: > > It would be interesting to make it carry the position of the cursor in vim to zsh. Although you can't use "zed" as your edit-command-line editor, you can use a shell function. I think the above would best be implemented as a wrapper around vim, which you can pass to (the current git head) edit-command-line via the "editor" zstyle, e.g., zstyle :zle:edit-command-line editor vimwrapper > Vim saves the position of the cursor in .viminfo I don't find a .viminfo anywhere in my $HOME or $PWD after using vim on my ubuntu host, so I can't experiment with this. (It is "vim-tiny" and only runs as "vi" so maybe that's why.) edit-command-line goes to some lengths to preserve the region relative to where it was in ZLE before the editor was started, so you probably have to do something with "zle -U ..." to relocate the cursor after vim is done.