From f2fc96972b70490547f1381e96de248ed54224e6 Mon Sep 17 00:00:00 2001 From: Guillaume DOTT Date: Wed, 13 Nov 2013 11:23:44 +0100 Subject: [PATCH] vim: add ruby lambda syntax definition for switch.vim --- vim/vimrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index 485ea65..9639c6b 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -188,6 +188,14 @@ let Tlist_Ctags_Cmd="ctags" " Doxygen let g:DoxygenToolkit_authorName="Guillaume DOTT" + +autocmd FileType ruby let b:switch_custom_definitions = + \ [ + \ { + \ 'lambda { |\([^|]\+\)|': '->(\1) {', + \ '->(\([^)]\+\)) {': 'lambda { |\1|', + \ }, + \ ] " } " FILETYPES