Changes between Initial Version and Version 1 of NavigatingInSources


Ignore:
Timestamp:
2012-05-11T15:37:50Z (12 years ago)
Author:
Jakub Jermář
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • NavigatingInSources

    v1 v1  
     1= Navigating in HelenOS sources =
     2
     3== Searching and Grepping ==
     4
     5Most people coming from the Unix background will be used to working with the `grep` command. While using plain `grep` to search HelenOS sources is possible too, Bazaar, the VCS used by HelenOS, provides a nice wrapper around `grep`, so that it is possible to do for example:
     6
     7{{{
     8$ bzr grep -n --color=auto foo
     9}}}
     10
     11This will search all versioned files for the occurrence of string 'foo' and for each match it will print the file, line number and the line itself. The output will be colorized and the matching string will be highlighted.
     12
     13Another possibility to search the sources is to use `cscope`.
     14
     15== Indexing the sources ==
     16
     17HelenOS main `Makefile` provides the `cscope` target, which indexes the source files for later interactive searching and querying:
     18
     19{{{
     20$ make cscope
     21}}}
     22
     23The index can be used directly the `cscope` command:
     24
     25{{{
     26$ cscope -d
     27}}}
     28
     29Many text editors provide some sort of a `cscope` plugin to seamlessly integrate source navigation with the text editor's editing and viewing features.
     30
     31  * [http://www.vim.org/scripts/script.php?script_id=51 cscope_macros.vim : basic cscope settings and key mappings]