Tuesday, October 24, 2017

Insert space before last character

Dear group:

I am trying to insert space after first character in a line and a
space before last character in same line using command mode. I could
introduce space before first character but could not insert space
before last character.


F783S
Y625D
A1705V

:%s//\(^.\)/\1 /g results in

F 783S
Y 625D
A 1705V


now I want to give space before last character to get following:

F 783 S
Y 625 D
A 1705 V

I tried different ways and could not introduce space. I am successful
in remove the last character. Could anyone help please.


Thanks
Adrian

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment