]> git.xonotic.org Git - xonotic/xonotic.wiki.git/commitdiff
Update cscope section to make work SublimeText with it
authorterencehill <piuntn@gmail.com>
Fri, 17 May 2019 12:31:38 +0000 (12:31 +0000)
committerterencehill <piuntn@gmail.com>
Fri, 17 May 2019 12:31:38 +0000 (12:31 +0000)
Programming-Tips.md

index 0d2999fcd02da386d9c3f2271836b4fc32b50551..0a7b4526d554906cebdcb435b06ce8060b87e8e2 100644 (file)
@@ -61,17 +61,34 @@ For this purpose it's possible to use a text-based tool called [Cscope](https://
 #### Download / Installation
 
 * Download and install cscope with `pacman -S cscope`  
 #### Download / Installation
 
 * Download and install cscope with `pacman -S cscope`  
-Windows users must download the Windows version of cscope from https://code.google.com/archive/p/cscope-win32/downloads since the mingw version generates broken indices and put it into the main xonotic repo directory.
+Windows users must download the Windows version of cscope from https://code.google.com/archive/p/cscope-win32/downloads and put it into the main xonotic repo directory. The mingw version can't be used as it puts Unix paths into the generated indices, making them unusable.
 
 
-* Download and install a cscope GUI or a plugin for your text editor / IDE. For example for jEdit there is a plugin called [CscopeFinder](http://plugins.jedit.org/plugins/?CscopeFinder).
+* Download and install a cscope GUI or a plugin for your text editor / IDE.
+  * For [jEdit](http://www.jedit.org) there is a plugin called [CscopeFinder](http://plugins.jedit.org/plugins/?CscopeFinder).
+  * For [SublimeText](https://www.sublimetext.com) there is [SublimeCscope](https://github.com/jgust/SublimeCscope)
 
 
-* Copy [cscope_createindex.sh](uploads/17c725e19be8f4935c30c2506e168405/cscope_createindex.sh) into the main xonotic repo directory.  
+* Copy ~~[cscope_createindex.sh](uploads/17c725e19be8f4935c30c2506e168405/cscope_createindex.sh) old version~~ [cscope_createindex.bat](uploads/b8b873c3e876b01f927f24dd224c4f5d/cscope_createindex.bat) into the main xonotic repo directory.
+
+  
 
 #### Usage
 
 
 #### Usage
 
-* Run `cscope_createindex.sh` to build cscope indices for both game (QC code) and Darkplaces (C code). This step must be repeated every time you do some code changes.  
+* Configure your plugin if needed:  
+  * jEdit's CscopeFinder only needs to specify cscope.out as cscope index filename.
+  * SublimeCscope should be configured with these user settings (with Windows executable as example):
+```
+    "executable": "C:\\xonotic\\cscope.exe",
+    "prompt_before_searching": false,
+```
+
+* Run `cscope_createindex.sh` to build cscope indices for both game (QC code) and Darkplaces (C code). This step must be repeated every time you do some code changes.
+
+* Some plugins assume that your index file is generated with compression turned on (SublimeCscope's case). In this case
+`cscope_createindex.sh` can be instructed to use compression by changing compress=false to compress=true.
+
 The indices can now be used to browse code confortably with the cscope GUI of your choice.
 
 The indices can now be used to browse code confortably with the cscope GUI of your choice.
 
+
 ### QC syntax highlighting:
 
 * For jEdit: [qc.xml](https://gitlab.com/terencehill/qc-syntax-highlighting-for-jedit/blob/master/qc.xml)
 ### QC syntax highlighting:
 
 * For jEdit: [qc.xml](https://gitlab.com/terencehill/qc-syntax-highlighting-for-jedit/blob/master/qc.xml)