With that knowledge, I'd go spelunking in the $VIMRUNTIME/
folders for the tex-related plugins/syntax/filetype files to see
if there are "map" commands that should be "nnoremap" commands.
Or perhaps you have some of your own additions under $HOME/.vim/
that might be bunging matters.

-tim
And what is the difference between map and nnoremap?

Well, there's "map", "nmap" and "nnoremap". I tend to use "nnoremap" rotely because it's usually what I mean.

map applies pretty much anywhere

nmap applies only in normal mode

nnoremap also applies only in normal mode, but prevents recursive expansion. Thus, if you did something like

  :nmap <up> g<up>

you'd likely have problems because the <up> on the right-hand side (RHS) of the mapping again gets expanded to make it "gg<up>" which would then be expanded to "ggg<up>", ad infinitum.

  :nnoremap <up> g<up>

prevents things on the RHS from expanding as additional mappings. The same applies to any of the "*noremap" commands.

When I create a mapping, I generally mean "do this list of things as if they are actual Vim commands, even if I accidentally overwrite one of its constituent parts with a new mapping".

Each has its uses, but for my general uses, "nnoremap" is almost always what I mean, so I just type it and think later...or not at all :)

        :help recursive-mapping

has more details on the matter.

I inserted several map commands. Here is my list:

:syntax on
imap <F3> <C-O>:!pdftex book.tex<Cr>
map <F3> :!pdftex book.tex<Cr>
imap <F4> <C-O>:!texexec book.tex >/dev/null<Cr>
map <F4> :!texexec book.tex >/dev/null<Cr>
imap <F5> <C-O>:!acroread book.pdf<Cr>
map <F5> :!acroread book.pdf<Cr>
map <F2> 1GgqG
imap <F2>   1GgqGi

Do you see any that could be causing trouble?

I noticed those in your *vimrc files, but didn't see anything among them that would have triggered the exact text you had in your original example (something about "wqa" or "update" or something like that). However, if some of the above text appears in your text at "random", perhaps they are of a problematic ilk. There's no harm in changing them to more precise mappings ("inoremap" and "nnoremap") to eliminate one possible source of problems.

-tim


Reply via email to