fsharp / zarchive-vim-fsharp

F# bindings for vim
MIT License
143 stars 34 forks source link

Add options to turn off default key bindings and to reconfigure them iā€¦ #53

Closed markwoodhall closed 8 years ago

markwoodhall commented 8 years ago

Hi,

Thanks for putting together this plugin. šŸ‘

I have not been using the plugin very long but have been using vim for quite some time. One of the first things I noticed was that installing the plugin caused some of my keybindings to be overwritten. For instance, I tend to use <leader>s to open a new vertical split but with this plugin installed that would attempt to take me back to the location where I triggered a go to declaration.

I've added an option to stop the plugin from creating bindings and I've also added an option to set custom bindings. As an example, setting the following in my .vimrc allows me to override the default <leader> prefix and each of the individual bindings.

let g:fsharp_map_prefix = 'cp'
let g:fsharp_map_fsisendline = 'p'
let g:fsharp_map_fsisendsel = 'p'
let g:fsharp_map_gotodecl = 'g'
let g:fsharp_map_gobackfromdecl = 'b'
let g:fsharp_map_fsiinput = 'i'

I hope this is helpful, if there is anything I can do to make it better then let me know. Forgive my bad spelling of off in the commit message. šŸ˜Š

Thanks again, Mark

markwoodhall commented 8 years ago

I was thinking about this and maybe the more preferable option is just to allow switching off bindings and customising the prefix key. If users want default bindings they at least have the option to not use the leader key, if they wish. If they don't want default bindings then they can just switch them off and configure their own bindings in the usual way.

kjnilsson commented 8 years ago

This is great. Thanks.