aboutsummaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorTeddy Wing2015-07-18 20:06:26 -0400
committerTeddy Wing2015-07-18 20:06:26 -0400
commit3fccfd9723b6af2c174cd073b3a0324a85611f11 (patch)
treec896232aae3cf9ca4a8d392ccac649c794b9e8cc /plugin
parenta037e921a4b9b0539c93450fe3df1f6c8175ceab (diff)
downloadauditory.vim-3fccfd9723b6af2c174cd073b3a0324a85611f11.tar.bz2
autoload/auditory.vim: Make dictionary of mappings
Create a dictionary with all our mappings. We'll use this to activate them programmatically. I think it might also be interesting to provide this as a configurable variable within the plugin so that users can change the built-in mappings if they so choose. Note that this doesn't currently work because you can't have comments in dictionary literals in Vimscript. Thanks to Raimondi on #vim for confirming that for me after I played around with this. Also thanks to bairui/dahu for his suggestion for emulating comments in dict literals: https://gist.github.com/dahu/18b48c70444d8078f7d7 " Barry Arthur, July 2015 " Kludge emulating comments in dict literals " :-0 surprised?! function! StripComments(comment_leader, dict) return filter(a:dict, 'v:key !~ "^" . escape(a:comment_leader, "\"")') endfunction let x = StripComments('REM', { \ 'a' : 1 \, 'REM This is a nasty workaround mimicking comments in dict literals' :-0 \, 'b' : 2 \, 'REM Duplicate keys are not tolerated within dict literals, hence the numbered comment keys' :-0 \, 'c' : 3 \, 'REM For the younger audience members, REM stands for "remark" and was the comment leader in BASIC' :-0 \, 'd' : 4 \})
Diffstat (limited to 'plugin')
0 files changed, 0 insertions, 0 deletions