You are not logged in.

#1 2009-12-04 17:00:45

geo909
Member
Registered: 2008-09-07
Posts: 309

Small annoying vim problem

Hi everybody,

I am having a minor annoying problem with vim, any help would be appreciated.
So, I put these lines in my vimrc:

imap <F2> <Esc>:w<CR>i
map <F2> <Esc>:w<CR>
 
imap <F3> <Esc>:w<CR>\ll\ld<CR><C-l>i
map <F3> <Esc>:w<CR>\ll\ld<CR><C-l>

Everything works, but when I open vim, I get the following:

jorge@flamingo:~/Documents/Academic/Courses/Coding_Theory/Project$ vim Project.tex
i  <F3>          <Esc>:w<CR>\ll\ld<CR><C-L>i
i  <F2>          <Esc>:w<CR>i
i  <C-Down>      <Esc>:w<CR>:bp<CR><Space>
i  <C-Up>        <Esc>:w<CR>:bn<CR>
Press ENTER or type command to continue

why does vim have to notify me about these?? How can I make this behavior stop?

Btw, I have aliased vim to 'vim --servername vimlatex', I don't know if this has to do with the problem
(although I had no problems before these lines)..

Thanks a lot in advance

Offline

#2 2009-12-04 21:47:51

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Small annoying vim problem

What are you trying to accomplish with those last two binds?  I'm assuming something with rebuilding your latex project?


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#3 2009-12-05 00:42:55

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: Small annoying vim problem

rson451 wrote:

What are you trying to accomplish with those last two binds?  I'm assuming something with rebuilding your latex project?

I have xdvi open when I edit tex files. Pressing F3 in insert or normal mode will write the file, compile it with source specials
and forwardDVI so xdvi jumps and draws a red box in the dvi file corresponding to the line of the tex file I am editing.
(unless of course there are errors, then vim-latex suite's error buffer will open). It's super convenient,

The Ctrl-L is to redraw the screen and has to do with some issues (non-g)vim has when compiling latex stuff with vim latex suite.

Of course I have mapped \ll and \ld accordingly in vimrc

Last edited by geo909 (2009-12-05 00:46:39)

Offline

#4 2009-12-05 00:46:21

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Small annoying vim problem

Try using <Bslash> instead of \ in the right hand side of the map.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#5 2009-12-05 00:49:04

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: Small annoying vim problem

rson451 wrote:

Try using <Bslash> instead of \ in the right hand side of the map.

Thanks, but that didn't work...

Offline

#6 2009-12-05 00:59:50

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: Small annoying vim problem

Btw I don't know if I made that clear: the mappings do work, it's just that I get this strange message when I run vim.
And a solution will save me from pressing an extra 'return' key smile)

Offline

Board footer

Powered by FluxBB