1

with vim, I use object indent.

and frequently I use this

vii:!sort

for sort a block with same indent.
I try set this nnoremap

nn <leader>ss vii:!sort<cr>

but don't work, any suggestion?

ii is a vnoremap for object-indent, maybe this is the problem, with vpass to visual mode and nnoremap don't continue

juanpablo
  • 6,966
  • 11
  • 52
  • 72

1 Answers1

0

Use nmap:

nmap <leader>ss vii:!sort<cr>

Because the plugin maps ii to some function call too, if you use nnoremap the ii mapping the plugin set is not followed.

Rob Wouters
  • 356
  • 1
  • 4