Greetings. I have a vim file which, in general, resembles this: Hello world Hello world I want to concatenate Hello and world. fmt won't do because Hello ends with a newline character. I've tried the following (in vim 5.7), which does not work: :g/\s*/!!tr '\n' ' ' The ex global command locates the lines with the white space, but the tr command won't translate the newline to a space. The man page for tr shows \n as the special character for a newline. Any thoughts? TIA John
- Re: OT (sort of): VIM/ex/tr question John P. Verel
- Re: OT (sort of): VIM/ex/tr question John P. Verel
- Re: OT (sort of): VIM/ex/tr question davidturetsky
- Re: OT (sort of): VIM/ex/tr question John P. Verel
- Re: OT (sort of): VIM/ex/tr question davidturetsky
- Re: OT (sort of): VIM/ex/tr question davidturetsky
- OT (sort of): VIM/ex/tr question davidturetsky