www.question-defense.com | Login/Register
Translate to English Übersetzen Sie zum Deutsch/German Переведите к русскому/Russian Μεταφράστε στα ελληνικά/Greek Vertaal aan het Nederlands/Dutch ترجمة الى العربية/Arabic 中文翻译/Chinese Traditional 中文翻译/Chinese Simplified 한국어에게 번역하십시오/Korean 日本語に翻訳しなさい /Japanese Traduza ao Português/Portuguese Traduca ad Italiano/Italian Traduisez au Français/French Traduzca al Español/Spanish

Posts Tagged “vi”

This is a mini how to that shows how to edit svn:externals from a UNIX shell or from TortoiseSVN on Windows. Follow the simple directions below to modify the svn:externals and commit to your SVN repository. I performed the below two sets of steps on CentOS 5.2 for the Linux steps and on Windows XP Service Pack 3 for the Windows steps.

svn:externals from UNIX/Linux shell

  1. Set SVN_EDITOR: First you will need to set the SVN_EDITOR to your favorite UNIX/Linux editor. I perfer vi so following this exact will open the svn:externals in the vi editor. If you want to use a different editory simply change /bin/vi to the path of your favorite editor.
  2. [root@server ~]$ SVN_EDITOR='"/bin/vi"'
    [root@server ~]$ export SVN_EDITOR
    

    Read the rest of this entry »

    Tags: , , , , , , , , ,

Comments 1 Comment »

To locate and replace a string of text in a file using use the below text.

shell# vi filename

Once in vi use the following:

:%s/string/new-string/ <enter>

That will replace any instance of string with new-string.

Tags: , , ,

Comments No Comments »

To display the line numbers when editing a file with vi simply type the following during the edit.

:se nu

Once line numbers are set then to remove the listing of numbers down the left hand column type the following.

:se nu!

 

VI Example: Displaying Line Numbers
VI Example: Displaying Line Numbers

Useful VI references.


Learning the vi and Vim Editors

Arnold Robbins. O’Reilly Media, Inc. 2008, Paperback, 492 pages, $20.09

5.0


Hacking Vim

Kim Schulz. Packt Publishing 2007, Paperback, 228 pages, $35.95

3.5

Tags: , , ,

Comments No Comments »