kana / vim-textobj-fold

Vim plugin: Text objects for foldings
http://www.vim.org/scripts/script.php?script_id=2275
34 stars 6 forks source link

How to call this from function? #9

Open ipsod opened 4 years ago

ipsod commented 4 years ago

I'm trying to include this in some shortcuts in my .vimrc, but can't find a way to.

I've tried execute "normal \<Plug>(textobj-fold-i)", but it didn't work.

Also, I have it bound using nmap iz <Plug>(textobj-fold-i), and nmap <localleader>f viz works as expected, but nmap <localleader>f viz: (which I'd like to follow with other commands) doesn't seem to.

fimmind commented 4 years ago

I'm not sure, but maybe textobj#user#select() will help. See :help textobj#user#select() for documentation