Saturday, December 30, 2017

Re: Saving key mappings

Hi Guido,

Apologies if this is tagnential or not helpful, but some more details of the specific use-case could be helpful! Is it something that you may be able to do with a filetype plugin or similar? If not, is it possible that you could install a plugin which needs manually called to be activated? That way, you could do something similar to `gvim '+MyPluginFunction' to execute MyPluginFunction when it loads.

I think that there are a number of ways to do this, and it's hard to know what the right way is without more details. I get the sense that what you're doing may be accomplished with a tiletype plugin, though!

Hopefully this is helpful,
Bailey


 30. Dec 2017 06:59 by guido.milanese@gmail.com:

I know that macros and mappings are one of the most frequently discussed topics, so I do apologise if it is a question posed (n = n + 1) times.
I have written a program that, obviously among other tasks, calls (g)vim and opens a given file. I would like to instruct my program to call (g)vim with a given set of key mappings (the ones saved with 'q', as '@a', for example). Would this be possible?
Example: '@c' write '[', pasts the content of system clipboard using "*p and closes ']'.
I know that I can write all :map and :set settings using :mk. I see two options:
* if I cannot save key mappings, I could map the functions to a key, save them to a file: how can I read from this file?
* could marvim be a good solution? In order to publish my program, I would not like to use functions not provided by standard gvim.

The ideal would be something like:

gvim -u file-with-keypmapping textfile

but this would probably ignore the vimrc of the user!


Thank you!
guido, from Northern Italy

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

No comments: