fisadev / vim-isort

Vim plugin to sort python imports using https://github.com/timothycrosley/isort
MIT License
219 stars 32 forks source link

Support for visual range with `:Isort` #5

Closed blueyed closed 5 years ago

blueyed commented 10 years ago

This would make the extra Python functions unnecessary, but I've left them, as with the old mapping for visual mode.

Feel free to improve upon. I would also like to not have the mapping (i.e. a setting for it). Given how easy :Is<tab><cr> is (and the number of times you use it), it should not overwrite an existing default Vim shortcut.

/cc https://github.com/fisadev/vim-isort/pull/3

fisadev commented 10 years ago

Thanks! I'll test and merge it when I get back to a computer :)

Also, did you know you can disable the mapping? In the readme it's explained, just use this in your .vimrc:

let g:vim_isort_map = ''
blueyed commented 10 years ago

I see, and should have noticed it.

In my quest to not only install new vim plugins, but also remove some from time to time, I've decided that the isort program is good enough, with a map like this:

command! -range=% Isort :<line1>,<line2>! isort -
qbedard commented 5 years ago

So should this issue be closed?