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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26030 invoked from network); 2 Sep 2023 01:23:38 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Sep 2023 01:23:38 -0000 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:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=oM+TS71gsG3nV0r32AfVK403Olz958MW7jHaIiXl7s8=; b=fffaCLRU1FfSHgdvrTMAwhMuHc NBRGtVzK1+8qVJ7MWR+wYmgBvn1fVMcQJUsUCRelr0cVL3pKWKb8/snhQhlJiLFuF6WNqbr2UXVJZ tIJUdNFgAN+OuWPP1wviI8SJUyygov1ZCr6sJ3ZJaOwTGskFbVSGbtCajyGO9D/9HQbiAo06RmHeB tRPn0F7e+KDK+oMd4rfg6di2o+KrWtdlvJ2u6FZ+KaGoCNlgGO9aNWQYInyAt8tuWeQhHL+HTlczh FIPMk+ZynZhbuH2IrHnDdnKsXVTf9pXAtqc7UYQGZBsPeG1PDWTgadBpUzOZXrYOuEmfCszx2O+7+ cVHQh89A==; Received: by zero.zsh.org with local id 1qcFMN-0003uB-GS; Sat, 02 Sep 2023 01:23:35 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qcFLd-0003CL-WE; Sat, 02 Sep 2023 01:22:50 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1qcFLc-000FsF-Tp; Sat, 02 Sep 2023 03:22:49 +0200 cc: Zsh Users In-reply-to: From: Oliver Kiddle References: To: Bart Schaefer Subject: Re: Documentation of $MARK and "vi-mode operators" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <61021.1693617768.1@hydra> Date: Sat, 02 Sep 2023 03:22:48 +0200 Message-ID: <61022-1693617768.894419@vZ1Y.btab.uAFY> X-Seq: 29217 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 27 Aug, Bart Schaefer wrote: > A quick question given that I am not usually a "bindkey -v" user -- > the doc says: > > MARK (integer) > Like CURSOR, but for the mark. With vi-mode operators that wait > for a movement command to select a region of text, setting MARK > allows the selection to extend in both directions from the initial > cursor position. > > Are there any "vi-mode operators that wait for a movement command to > select a region" other than visual-mode and visual-line-mode ? The vi-mode operators that wait for a movement command are things like vi-change, vi-delete and vi-yank. For examples of widgets that set MARK to select a region of text, search for "Text Objects" in the documentation - that's also the term used in vim documentation. Examples include select-a-shell-word and select-in-word. So, e.g. diw will delete the current word that the cursor is on regardless of whether the cursor is at the beginning, middle or end of the word. But you can also use iw from visual mode to select a word. Zsh includes some text objects written in shell code too. > Both of which automatically set the mark upon entry, as far as I can > tell, unless it is already set? Yes, for the common case they need to initialise MARK. Oliver