These are the sources: http://stackoverflow.com/questions/4620672/copy-and-paste-content-from-one-file-to-another-file-in-viĀ http://vim.wikia.com/wiki/Cut/copy_and_paste_using_visual_selection http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/ Since you already know how to cut/yank text, here are a few ideas for pasting it back into another file: Edit the first file, yanking the text you want. Then open your second file from within vi (:e /path/to/other/file) and paste it Open both files together in a…
Month: December 2012
vim search and replace commands
If you want to match something at the end of the line you need to use the $ character at the end of the string pattern. The following are taken from : http://www.linux.com/learn/tutorials/8255-vim-tips-the-basics-of-search-and-replaceĀ Let’s start by looking at searches and doing search and replace operations within Vim. You can do a search in normal mode…