Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

possible to be defined as dict function. #319

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

mattn commented Nov 22, 2012

Currently, g:ctrlp_status_func should be dictionary that has pair of string/string. So I need define like following.

function! Foo(...)
  return "..."
endfunction
let g:ctrlp_status_func = {
\  "main": 'Foo'
\}

But below is good to look and understand the code.

let g:ctrlp_status_func = {}
function! g:ctrlp_status_func.main(...)
  return "..."
endfunction

And probably, this can save bits memory... (really?)
This patch don't break compatibility. So we can use old style, new style both.

@kien kien closed this in f9ada48 Nov 25, 2012

Owner

kien commented Nov 25, 2012

Merged. Thanks @mattn!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment