Hello,
----- "Marc Chantreux" <[email protected]> a écrit :
> My pb is that Foo doesn't care about the line under the cursor and
> always reply 0.
> [...]
> nnoremap <buffer> <space> :echo g:CallBack()<cr>
> [...]
> function! Foo()
> echo 'find '.line('').', add'.getline(line(''))
> let g:boom=getline(line(''))
> bd!
> endfunc
Your Foo function doesn't return anything ...
BTW, I have a similar framework:
http://code.google.com/p/lh-vim/wiki/lhVimLib#Buffers_related_functions
which I have used in several places:
- lh-tags
http://code.google.com/p/lh-vim/source/browse/tags/trunk/autoload/lh/tags.vim
- lh-cpp/UnmatchedFunctions
http://code.google.com/p/lh-vim/source/browse/cpp/trunk/autoload/lh/cpp/UnmatchedFunctions.vim
- lh-cpp/Override
http://code.google.com/p/lh-vim/source/browse/cpp/trunk/autoload/lh/cpp/override.vim
- and lh-cpp/constructor (not yet released)
I have a few thing to re-think [*], however most of the features needed are
already implemented.
[*] it was initially designed with only one conclusive action in mind (or abort)
HTH,
--
Luc Hermitte
http://lh-vim.googlecode.com/
http://hermitte.free.fr/vim/
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---