Jump to content

Komodo Edit: Difference between revisions

From Wikibooks, open books for an open world
[unreviewed revision][checked revision]
Content deleted Content added
needs format
 
(20 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Formatting}}{{TOCright}}

Komodo Edit is a free and open-source cross-platform text editor for a variety of programming languages.

==Commands for Common Tasks==
==Commands for Common Tasks==
<h3>Connect to Remote Server</h3>
===Connect to Remote Server===
Click Edit=&gt;Preferences=&gt;Servers
Click Edit=&gt;Preferences=&gt;Servers
Enter server URL
Enter server URL
Enter user name and password
Enter user name and password


<h3>Browse Remote Server</h3>
===Browse Remote Server===
Download and Install the "Remote Drive Tree" add-on
Download and Install the "Remote Drive Tree" add-on
Click the tab icon labeled "Show Specific Sidebar/Tab"
Click the tab icon labeled "Show Specific Sidebar/Tab"
Line 63: Line 67:
* [http://community.activestate.com/forum/format-document-script Script Formatting Macro]
* [http://community.activestate.com/forum/format-document-script Script Formatting Macro]
* [http://community.activestate.com/node/4055 CSS Formatting Macro]
* [http://community.activestate.com/node/4055 CSS Formatting Macro]
* [http://kaioa.com/node/102 Three Handy Komodo Macros]
* [http://community.activestate.com/forum/macro-start-remote-debugging-current-file Macro to start remote debugging for current file]
* [http://community.activestate.com/forum/there-shellexecute-funtion-or-similar-inside-javascript-macros ShellExecute Macro]


==Profile Customization==
==Profile Customization==
Line 93: Line 100:
Right Click the Snippet you want to modify
Right Click the Snippet you want to modify
Click Properties
Click Properties
Add [[%s]] between the tag to wrap the snippet around the selected text
Add %s between the tag to wrap the snippet around the selected text
\n is not needed to insert carriage returns as in Find/Replace. Use the enter key instead
\n is not needed to insert carriage returns as in Find/Replace. Use the enter key instead
To simply wrap a selection, check "Maintain indentation context after selection", then uncheck "Maintain selected text or cursor position after insertion". For example:
* HTML Comments Snippet:


<pre>
&lt;!--
[[%s]]
--&gt;
</pre>

* JavaScript/CSS Comments Snippet:
<pre>
/*
[[%s]]
*/
</pre>
<h3>Extension Usage</h3>
<h3>Extension Usage</h3>
To Install Extensions, click and drag the .xpi link to the Komodo window
To Install Extensions, click and drag the .xpi link to the Komodo window
Line 129: Line 150:
* [http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/src/codeintel/lib/codeintel2/catalogs/html5.cix?rev=5688 HTML5 API catalog .cix updates for 2D Canvas, Microdata, Web messaging, activeElement, hasFocus, getContext]
* [http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/src/codeintel/lib/codeintel2/catalogs/html5.cix?rev=5688 HTML5 API catalog .cix updates for 2D Canvas, Microdata, Web messaging, activeElement, hasFocus, getContext]


<h4>Preview in Browser</h4>
Use a Run Command to add a customized Preview to the toolbar:
* [http://docs.activestate.com/komodo/7.0/tutorial/runcmdtut.html#file Open current HTML file in a Web browser]
Use a Macro to call the [http://docs.activestate.com/komodo/7.0/komodo-js-api.html pickPreview method] programmatically:
pickPreview("//foo.com", "en", "setting", "chrome")
<h4>Parameters</h4>
<h4>Parameters</h4>


Line 147: Line 173:
<h4>Windows Profile Location for Exporting Settings</h4>
<h4>Windows Profile Location for Exporting Settings</h4>
(Drive):\Documents and Settings\(username)\Application Data\ActiveState\Komodo\(version)\prefs.xml
(Drive):\Documents and Settings\(username)\Application Data\ActiveState\Komodo\(version)\prefs.xml
or
(Drive):\Documents and Settings\(username)\AppData\Local\ActiveState\Komodo\(version)\prefs.xml

<h4>GNU/Linux settings file location</h4>
~/.komodoedit/(version)/prefs.xml


<h4>XUL/RDF Tweaks for Extensions</h4>
<h4>XUL/RDF Tweaks for Extensions</h4>
Line 165: Line 196:


Find and Replace: Ctrl + H
Find and Replace: Ctrl + H

Replace All: Alt + A

Interactive Find: Ctrl + I


Make Uppercase: Ctrl + U
Make Uppercase: Ctrl + U
Line 193: Line 228:


==References==
==References==

{{Wikipedia}}
* [https://community.komodoide.com/ The official forums for Komodo IDE and Komodo Edit]
* [http://mateusz.loskot.net/2006/01/15/running-pylint-from-komodo/ Running PyLint from Komodo]
* [http://mateusz.loskot.net/2006/01/15/running-pylint-from-komodo/ Running PyLint from Komodo]
* [http://community.activestate.com/tags/spellcheck Installing New Dictionaries for Spellchecking]
* [http://community.activestate.com/tags/spellcheck Installing New Dictionaries for Spellchecking]
Line 201: Line 239:
* [http://www.ohloh.net/tags/komodo?page=2 Komodo Extensions]
* [http://www.ohloh.net/tags/komodo?page=2 Komodo Extensions]
* [http://community.activestate.com/faq/komodo-file-locations Komodo File Locations]
* [http://community.activestate.com/faq/komodo-file-locations Komodo File Locations]
* [http://community.activestate.com/faq/dealing-side-side-problems-windows Dealing with Problems in Windows]
* [http://docs.activestate.com/komodo/5.1/macros.html Komodo Macro Documentation]
* [http://docs.activestate.com/komodo/5.1/macros.html Komodo Macro Documentation]
* [http://virtuelvis.com/archives/2007/03/komodo-addins Komodo Add-Ons]
* [http://virtuelvis.com/archives/2007/03/komodo-addins Komodo Add-Ons]
Line 219: Line 258:
* [http://community.activestate.com/faq/debug-udl-language-styling UDL Debugging Macro]
* [http://community.activestate.com/faq/debug-udl-language-styling UDL Debugging Macro]
* [http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk/src/udl/udl OpenKomodo UDL Repository]
* [http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk/src/udl/udl OpenKomodo UDL Repository]
* [http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/src/chrome/komodo/content/project/peMacro.js JavaScript Macro API Source]
* [http://www.scintilla.org/ScintillaDoc.html Scintilla Documentation]
* [http://www.scintilla.org/ScintillaDoc.html Scintilla Documentation]
* [http://code.google.com/p/vacuproj/wiki/SciMozNotes SciMoz Notes]
* [http://code.google.com/p/vacuproj/wiki/SciMozNotes SciMoz Notes]
Line 232: Line 272:
* [http://community.activestate.com/xpi/tweak-ui TweakUI]
* [http://community.activestate.com/xpi/tweak-ui TweakUI]
* [http://community.activestate.com/xpi/colortab ColorTab]
* [http://community.activestate.com/xpi/colortab ColorTab]
* [http://community.activestate.com/xpi/html-toolkit HTML Toolkit]</b>
* [http://community.activestate.com/xpi/html-toolkit HTML Toolkit]
* [http://xpcomviewer.mozdev.org/ XPCOMViewer]

* [http://community.activestate.com/xpi/Uploader Uploader]
* [http://community.activestate.com/xpi/Uploader Uploader]
* [http://community.activestate.com/forum-topic/naturaldocs-extension NaturalDocs]
* [http://community.activestate.com/forum-topic/naturaldocs-extension NaturalDocs]
Line 271: Line 311:
* [http://community.activestate.com/faq/komodo-4-0-extensions Extension FAQ]
* [http://community.activestate.com/faq/komodo-4-0-extensions Extension FAQ]


{{Subjects|Utility software}}
{{Shelves|Utility software}}
{{Status|25%}}
{{Booklet}}

Latest revision as of 01:58, 1 February 2024

Komodo Edit is a free and open-source cross-platform text editor for a variety of programming languages.

Commands for Common Tasks

[edit | edit source]

Connect to Remote Server

[edit | edit source]

Click Edit=>Preferences=>Servers Enter server URL Enter user name and password

Browse Remote Server

[edit | edit source]

Download and Install the "Remote Drive Tree" add-on Click the tab icon labeled "Show Specific Sidebar/Tab" Select Servers from the dropdown list

Bookmark Remote Server Directories

Click Toolbox=>Add=>New Live Folder Browse to Dev Server Mapped Drive Browse to remote folder on Remote Drive

Bookmark Line Number

Go to the line Hold Ctrl Key while pressing F2 Use carriage return on adjacent lines instead of current line to preserve mapping between bookmark and current text

Check Spelling

Click Tools=>Check Spelling

Check Hex Colors

Hold Ctrl key while mousing over color code

Goto Color Picker

Hold Ctrl key and click color code

Goto URL

Hold Ctrl key and click URL

Compare Changes to Last Save

Right click anywhere on the file Click Show Unsaved Changes

Copy File Path

Right click anywhere on the file Click Create Mapped URI Copy the path of the file

Open the Containing Folder of the Current File

Click the tab of the a file located in the folder Click File=>Open

Macro Creation

Profile Customization

[edit | edit source]

Macro Usage

Click Tools=>Macros=>Start Recording Execute the set of commands you want to save Click Tools=>Macros=>Stop Recording Double Click the new macro at the bottom of the Toolbox

Tidy/Beautifier Command Usage

Create a tidy config file Select the text you want to format in the current file Click Tools=>Run Command Enter the tidy command in the text field: tidy -config {tidy_configxyz} Check the Pass Selection and Insert Output checkboxes Click Run

Kdiff/Beyond Compare/X-Winmerge Usage

Click Tools=>Run Command Click "More" Click "Add to Toolbox" to save it as a shortcut Select "No Console" next from the dropdown next to the Run In option Add the Kdiff.exe/BCompare.exe/Xwinmerge.exe location to the PATH environment variable Type in the HTTP address of the SVN/Mercurial/Git repo, or go to the local repo root using the "Browse" button Run the application: BCompare.exe %F %f

Snippet Usage

Open Toolbox in the right sidebar Right Click the Snippet you want to modify Click Properties Add %s between the tag to wrap the snippet around the selected text \n is not needed to insert carriage returns as in Find/Replace. Use the enter key instead To simply wrap a selection, check "Maintain indentation context after selection", then uncheck "Maintain selected text or cursor position after insertion". For example:

  • HTML Comments Snippet:
 <!--
 [[%s]]
 -->
  • JavaScript/CSS Comments Snippet:
 /*
 [[%s]]
 */

Extension Usage

To Install Extensions, click and drag the .xpi link to the Komodo window

Click the tab icon labeled "Show Specific Sidebar/Tab" Select the Add-On from the Projects or Toolbox dropdown list

Find/Replace Usage

Use the MoreKomodo extension to save replacement patterns as favorites Use the HTML Entities extension to quickly replace punctuation in HTML Replace $ with \ when porting regular expression backreferences from Perl Use \n to insert carriage returns with replacement text

Configuration

Disable unused Add-Ons and Plugins to speed up startup Use View=>Preview in Browser on a saved HTML file, then type about:config into the address bar to open the configuration menu If available, the View About:Config macro in the Snippets toolbar also opens the configuration menu. Here is the script

try 
 {
 ko.open.URI('about:config','browser');
 }
catch(e) 
 {
 alert(e);
 }

API Catalogs for Code Intelligence

Search for .cix files under path where Komodo is installed

Replace existing .cix file with the matching update listed here:

Preview in Browser

Use a Run Command to add a customized Preview to the toolbar:

Use a Macro to call the pickPreview method programmatically:

pickPreview("//foo.com", "en", "setting", "chrome")

Parameters

app.update.enabled: Automatic update check

app.update.interval: The value in seconds between automatic update checks

extensions.update.enabled: Automatic update check for extensions

extensions.update.interval: The value in seconds between automatic update checks for extensions

general.warnOnAboutConfig: Toogle About:config warning message

Windows Profile Location for Exporting Settings

(Drive):\Documents and Settings\(username)\Application Data\ActiveState\Komodo\(version)\prefs.xml or (Drive):\Documents and Settings\(username)\AppData\Local\ActiveState\Komodo\(version)\prefs.xml

GNU/Linux settings file location

~/.komodoedit/(version)/prefs.xml

XUL/RDF Tweaks for Extensions

Copy morekomodo.rdf from the extensions/morekomodo folder to the XRE folder to retain MoreKomodo Favorites after version updates

Edit kjslint.js and kjslint.xul to set default values for KjsLint

Keyboard Shortcuts

[edit | edit source]

Goto Line: Ctrl + G

Goto End of Current Block: Ctrl + ]

Goto End of Current Word: Ctrl + Shift + →

Select the Current Block: Ctrl + Shift + ]

Hide/Show Line Numbers: Ctrl + Shift + 4

Find and Replace: Ctrl + H

Replace All: Alt + A

Interactive Find: Ctrl + I

Make Uppercase: Ctrl + U

Make Lowercase: Ctrl + Shift + U

Comment out Selection: Ctrl + 3

Decrease Selection Indent: Alt + C + D

Google the text that the cursor is on: Shift + F1

Toolbox Selection Properties: Alt + Enter

File Properties: Alt + E + L

Save: Ctrl + S

Open: Ctrl + O

Toggle Bookmark: Ctrl + F2

Next Bookmark: F2

Previous Bookmark: Shift + F2

Delete Bookmarks: Ctrl + Shift + F2

References

[edit | edit source]

Extensions