Abbreviations not saving in vim

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Abbreviations not saving in vim

revrari
I have created an abbreviations file with the following in my .gvimrc file:

:source ~/autocorrect.vim

If I am working in a new document and try to add an abbreviation or remove it, it works only for the session. But once I have quit vim I lose all my changes. To make these changes permanent I have to edit the autocorrect.vim file directly which defeats the purpose. How can I make these changes global and permanent?

revrari

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Abbreviations not saving in vim

Christian Brabandt

On So, 09 Dez 2018, revrari wrote:

> I have created an abbreviations file with the following in my .gvimrc
> file:
>
> :source ~/autocorrect.vim
>
> If I am working in a new document and try to add an abbreviation or
> remove it, it works only for the session. But once I have quit vim I
> lose all my changes. To make these changes permanent I have to edit
> the autocorrect.vim file directly which defeats the purpose. How can I
> make these changes global and permanent?

Not sure I understand correctly, but abbreviations and mappings when
entered will always apply to your current session and do not end up
magically in any rc file.

You might try a Session file, which might record it, not sure.

Best,
Christian
--
Wie man sein Kind nicht nennen sollte:
  Maud Gebühr

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Abbreviations not saving in vim

revrari
On Monday, December 10, 2018 at 9:21:14 AM UTC+2, Christian Brabandt wrote:

> On So, 09 Dez 2018, revrari wrote:
>
> > I have created an abbreviations file with the following in my .gvimrc
> > file:
> >
> > :source ~/autocorrect.vim
> >
> > If I am working in a new document and try to add an abbreviation or
> > remove it, it works only for the session. But once I have quit vim I
> > lose all my changes. To make these changes permanent I have to edit
> > the autocorrect.vim file directly which defeats the purpose. How can I
> > make these changes global and permanent?
>
> Not sure I understand correctly, but abbreviations and mappings when
> entered will always apply to your current session and do not end up
> magically in any rc file.
>
> You might try a Session file, which might record it, not sure.
>
> Best,
> Christian
> --
> Wie man sein Kind nicht nennen sollte:
>   Maud Gebühr
Thanks. The corrections should go to the autocorrect.vim file.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Abbreviations not saving in vim

Christian Brabandt

On So, 09 Dez 2018, revrari wrote:

> Thanks. The corrections should go to the autocorrect.vim file.

Not sure it is possible per configuration.

Well, then you might have to throw a bit of Vimscript at it :)
Run your mapping, get the output of maparg() and write it to a file.

Best,
Christian
--
Alles Geschmacksache sprach der Affe und biß in die Seife.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Abbreviations not saving in vim

revrari
On Monday, December 10, 2018 at 9:36:34 AM UTC+2, Christian Brabandt wrote:

> On So, 09 Dez 2018, revrari wrote:
>
> > Thanks. The corrections should go to the autocorrect.vim file.
>
> Not sure it is possible per configuration.
>
> Well, then you might have to throw a bit of Vimscript at it :)
> Run your mapping, get the output of maparg() and write it to a file.
>
> Best,
> Christian
> --
> Alles Geschmacksache sprach der Affe und biß in die Seife.
The thing is that I can remove an abbreviation from this list (autocorrect.vim) when working in another file but I cannot add one to it.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
BPJ
Reply | Threaded
Open this post in threaded view
|

Re: Abbreviations not saving in vim

BPJ
mån 10 dec. 2018 kl. 08:41 skrev revrari <[hidden email]>:
On Monday, December 10, 2018 at 9:36:34 AM UTC+2, Christian Brabandt wrote:
> On So, 09 Dez 2018, revrari wrote:
>
> > Thanks. The corrections should go to the autocorrect.vim file.
>
> Not sure it is possible per configuration.
>
> Well, then you might have to throw a bit of Vimscript at it :)
> Run your mapping, get the output of maparg() and write it to a file.
>
> Best,
> Christian
> --
> Alles Geschmacksache sprach der Affe und biß in die Seife.

The thing is that I can remove an abbreviation from this list (autocorrect.vim) when working in another file but I cannot add one to it.

You should try the abolish plugin. It does what you want and more.




--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Abbreviations not saving in vim

revrari
On Monday, December 10, 2018 at 10:54:33 AM UTC+2, BPJ wrote:

> mån 10 dec. 2018 kl. 08:41 skrev revrari <[hidden email]>:
>
>
> On Monday, December 10, 2018 at 9:36:34 AM UTC+2, Christian Brabandt wrote:
>
> > On So, 09 Dez 2018, revrari wrote:
>
> >
>
> > > Thanks. The corrections should go to the autocorrect.vim file.
>
> >
>
> > Not sure it is possible per configuration.
>
> >
>
> > Well, then you might have to throw a bit of Vimscript at it :)
>
> > Run your mapping, get the output of maparg() and write it to a file.
>
> >
>
> > Best,
>
> > Christian
>
> > --
>
> > Alles Geschmacksache sprach der Affe und biß in die Seife.
>
>
>
> The thing is that I can remove an abbreviation from this list (autocorrect.vim) when working in another file but I cannot add one to it.
>
>
> You should try the abolish plugin. It does what you want and more.
>
>
>
> https://github.com/tpope/vim-abolish
>
>
>
>
>
>
> --
>
> --
>
> 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 [hidden email].
>
> For more options, visit https://groups.google.com/d/optout.
Thanks. I was hoping to find a solution that did not require a plugin.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.