Hi Javier!

On Sa, 17 Aug 2013, Javier Mediavilla Vegas wrote:

> Sorry for not putting an example.
> I want to achieve a latex like behaviour. For example:
> 
> ---- snippet.txt ----
> this is a snippet
> 
> ---- main.txt ----
> this is the main text
> \include{snippet.txt}
> 
> So, If I hover the cursor over line 2 of main.txt in insert mode, vim 
> substitutes \include{snippet.txt} by its contents.
> 
> ---- main.txt ----
> this is the main text
> this is a snippet
> 
> If I exit insert mode, the text becomes again as before, with \include. 
> Suppose now I change the file snippet.txt to
> 
> ---- snippet.txt ----
> this is a snippet
> added some new stuff
> 
> Then, with main.txt opened, hover over \include{snippet.txt} to get
> 
> ---- main.txt ----
> this is the main text
> this is a snippet
> added some new stuff
> 
> When I change to normal mode, the file main.txt becomes to the original 
> state, that is
> 
> ---- main.txt ----
> this is the main text
> \include{snippet.txt}

Wouldn't that rather be annoying?

Vim can't really do that and I doubt there exists an plugin that does 
that for you. There are too many questions with this example, e.g. What 
happens, if you edit that snippet part, while in insert mode? How would 
Vim know, which part belongs to the snippet and which part it should 
keep in the main file? 

regards,
Christian
-- 

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

Reply via email to