merlin icon indicating copy to clipboard operation
merlin copied to clipboard

Allow localmap mapping of the text-objects

Open ELLIOTTCABLE opened this issue 7 years ago • 0 comments

At the moment, I've got my OCaml-specific mappings on a FileType autogroup:

augroup ocamlmaps
   au!
   au FileType ocaml nmap <LocalLeader>*   <Plug>(MerlinSearchOccurrencesForward)
   au FileType ocaml nmap <LocalLeader>#   <Plug>(MerlinSearchOccurrencesBackward)
   au FileType ocaml nmap <LocalLeader>r   <Plug>(MerlinRename)
   au FileType ocaml nmap <LocalLeader>R   <Plug>(MerlinRenameAppend)

   " I don't know why Merlin doesn't ship with a mapping for these.
   au FileType ocaml nmap <LocalLeader>y  :MerlinYankLatestType<cr>
   au FileType ocaml nmap <LocalLeader>l  :MerlinLocate<cr>

augroup END

Unfortunately, since Merlin automagically maps the textobjects, I can't limit them to being defined on-FileType / on-load; which squats on m and Shift-M across my entire Vim configuration:

let g:merlin_textobject_grow   = 'm'
let g:merlin_textobject_shrink = 'M'

This is a low-priority feature-request, though; just a minor nit-pick. (=

ELLIOTTCABLE avatar Oct 10 '17 18:10 ELLIOTTCABLE