Friday, January 27, 2023

Re: change Vim search key , to .

On Fri, Jan 27, Igor Lerinc wrote:
>I want to change the Vim search key , (semicolon) to . (dot)
>
>When i need to go backward in search results, i use , (semicolon)

I assume that you are talking about , command that is used to repeat
latest f, t, F or T in opposite direction (:help ,).

>but , (semicolon) is <Leader> key in my config, so it wont work, I instead
>want it to make a key . (dot)

It's possible by providing non-recursive mappings for Normal,
Operator-pending and Visual modes

nnoremap . ,
onoremap . ,
xnoremap . ,

However, you may not want to shadow . command. It's used in normal mode
to repeat last change (:help .). For example, you can use double-tap
comma instead

nnoremap <Leader>, ,
onoremap <Leader>, ,
xnoremap <Leader>, ,

-Dmitri

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Y9RE7qBp4PUW3Lsr%40angmar.

change Vim search key , to .

I want to change the Vim search key , (semicolon) to . (dot)

When i need to go backward in search results, i use , (semicolon)

but ,  (semicolon) is <Leader> key in my config, so it wont work, I instead want it to make a key  .  (dot)





--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CADZsa2oqXB-vYcg6RZbea2eSYOz6n%3DPtWmQCt0iYEAeAjC6DJw%40mail.gmail.com.

Wednesday, January 25, 2023

vim in onenote, and cherrytree

  i use extensively onenote for work, classes, everything, and cherrytree, but, i find Vim way of doing things much better. 

is there some way, to make it Vim compatible ?

as i dont write my notes in plain txt, i need organisation it provides. 

does notion support Vim mode? should i use notion?

but i also depent on my .vimrc, as that's how i find it intuitive and useful, can something provide me that ?

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CADZsa2pwdbfQSK96xUDm0fdEhQE2bLGEQ8jXmsP2z9xp8i0MzA%40mail.gmail.com.

Monday, January 23, 2023

How to prevent vim asking to reload /dev/fd?

Hi,

After I run the following command (in MacVim),

vimdiff <(seq 3) <(seq 4)

then switch to another window and switch it back, vim will ask me something like this.

W11: Warning: File "/dev/fd/63" has changed since editing started
See ":help W11" for more info.
[O]K, (L)oad File, Load File (a)nd Options:

My ~/.vimrc has this line.

autocmd BufRead /dev/fd/* setlocal noautoread

If I remove it, vimdiff will automatically update the screen corresponding to /dev/fd/*, so the screen then will contain empty content.

How to completely disable vim from reload /dev/fd/* (not even asking anything)?

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/d2f8e188-3a64-454c-8f24-a330f63fe664n%40googlegroups.com.

Saturday, January 21, 2023

Re: would my config be used?

Ich changed this in my_config.vim there is the set relativenumber option. 

Am Sa., 21. Jan. 2023 um 16:16 Uhr schrieb Owajigbanam Ogbuluijah <xigbanam@gmail.com>:
Can you try adding set relativenumber to your configuration in ~/.vim_runtime? Does this work?

There's no place in amix/vimrc which explicitly sets or unsets relativenumber. But my guess is you can customize anything you want in your my_config.vim

On Sat, Jan 21, 2023 at 12:11 PM 'Sebastian Gödecke' via vim_use <vim_use@googlegroups.com> wrote:
Hi there, 
i want to use a vim-configuration, that should be on every maschine, i connect with. 
I use this here:
By creating a my_config.vim in main folder ~/.vim_runtime/ and configured a "real nice" config. There is an option be set with "set relativenumber" but this would be used, because i don't see it. I even don't see "set number". When i'm adding this in a running vim it worked perfect. 
So someone has an idea, why my config with this option wouldn't be set? I check the dependencies and all were setup right. 

Does someone of u has an idea?
Thanks and regards Sebastian

--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJRNCbZ10pxYsuEDoDre%3DDuiyf3yNctFVhbYa94xPvnw6G%2BhHg%40mail.gmail.com.

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAOmRJrejX_F_7hH0UuQ-wc%2BOjyveRQS%3DLds6K3j26UzP0H-f8w%40mail.gmail.com.


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJRNCbaJ5pbVuTAsboiYYRcbvtqy0czn6c_BwxnG4%2BBPoW-9Uw%40mail.gmail.com.

Re: Why does (my) Vim leave the cursor to the last mark even if I don't save the file?

* Marvin Renich <mrvn@renich.org> [230121 10:53]:
> * Bram Moolenaar <Bram@moolenaar.net> [230120 11:01]:
> >
> > > I think what he is asking is for the " mark to only be written to the
> > > viminfo file for buffers that have been modified. I'm not sure how to
> > > do this or if it is even possible, but it seems like a perfectly
> > > reasonable behavior to want.
> > >
> > > Perhaps a VimLeavePre autocommand that wipes unmodified buffers? What
> > > other settings for those buffers would not be saved to .viminfo?
> >
> > How about:
> > - When writing the buffer set some flag, e.g. b:did_write_this_buf
> > - When exiting, go through all buffers and those that don't have the
> > b:did_write_this_buf flag move the cursor to the " mark.
> >
> > Something like that.
>
> I don't think we need another flag; just use the 'modified' option. I
> think this is what the OP wants, and is simpler.
>
> I also think Salman Halim's suggestion of using the . mark instead of the
> " mark is more useful.

Note that what the OP wants (don't update " mark for non-modified
buffers) requires changing the code that writes .viminfo, which I think
is in the source, not the runtime.

If you change defaults.vim to use the . mark instead, the OP is going to
get very close to the behavior he wants (he may even like it better than
what he asked for), and no change to the Vim source is needed.

I suspect that most Vim users will prefer the . mark behavior over the
current behavior, but if not, they can easily get the old behavior back;
just leave the old BufReadPost as a comment in defaults.vim, and they
can copy it to their own vimrc.

I think this is the best solution all around.

...Marvin

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Y8wOqZXZuVPFSJg1%40basil.wdw.

Re: Why does (my) Vim leave the cursor to the last mark even if I don't save the file?

* Bram Moolenaar <Bram@moolenaar.net> [230120 11:01]:
>
> > I think what he is asking is for the " mark to only be written to the
> > viminfo file for buffers that have been modified. I'm not sure how to
> > do this or if it is even possible, but it seems like a perfectly
> > reasonable behavior to want.
> >
> > Perhaps a VimLeavePre autocommand that wipes unmodified buffers? What
> > other settings for those buffers would not be saved to .viminfo?
>
> How about:
> - When writing the buffer set some flag, e.g. b:did_write_this_buf
> - When exiting, go through all buffers and those that don't have the
> b:did_write_this_buf flag move the cursor to the " mark.
>
> Something like that.

I don't think we need another flag; just use the 'modified' option. I
think this is what the OP wants, and is simpler.

I also think Salman Halim's suggestion of using the . mark instead of the
" mark is more useful.

...Marvin

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Y8wKilsT9IqIj56h%40basil.wdw.