|ttz||Sorry, I'm really a newbie on vim :-( : E492: Not an editor command: gq|
Not ":gq", but simply "gq"
|angrymg||plus a movement|
|action||angrymg likes to select a visual block and then use gq on it|
|angrymg||likes to select a visual block and then use gq on it|
|gavagai||this would rewrap the whole thing: gggqG|
|Juerd||Hi, I'm trying to define a cmd that executes two other commands|
But everything after the | seems to be ignored.
Is this not the right way to do this?
cmd Rwq :R | :wq
|angrymg||you may have to quote the ||
I'd go and read the help if I were you
|Juerd||I'm lost in the help :)|
|angrymg||(and I'd try to look for examples first, since I'm lazy)|
|jamessan||shouldn't have to. command recognizes the ||
Juerd: you have a user-defined command named R?
|jamessan||Juerd: and it's "command Rwq ..." not cmd|
|Juerd||And since :R is typically the last thing I do before :wq, I'd like to combine them|
:com[mand] *:com* *:command*
Right, com. I have com in my config file :)
Is it okay if com R %s/rt\(-[a-z0-9]\+\)\(@convolution.nl\)/rt\1-resolve\2/
com Rwq :R | :wq
Ehh... "Is it okay if" isn't part of the paste.
Or, well, it shouldn't be :)
|jamessan||Juerd: if you do it all the time (or for a specific filetype), I'd add a BufWrite autocmd that does it for you|
|Juerd||I don't do it all the time|
I use this when replying to email. :R updates the To: mail address, so that the ticket will be resolved
|somian||Ahh, a Juerd is present!|
|Juerd||That shouldn't happen always :)|
|jamessan||Juerd: hence my "(or for a specific filetype)"|
|somian||Hi to you Juerd :)|
|Juerd||jamessan: It can't be determined by the filetype :)|
|Juerd||Yes, but it should happen only when I decide that the ticket should be resolved|
|Juerd||For example, I may have to ask for additional information. The ticket should then remain open.|
But the request for info is also ft=mail :)