Tuesday, April 10, 2012

vimrc mapping line numbers

I have these lines in my .vimrc file:

:map <F9> :exe ':!gdbset bp "%:'.line(".").'"'<CR><CR>
:map <F8> :exe ':!gdbset clear bp "%:'.line(".").'"'<CR><CR>

They work great for adding and removing break points in gdb! Only one
problem (that I know of)... for some reason line numbers in the 80's
don't work. If I put my cursor on line 85 and press F9 then it should
put a breakpoint on line 85. If I put my cursor on line 75 and press
F9 it should put a breakpoint on line 75.

The resulting breakpoints look like this:

b myfile.cc:5
b myfile.cc:75

Line 85 did not work. I've tested the 80's. None of them work. All
other lines seem to work. Why? I'm sure one of you VIM experts can
explain this to me. It's almost like the ":8" are being interpreted as
some other command or something.

Any help would be appreciated!

EV

--
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

No comments: