Tuesday, December 15, 2009

using iskeyword to make vim better for ruby editing

I've had this problem with editing ruby:  method and variable names in ruby use underscore to separate words by convention

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? 

Blue Skies,
--
Josh Cronemeyer

"If you want to go fast, go alone. If you want to go far, go with others." -African Proverb

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: