0
internationalization
definternationalizationghi
internationalization

Imagine I have the above text, I want to change occurences of internationalization to 11internationalization or internati22onalization

How to do that with gn text object? When I search internationalization and cgn, it will delete the whole word. I don't want to type again the long word, I just want to do some small changes to long word.

How can I do that?

  • What makes you think that you can do that with gn ? The doc reads Search forward for the last used search pattern, like with 'n', and start Visual mode to select the match.. Maybe what you are looking for is f and t so for example you can do n to go to next result, ` fi` to go to the second occurrence of i and i22 to insert 22. And you can make it a macro if you need to repeat that. – statox Feb 11 at 8:42
  • I agree with statox. there is possibility of question is not clearly conveying the intention of asker. you are asking why cgn deletes then it means change goto n use fi (find i) or ti (till i). – Devidas Feb 11 at 8:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.