Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-24-2011, 02:52 AM   #1
Registered: Oct 2005
Posts: 72

Rep: Reputation: 15
Vim - string replacement from current position to end of file

What is the vim command I have to use when I want to perform a text substitution not on the current line or on the whole document or on lines from number x to number y but just from the current cursor position down to the end (or up to the beginning) of the document?
Old 01-24-2011, 03:12 PM   #2
Senior Member
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
to end of document.
from start of document. "." is considered to be the current line number.
Hope this helps

Last edited by Snark1994; 01-24-2011 at 03:15 PM. Reason: Added search from start
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
awk from end of string -3 position comparison dazdaz Linux - Software 4 10-04-2010 10:31 AM
how do i replace a text string in a file with a random string? (with sed etc) steve51184 Linux - Software 16 09-02-2010 11:05 AM
Using sed/awk to replace a string at a given position in anoopvraj Linux - Newbie 6 05-30-2009 07:59 AM
How to find a particular string occurance position in a file? vigneshinbox Programming 5 04-02-2009 11:52 PM
Replacing character position within the string of a file scroy Linux - Newbie 13 11-08-2008 05:45 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:02 AM.

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