[PATCH v3] VIM: Improve moving between messages in a thread
Franz Fellner
alpine.art.de at gmail.com
Wed Jan 21 10:53:56 PST 2015
Bartosz Telenczuk wrote:
> Hi Ian,
>
> The patch looks good. I tested it on my system and it works fine. I just have one suggestion regarding coding style.
>
> > +function! s:show_prev_msg()
> > function! s:show_next_msg()
>
> Since these functions are almost the same, you could avoid code repetition by replacing them by a function which takes (positive or negative) increment as an argument.
I think the API should be clear and easy to understand, because people will probably bind them to custom shortcuts. You should not have to think about what that weird extra parameter (-1, false, ...) means and go read the docs.
But I agree that the code duplication is not optimal. The code in Ians repo already has split out the ruby code. There is still code duplication. But that can easily be split out into a function on its own.
Franz
More information about the notmuch
mailing list