On Dec 16, 9:29 pm, Andy Wokula <anw...@yahoo.de> wrote:
> Am 16.12.2009 09:28, schrieb Christian Brabandt:
>
>
>
> > On Wed, December 16, 2009 4:29 am, Josh Cronemeyer wrote:
> >> example: def this_is_a_method_name
>
> >> By default if I do a 'dw' with my cursor on the first letter of "this" vim
> >> will delete the entire method name. I have found that if I add a set
> >> iskeyword line to my vimrc file that contains ^_ then I get the desired
> >> behavior from dw... but this breaks ctags. Now if I do a ctrl+] on the
> >> first letter of "this" ctags will try to find a tag named "this" instead
> >> of "this_is_a_method_name". Am I barking up the wrong tree with the
> >> iskeyword stuff? Does anyone know a good way to get vim to behave in both
> >> situations?
>
> > May be this helps:
>
> > fu!<SID>SetIskeyword(operator, motion)
> > setl isk-=_
> > exe ":normal! " . a:operator . a:motion
> > setl isk+=_
> > endfu
> > onoremap<buffer> w :<C-U>call<SID>SetIskeyword(v:operator, 'w')<CR>
>
> > regards,
> > Christian
>
> It's better to use special mappings for camel case motions:
>
> http://vim.sf.net/scripts/script.php?script_id=1905
>
> --
> Andy
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment