27 howm-mode.vim (2-8) map に を使う

直接 map するのではなく一旦 を使って、.vimrc でユーザが自由に設定できるようにしてやる。自分で特に設定しない場合、動作は変わらない。

if !hasmapto('<Plug>HOWM_ShowDirectory')
  nmap <silent> <Leader>,a <Plug>HOWM_ShowDirectory
endif
if !hasmapto('<Plug>HOWM_OpenMemo')
  nmap <silent> <Leader>,c <Plug>HOWM_OpenMemo
endif
if !hasmapto('<Plug>HOWM_SearchF')
  nmap <silent> <Leader>,s <Plug>HOWM_SearchF
endif
if !hasmapto('<Plug>HOWM_SearchE')
  nmap <silent> <Leader>,g <Plug>HOWM_SearchE
endif
if !hasmapto('<Plug>HOWM_SearchM')
  nmap <silent> <Leader>,m <Plug>HOWM_SearchM
endif
if !hasmapto('<Plug>HOWM_ShowSchedule')
  nmap <silent> <Leader>,y <Plug>HOWM_ShowSchedule
endif
if !hasmapto('<Plug>HOWM_ShowTodo')
  nmap <silent> <Leader>,t <Plug>HOWM_ShowTodo
endif
noremap <silent> <script> <Plug>HOWM_OpenMemo :call <SID>OpenMemo(<SID>GetFilePath(0), 0)<CR>
noremap <silent> <script> <Plug>HOWM_ShowDirectory :call <SID>ShowDirectory()<CR>
noremap <silent> <script> <Plug>HOWM_ShowSchedule :call <SID>ShowSchedule()<CR>
noremap <silent> <script> <Plug>HOWM_ShowTodo :call <SID>ShowTodo()<CR>
noremap <silent> <script> <Plug>HOWM_SearchF :call <SID>FullTextSearchInput('fgrep')<CR>
noremap <silent> <script> <Plug>HOWM_SearchE :call <SID>FullTextSearchInput('egrep')<CR>
noremap <silent> <script> <Plug>HOWM_SearchM :call <SID>FullTextSearchInput('migemo')<CR>