Copy selected lines in vim


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Copy selected lines in vim
# 8  
Old 02-24-2010
Bug To copy the selected lines and paste into new file

Dear Friend,

You can use the following way to copy the lines from one file and past that lines into another file

step:1
press Esc key.

Select the lines , which you want to copy. For copy the content using the shift + v

Step 2:
Press y

Step 3:
Type ":e file name"

Step 4:

Then press "p".

The new file contains the content which are copied from the old content.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Selected matching lines

two files: one with the line number only, and the 2nd one with line number and content, as following: line_file.txt 1 3 5 9 23 30 content_file.txt 1|we are the world|good|great 2|easily do this by highlighting you|easily do this by highlighting you|easily do this by highlighting... (2 Replies)
Discussion started by: dtdt
2 Replies

2. Shell Programming and Scripting

Delete selected lines

hi Gurus, I have a source file with more than 10 columns ( not fixed ) I want to delete all the lines on the following condition 1) where i have first column as "UPDATE PLAN ADD RATE SCHEDULE" and fourth column as null awk '($1=="UPDATE PLAN ADD RATE SCHEDULE" && $4=="") {print $0}'... (5 Replies)
Discussion started by: r_t_1601
5 Replies

3. Shell Programming and Scripting

finding least out of selected lines

Hello, I have a file, which looks like: I want to print the row containg "PRO" in second column after comparing and finding the minimum value of fifth column present in all "PRO". and likewise for every other string present in second column. I am using : filename=list... (2 Replies)
Discussion started by: CAch
2 Replies

4. Shell Programming and Scripting

trying to print selected fields of selected lines by AWK

I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by awk 'NR==29,NR==10029' File1 > File2 and then doing awk '{print $1, $2, $13, $14}' File2 > File3 Can... (3 Replies)
Discussion started by: ananyob
3 Replies

5. Shell Programming and Scripting

Process selected lines

I have an if statement where I state that if there are more than one records (lines) found containing a string in a file, then it enters into a while loop to use each line for as many lines as there are and then stop. Trouble is, I can't figure out how to move to the next instance of each line. ... (2 Replies)
Discussion started by: derekphl
2 Replies

6. UNIX for Dummies Questions & Answers

Find & Copy Selected files to another Directory

I am wanting to find files within a directory that are over a certain number of days old and copy them to another directory. And unfortunately not having much luck.......is someone able to help. Would also like to add that there are literally thousands of files that I am wanting to copy in one... (3 Replies)
Discussion started by: hellfyre
3 Replies

7. UNIX for Dummies Questions & Answers

Copy selected Directories

I wonder if someone would help me a little here. I have a directory (folder on a mac) with about 100 subfolders and sub-subfolders and files there in. All sub directories have the same name structure, "AAA Name". Like this: ISP CompanyName ITS CompanyName KEL CompanyName KRA CompanyName... (2 Replies)
Discussion started by: sigurarm
2 Replies

8. Shell Programming and Scripting

print selected lines

Hi everybody: I try to print in new file selected lines from another file wich depends on the first column. I have done a script like this: lines=( "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "21" "31" "41" "51" "55" "57" "58" ) ${lines} for lines in ${lines} do awk -v ... (6 Replies)
Discussion started by: tonet
6 Replies

9. Shell Programming and Scripting

Copy selected contents from file

I want to capture contents of a file between 2 strings into another file for eg all lines in between the keywords "start log" and "end log" should be copied into another file (4 Replies)
Discussion started by: misenkiser
4 Replies

10. Solaris

how to do selected copy

I need to copy the files from one dir to another dir based on sysdate, like cp -> (sysdate-n) filename -> to -> new dir n = 1,2,3.............. (3 Replies)
Discussion started by: dbasan
3 Replies
Login or Register to Ask a Question
vim-registry(5) 						    vim addons							   vim-registry(5)

NAME
vim-registry - syntax for vim-addons registry files SYNOPSIS
PACKAGE-NAME.yaml DESCRIPTION
A registry file is a multi-document YAML file (i.e. it can be composed by several different YAML documents separated by "---" lines). Each YAML document represents a registry entry, that is the information describing a single addon. Ideally, the registry directory contains one file per package shipping addons; with a filename obeying to the convention PACKAGE-NAME.yaml. Hence a single package can contribute to the registry with multiple entries described in a single YAML file. For example, the "vim-scripts" package should ship a single /usr/share/vim/registry/vim-scripts.yaml file, containing one YAML document per shipped addon. The first lines of such file can look like the following: addon: alternate description: "alternate pairing files (e.g. .c/.h) with short ex-commands" basedir: /usr/share/vim-scripts/ disabledby: "let loaded_alternateFile = 1" files: - plugin/a.vim - doc/alternate.txt --- addon: whatdomain description: "query the meaning of a Top Level Domain" basedir: /usr/share/vim-scripts/ disabledby: "let loaded_whatdomain = 1" files: - plugin/whatdomain.vim --- Each registry entry may contain the following fields, to be typeset according to the YAML specification: addon (Required) Name of the addon. description (Required) Human understandable textual description of the addon. files (Required) List of the files which compose the addon and are required to be present in a component of the Vim runtime path for the addon to be enabled. Each file is specified relative to a component of the Vim runtime path. basedir (Optional) Directory where the files shipped by the addon (i.e., where the symlinks of the user/sysadm should point to) reside on the filesys- tem. Default is /usr/share/vim/addons. disabledby (Optional) Vim script command that can be used (usually by adding it to ~/.vimrc) to prevent the addon from being used even when it is installed. The intended usage of this field is to "blacklist" an undesired addon whose files are available, and hence automatically loaded by Vim, in a component of the Vim runtime path. AUTHOR
James Vega <jamessan@debian.org> SEE ALSO
vim-addons(1), YAML specification <http://www.yaml.org/> COPYRIGHT
Copyright (C) 2010 James Vega This program is free software, you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as pub- lished by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Debian Project January 2010 vim-registry(5)