Re: insertmode and importing a script.
- John R. Culleton wrote:
> I am developing an ap[plicataion where vim in some form willp;ay:imap <F7> <C-O>:source ~/myscript<CR>
> a key role. For simplicity of use by non-vimers I want to suggest
> either eVim or Cream to start with. But to perform certain
> functions more easlily i need to be able to import scripts into
> the run.
> The first script will reassign F-keys to make compiling a TeX source
> file a one-key process. My target audience is scared to death of
> anything resembling a command mode command.
> The second script will be needed only when a file contains
> information saved in txt form from MSWord. It will handle
> things like left and right quotes, elipses, and em dashes.
> The problem is this: both eVim and Cream start out in insertmode.
> How do I configure a script in a way that will disable
> insertmode temporarily, do its thing, and then set insertmode
> again. The last part is easy. But the first part is a chicken and
> egg problem. Again for simplicity I want to avoid a user
> instruction like:
> 1. Disable insertmode from a menu selection.
> 2. import the script
> 3. Enable insertmode.
> So, how do I do the equivalent of <Ctrl-L> as the first statement
> of a script?
> Alternatively, if the first script is included on the command
> line of a Gvim run, and includes set insertmode as its last
> instruction, will I have the equivalent of eVim, or do I need to
> do other changes as well?
> All replies appreciated.
> John Culleton
> PS I have tied knots in the corners of my handkechief per the
:imenu S&pecial.CompileTe&X<Tab>F7 <C-O>:source ~/myscript<CR>
and notice the paragraph starting "- Use CTRL-O" six or seven lines lower