XVimProject / XVim2

Vim key-bindings for Xcode 9
MIT License
2.31k stars 181 forks source link

Enabled execution of the external shell commands on the specified text range #361

Closed zengadget closed 3 years ago

zengadget commented 3 years ago

This PR enables the execution of external shell commands.

Mainly I needed this to run swift-format utility. For example with the following entry in .xvimrc

nnoremap <space>f :%!swift-format format<cr>

it now formats my current open swift file when pressing space f - it also works much faster than my previous solution invoking formatter with applescript.

It also works on visual selection. Example from my .xvimrc

vnoremap <space>b :!/Users/matej/bin/vimtrans<cr>

which is also a custom formatter of my swift code.

I thougt it would be useful to have this enabled.

pebble8888 commented 3 years ago

Thanks. It is merged to develop branch.