Skip to content

Ortus-Solutions/sublimetext-lucee

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lucee Package for Sublime Text

Sublime Text 3 dev build 3092+ only

This package was developed from the following packages:

It includes syntax highlighting for both the new Lucee 5 dialect and the current CFML dialect. It recognizes the following file extensions: lucee,lc,cfm,cfml,cfc. It also has function and tag completions.

Installation must currently be done manually by downloading the repository and placing it in a folder within your Sublime packages folder.

Key Bindings

In tag attributes, script strings, and between cfoutput tags, pressing # will automatically be escaped ## if there is no cursor selection, or it will wrap the currently selected text #selected#.

CTRL+ALT+D will output a dump tag or writeDump()/dump() function, wrapping any currently selected text.

CTRL+ALT+A will output an abort tag.

If SublimeText's auto_close_tags setting is true, when a closing tag's / has been pressed, the closing tag will be completed. (Hopefully not closing cfset tags and the like.)

CFDocs Tag and Function Documentation

CTRL+F12 pressed when the cursor is within a built-in function or tag will load the http://cfdocs.org documentation for that function or tag in a pop up window within Sublime. For example, having the cursor anywhere within dateFormat(myDate, "yyyy-mm-dd") and pressing CTRL+F12 will trigger a pop up displaying the documentation for dateFormat. Similarly, having the cursor anywhere within <cfinclude template="myOtherTemplate.cfm"> and pressing CTRL+F12 will trigger the display of the documention for cfinclude.

Note: If a tag has a script expression in it (e.g. <cfset myVar=false>, or anything between #'s), the pop up will not be triggered if the cursor is within that expression.

Completions

Completions are included for tags and tag attributes, as well for built-in functions and member functions. There is also the ability on a per project basis, via the .sublime-project file, to index folders of components, and then completions will be offered after typing a . if the preceding text matches a component file, or component file and containing directory (as DI/1 has it). So, for example, if a services/user.cfc file is found, then when typing either user. or userService., the functions from that cfc will be offered as completions. To set this up you add the following setting to your project file: "model_completion_folders": [ "/full/path/to/model", "/another/full/path/to/index" ].

Installation

Locate your Sublime Text 3 packages directory. This can be easily done by opening the command palette in Sublime Text (CTRL+SHIFT+P on Windows, CMD+SHIFT+P on a Mac), and running Preferences: Browse Packages.

On Windows it will typically be something like this: C:\Users\Username\AppData\Roaming\Sublime Text 3\Packages

On a Mac it will be something like this: /Users/Username/Library/Application Support/Sublime Text 3/Packages/

Via Git

Open Terminal or Command Prompt and cd into your packages directory, then run:

git clone https://github.com/jcberquist/sublimetext-lucee.git

You can optionally specify a subdirectory name to clone into by adding it to the git clone command. For example, to clone into a folder named Lucee run:

git clone https://github.com/jcberquist/sublimetext-lucee.git ./Lucee

Or you can leave it as is, and it will clone into sublimetext-lucee.

That's it, restart Sublime Text 3 - if you want to update the code to match this repo, simply run the following inside the folder where you installed the package:

git pull origin master

Manually

Use the Download ZIP option to download a zip of the repository to your computer. Unzip this, and copy the repository folder into your Sublime Text packages directory. You can leave the folder name as is, or rename it (e.g. to Lucee).

About

Lucee package for SublimeText

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.3%
  • ColdFusion 21.6%
  • JavaScript 15.6%
  • HTML 2.5%