LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

How to replace letters with carriage returns on VIM

Posted 10-27-2010 at 12:35 PM by xri
Updated 10-27-2010 at 12:38 PM by xri (To add categories)

Problem:
A text file coms with a list comes with the items separated by commas, like:
Quote:
a,b,c....
We need them in column form, like:
Quote:
a
b
c
Solution:
:%s/,/{[Ctrl+v], then [Enter]}/g

Notes:
  1. The % before s, indicates that the range where the replacement is to take place is the whole document.
  2. Ctrl and v are pressed simultaneously, and then the character we mean vim to use (in this case Return).
  3. The g at the end of the
...
xri
Member
Posted in Software
Views 1002 Comments 0 xri is offline
Old

Slackware Undocumented 'Well Duh' Quark #2917 - console vim and X11 clipboard

Posted 03-20-2009 at 11:41 PM by lumak (Lumak's Guide to Random Things)
Updated 05-31-2009 at 02:41 PM by lumak

The special registers * and + do not function in console vim in Slackware. Vim has been compiled both with -clipboard and -xterm_clipboard. If you enable GPM, you can shift highlight in console vim to middle click past in any x application. You can also Shift+middle click in console vim to past text from any x application. If you don't want to use the Shift modifier, you can sacrifice mouse functionality and type ":set mouse=r" in normal mode. This issue does not affect gvim.
...
Member
Views 2452 Comments 0 lumak is offline

  



All times are GMT -5. The time now is 03:38 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration