Quantcast
Channel: Can you pass specific text within a line to an external command? - Vi and Vim Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by nullromo for Can you pass specific text within a line to an...

Thanks to @romainl for the help. Here's a solution that uses yanking and seems to work well:y to yank the selection:!echo to start the command<C-r>=escape(substitute(shellescape(getreg('"')),...

View Article



Answer by romainl for Can you pass specific text within a line to an external...

Short answerYou can't. Ex commands are always linewise and there is no way around that.Long answerYou can achieve your goal, though, just not with :help :range! or any other Ex command.You can start...

View Article

Can you pass specific text within a line to an external command?

BackgroundVim uses ranges to specify which lines should be passed to a command. For example, :5,10 will use lines 5-10, :'a,'b will use the lines between mark a and mark b, and :'<,'> will use...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images