I am trying to create a vimL script where, among other things, I need to copy the text between two markers such as in


however, I want to copy between columns of the marker positions (characterwise). I have read several times I can use backticks as


But is returning "Not an editor command". Even simple


returns "Not an editor command", although :' goes to the correct line.

Am I missing anything?


Yes, ex-commands always work linewise. There is an open issue in the todo list about it, however until now it has never been implemented. For :s command you can make use of the /%V and /\%c regex atom to make sure it matches within a certain area. Other ex commands don't work on columns. In that case, simple use the normal mode command. That should work without problems.

  • yeap, executing exe normal! (backtick)a,(backtick)by'."\<cr>" works (i don't know how to write my answer because backticks format the answer. I used (backtick) to mean the backtick instead)
    – manolius
    Jun 9 '17 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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