[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Press Ctrl+F to input the pattern you need to search or to search and replace.
"Find:" prompt will appear and you can enter the search command. At this prompt you may enter both "search" and "search and replace" commands.
The format of the search and replace commands follows the Perl language syntax.
The full format of search command is: m/text/ This activates the regular expression engine. You may insert regular expression commands and escaped charactars ('\').
The short form is: /text/
And even shorter: text This form is plain text only. The regular expressions are deactivated by default.
You may precede the pattern with a set of options:
-i ignore the characters upper/lower case. This option is turned on by default so you may need to negate it ("-i-") to make case sensitive serach.
-r use this to indicate that the pattern contains a regular expression
-b start to search backward from the current cursor position, by default the search starts from the current cursor position and goes forward.
Example: -b m/#include ".*"\n/ Which is: case-insensitive search backward for #include "<something>"\n
Same example in short form: -b -r "#include \".*\"\n"
As a result of a search command the editor will jump at the first position of an occurence. The pattern will be stored as a current search pattern and you my use F3 if you wish to repeat the operation. Press Shift+F3 to initiate backward search with the current pattern.
soon: s/search_pattern/replace_text/
By pressing Ctrl+F and activating the prompt you will see that the word at the current cursor position is provided as a suggestion for a search pattern. So you can easily search for a specific word by just positioning the cursor at some of its characters.
You may directly change the current pattern with the text that is currently selected and initiate a search at the same time. Press Ctrl+F3 to search forward, or Shift+Ctrl+F3 to search backward. If there is no selection the word under the cursor is used.
See section 21. Find/Replace In Files. See section 20. Incremental Search. See section 23. Regular Expressions. |
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |