Skip to main content
11 events
when toggle format what by license comment
Jul 27, 2017 at 17:12 comment added Robert Kusznier I understand. Thanks for explanation. I accepted your answer, as I think it answers my question, making the process much more pain-free and explaining everything very well.
Jul 27, 2017 at 17:11 vote accept Robert Kusznier
Jul 28, 2017 at 8:36
Jul 27, 2017 at 14:59 comment added user13463 @Robert in the demo, status line under the percentage on the right, it is showing the commands I type. The \it means tap backslash, tap i, tap t. You can remap the original it, but then you will not be able to use the original it anymore. If you remove the change of leader key from your .vimrc it will default to backslash. See :help leader.
Jul 27, 2017 at 14:50 comment added user13463 @Robert The it stays unchanged. To run this you need to press <leader>it while in Normal Mode. If you didn't change your leader key, it is probably a backslash, so you need to type \it. You can bind it to whatever free combination you want, for example \abc or \x. I chose \it just for convenience.
Jul 27, 2017 at 14:43 comment added Robert Kusznier B Okay, I know what's the problem - it's that I have <leader> set to \ in my .vimrc. What does <leader> does in this mapping? Could I remove it?
Jul 27, 2017 at 14:39 comment added Robert Kusznier I understand your answer and it's exactly what I need. Still for some reason running :nnoremap <leader>it vito/<<CR>o?><CR>V (nor adding that to my vimrc) doesn't change the behaviour of it (it still selects all the whitespace after opening tag and before closing tag). When I run sequence vito/<<CR>o?><CR>V everything works fine, but adding the mapping does not. What could be the reason? BTW that is a beautifully written answer. Thanks!
Jul 27, 2017 at 14:23 history edited user13463 CC BY-SA 3.0
added 14 characters in body
Jul 27, 2017 at 14:16 history edited user13463 CC BY-SA 3.0
added 13 characters in body
Jul 27, 2017 at 13:57 history edited user13463 CC BY-SA 3.0
deleted 2 characters in body
Jul 27, 2017 at 13:34 history edited user13463 CC BY-SA 3.0
added 66 characters in body
Jul 27, 2017 at 13:27 history answered user13463 CC BY-SA 3.0