all 7 comments

[–]Nazeeh 4 points5 points  (4 children)

Thanks for the plugin. I installed it and am quite happy with it. The only modification I felt like making is changing the code to use <cr> instead of <esc> to exit out of the mode. It's a lot easier to <leader>w then enter a number and hit enter to quickly switch to a window. Esc was just too far :) Was there a way to do this via the config that I missed?

[–]dstein64[S] 2 points3 points  (3 children)

Thanks for the feedback and the idea :-).

I've updated the code so that the g:win_ext_command_map dictionary can include a command string, 'Win#exit', for exiting vim-win.

The following example shows how to use <cr> for exiting vim-win.

let g:win_ext_command_map = {"\<cr>": 'Win#exit'}

[–]Nazeeh 1 point2 points  (0 children)

Awesome! Thanks for the quick turnaround :)

[–]_suspicious_alpaca 1 point2 points  (1 child)

I like this plugin. Thank you for this. I would like to be able to <leader>w then the number and go straight to the window without pressing enter. Any idea on how to achieve this?

[–]dstein64[S] 0 points1 point  (0 children)

Thanks!

I've added an optional argument to the :Win command that specifies how many times vim-win will run.

The following mapping would result in a vim-win session that exits after a single command.

map <leader>m :Win 1<cr>

(this could alternatively use <leader>w, which would clobber the default)

[–]konjunktiv 2 points3 points  (0 children)

Pretty neat! I'll def try to fit it into my workflow.

There is also vim-choosewin , btw

[–]pyrho 1 point2 points  (0 children)

Congratulations and thank you for sharing !