christoomey / vim-tmux-runner

Vim and tmux, sittin' in a tree...
MIT License
291 stars 37 forks source link

Add operator for sending text #61 #86

Open vinodkri opened 6 years ago

vinodkri commented 6 years ago

Hi Chris,

I was able to get the Vim motion commands working with VTR :)

I have binded "\<leader>sm" as the trigger both in visual and normal modes. Do take a look.

There are minor things to clean-up:

  1. For running python code correctly indentation is critical, so "g:VtrStripLeadingWhitespace" needs to be set to '0' for python programmers. We need to document it.

  2. Prefer to combine VtrSendLinesToRunner with the VtrSendLinesWithMotion if possible. Currently, VtrSendLinesWithMotion does not support range commands. I was unable to figure that out.

Let me know what you think.

vinodkri commented 6 years ago

Hey Chris,

Any updates on the PR?

Thanks, Vinod

vinodkri commented 6 years ago

Hi Chris, If you have any concern's do let me know. I can work around it. Thanks, Vinod

dsummersl commented 4 years ago

I would love to see this merged. Anything I can do to help?

dsummersl commented 4 years ago

I wanted different mappings than this PR, so rather than mucking about with this PR, I just used the very useful https://github.com/kana/vim-operator-user plugin:

Plug 'kana/vim-operator-user' " Define my own operators for motions.

map <leader>gv  <Plug>(operator-vtr)
call operator#user#define_ex_command('vtr', 'VtrSendLinesToRunner')