Linux Operating System and Programming Languages. C, C++, Python
User avatar
Posts: 276
Joined: Sun Feb 05, 2017 8:31 am


Postby Shahram » Wed Mar 15, 2017 2:14 am

I use CodeLite to edit my files. It is very simple and works in different frameworks very well. Of course you can't find comprehensive tools as we have in Eclipse or NetBeans but it's simplicity is very helpful.
It is free but you may donate to help them continue development of editor.

User avatar
Posts: 276
Joined: Sun Feb 05, 2017 8:31 am

Re: Editors

Postby Shahram » Fri Jun 16, 2017 5:31 pm

vi and vim

these are command line editors.

Searching and Replacing

vi also has powerful search and replace capabilities. To search the text of an open file for a specific string (combination of characters or words), in the command mode type a colon (:), "s," forward slash (/) and the search string itself. What you type will appear on the bottom line of the display screen. Finally, press ENTER, and the matching area of the text will be highlighted, if it exists. If the matching string is on an area of text that is not currently displayed on the screen, the text will scroll to show that area.

The formal syntax for searching is:


For example, suppose you want to search some text for the string "cherry." Type the following and press ENTER:


The first match for "cherry" in your text will then be highlighted. To see if there are additional occurrences of the same string in the text, type n, and the highlight will switch to the next match, if one exists.

The syntax for replacing one string with another string in the current line is


Here "pattern" represents the old string and "replace" represents the new string. For example, to replace each occurrence of the word "lemon" in a line with "orange," type:


The syntax for replacing every occurrence of a string in the entire text is similar. The only difference is the addition of a "%" in front of the "s":


Thus repeating the previous example for the entire text instead of just for a single line would be:


Return to “Programming and Linux”

Who is online

Users browsing this forum: No registered users and 1 guest