Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

with vim, I use object indent.

and frequently I use this


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

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer
I added <cr> but this don't is the problem – juanpablo Jan 30 '12 at 2:57
@juanpablo, yeah sorry I was too fast. Edited answer should work. – Rob Wouters Jan 30 '12 at 3:02
yeah! this working, but I scary to nmap :P – juanpablo Jan 30 '12 at 3:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.