On Fri, 18 Apr 2025, dvalin via vim_use <vim_use@googlegroups.com> wrote: > On 18.04.25 09:43, Marc Chantreux wrote: >> On Fri, Apr 18, 2025 at 12:08:56AM -0400, Eli the Bearded wrote: >>> :map * "yyy@y >> this is an old vi trick, vim can just source a range:
I have been using it a long, long time. I should have included my once standard explaination (used in many posts in comp.editors over the years and now below). >> then you lose the awesome "next occurence of the current word" (see :h *, :h >> # >> and :h g*) > Marc, I took '*' for a placeholder, not a literal, given Eli's evident Vim Fu, Actually, I use it with * now. I have since before * did that search in vim. To get back the next occurence of the current word, I have in my vimrc: :noremap _ * Here's how I used to post it in comp.editors: " yank current line into buffer y and execute; " mnemonic * is executable in ls -F output map * "yyy@y I have two other "must have" macros that my fingers reach for and I will find myself hand adding in enviroments[*] that lack them: " split line on previous space character " mnemonic "S" for split map S F r<cr> " double character under cursor " mnemonic fix = in C: eg if(a=0) to if(a==0) map = y p The ironic thing about the = macro is I use it to fix unbalanced parenthesis much more often than incorrect assignment versus comparison. [*] My work life involves opening things in vi/vim/nvi on plenty of "machines" where I have never previously to that day logged in. For example short lived virtual machines within network that I need to write and run a script on to leverage ssh allowed to that VM, but not others in the network, and firewalls blocking access to APIs on other VMs in that network from outside the network. Elijah -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_use/4ZfNYv51DCzfYm%40panix5.panix.com.