sponsor Vim development Vim logo Vim Book Ad

fthook.vim : simplify filetype specific setting.

 script karma  Rating 3/6, Downloaded by 966  Comments, bugs, improvements  Vim wiki

created by
t9 md
 
script type
utility
 
description
Puprpose~
Ensure my favorite keymap is always available by overwriting plugin-defined
keymap with my buffer local keymap.

I know this plugin is not perfect solution, but I think this still useful.

Practical usecase~
For example, I use following keymap to move between windows.  
>
    nnoremap <silent> <C-h> :wincmd h<CR>
    nnoremap <silent> <C-l> :wincmd l<CR>
    nnoremap <silent> <C-k> :wincmd k<CR>
    nnoremap <silent> <C-j> :wincmd j<CR>
<

With this keymap, I can move window to window with <C-hlkj>.
But sometime, plugin I installed overwrite one of these keymap.  
To ensure `<C-hlkj>` combination is always available, set buffer local keymap
after plugin have set up their keymap.  
This could be done with `autocmd Filetype`, but setup this autocmd each time I
install new plugin is nonsense.  

To do that, refer |fthook-examples| in help.
 
install details
unzip.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-fthook-0.3.zip 0.3 2011-08-22 7.2 t9 md no functionality change.
fix zip archiving mistake. sorry.
vim-fthook-0.2.zip 0.2 2011-08-21 7.0 t9 md Initial upload
ip used for rating: 3.146.35.203

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github