CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 915
FAQ
- Installation
- Configuration: Uses 0.7.0 flat vector format
- Miscellaneous
There are two potential issues pertaining to the path of the directory in which LT is installed on Windows computers:
- Upgrade fails when installed in Program Files under Windows 7 · Issue #1749
- "Unable to access jarfile "...\lein-light-standalone.jar"" on Windows 7 when running from path with a space in a directory name · Issue #2029
Because of those issues you should install LT in a top-level directory or another directory whose path does not contain spaces.
The first issue should also be resolved by granting your Windows user, or an appropriate group of which it's a member, Modify permissions (at least) for the sub-directory of Program Files in which you copy the LT files.
Add a :lt.objs.plugins/load-js
behavior to your user.behaviors
to load javascript files. For example:
[:app :lt.objs.plugins/load-js "/Users/me/full/path/to/my.js"]
Argument for behavior might be a string or a vector of strings.
Put your css in a file and insert the :lt.objs.plugins/load-css
into your user.behaviors:
[:app :lt.objs.plugins/load-css "/full/path/to/my.css"]
Argument for behavior must be a string.
Add a :lt.objs.files/file-types
behavior to your user.behaviors
. For example, to define a filetype .foo
:
[:files :lt.objs.files/file-types [{:name "foo" :exts [:foo] :mime "text/x-foo" :tags [:editor.foo]}] ]
:exts
also works for filenames. For example, a Ruby plugin could have :exts [:Rakefile :Gemfile :config.ru :rb]
where the first three are filenames.
To use LightTable offline, add the following behaviors to respective sections in your user.behaviors
:
[:app :lt.objs.metrics/disable-metrics]
[:app :-lt.objs.deploy/check-version]
Add the following snippet to Settings: User keymap
.
[:editor.keys.vim.normal ">" :paredit.grow.right]
[:editor.keys.vim.normal "<" :paredit.shrink.right]
[:editor.keys.vim.normal "cmd-shift-," :paredit.shrink.left]
[:editor.keys.vim.normal "cmd-shift-." :paredit.grow.left]
Add the following to Settings: User behaviors
.
[:app :-lt.objs.intro/show-intro]
Add the following to Settings: User behaviors
.
[:app :-lt.objs.menu/create-menu]
[:app :-lt.objs.menu/set-menu]
[:window :-lt.objs.menu/set-menu]
Add the following to Settings: User behaviors
to cause LightTable to go full screen at startup:
[:app :lt.objs.app/run-on-init [:window.fullscreen]]
Add the following to Settings: User behaviors
to open the console as a tab automatically at startup:
[:app :lt.objs.app/run-post-init [:console-tab]]
Note that some commands can be added to the run-on-init
behavior but other commands are sensitive to start up order and will only work in the run-post-init
behavior - :console-tab
is an example of such a command.
Add the following snippet to Settings: User behaviors
.
[:app :lt.objs.style/font-settings "Courier New" "11"]
[:app :lt.objs.app/set-default-zoom-level 2]
Add the following snippet to Settings: User behaviors
.
;; 2 2 is tab size in spaces and spaces per indent
[:editor :lt.objs.editor/tab-settings false 2 2]
If you use 0.8.0-alpha or greater add this:
;; Draw a ruler at 80 chars
[:editor :lt.objs.editor/set-rulers]
;; Or specify multiple rulers
[:editor :lt.objs.editor/set-rulers [{:lineStyle "dashed" :color "#aff" :column 80}
{:lineStyle "dashed" :color "#aff" :column 120}]]
To have the following characters {[("
auto pair, add the following snippet to Settings: User behaviors
.
[:app :lt.objs.settings/pair-keymap-diffs]
For example, to eval the whole file when a clojurescript file is saved, add the following snippet to Settings: User behaviors
.
[:editor.clojurescript :lt.objs.editor.file/on-save :eval-editor]
Set the $http_proxy
and $https_proxy
environment variables. Support for this was added in #1451.
How do I set the default Clojure version when running Instarepl outside of the context of a Clojure project?
Update plugins/clojure/runner/resources/project.clj
by adding/changing :dependencies \[\[org.clojure/clojure "x.x.x" ]]
where x.x.x
is of course the Clojure version you want to use by default in your Instarepl sessions whenever LightTable doesn't run in the context of a Clojure project (i.e. double clicking on a shortcut on the desktop to run LightTable).
- Add
lein-light-nrepl
as a dependency to your project (See Clojure README section for more). - Start your lein repl:
$ lein repl :headless
nREPL server started on port 59305 on host 127.0.0.1
- Using the command bar, execute the command
Connect: Add Connection
. Select theClojure (remote nREPL)
connection and specify the port from your repl session. For the above example this would belocalhost:59305
.
Right click it and choose Show docs
. Alternatively, use Ctrl-d
which is bound to toggle docs.
Run the Dev: Open Developer Tools
command, also known as :dev-inspector command. More info here
Let's say you want to customize the console fonts. If you look for the console ui, you'll see its selector is $('ul.console')
. If you pull up the dev-inspector command, you can inspect the element and try some styles on it. Once you're satisfied with how it looks, transfer those styles to a css file and load the css file at startup.
Open the dev-inspector. Click the console button in the lower left and type inspect($('#browser iframe').contentDocument)
. This will open up the inspector right to the element containing a page's html.
cd
to your plugins directory. If you don't know your plugins directory, execute the command App: Light Table version
. From there, rm the current plugin, git clone https://github.com/USER/PLUGIN
and git checkout
to a specific version if desired.
Many (though not all) of the OS X hotkeys mentioned in the Light Table documentation use the cmd key instead of ctrl.
When in doubt, you can look up the key sequence by name by pressing ctrl-space (yes, it's really ctrl on this one) and then typing part of the name of the command you want to use. If a key is mapped to the command, it will be printed right below the command name in the command bar.
If you create a new file outside Light Table, you need to refresh your folder in order to open it with the navigator. To do this, open your workspace pane, right click on the folder that needs refreshing and select Refresh folder
. Now you can open the new file with the navigator.
If you want to press and repeatedly fire a key e.g. hjkl
in Vim, execute this command in a shell defaults write com.kodowa.LightTable ApplePressAndHoldEnabled -bool false
. If this doesn't work for your OSX version, you will need to globally enable it defaults write -g ApplePressAndHoldEnabled -bool false
.
Light Table uses Mousetrap for key-bindings. From that page:
For modifier keys you can use
shift
,ctrl
,alt
, ormeta
.
You can substitute
option
foralt
andcommand
formeta
.
Other special keys are
backspace
,tab
,enter
,return
,capslock
,esc
,escape
,space
,pageup
,pagedown
,end
,home
,left
,up
,right
,down
,ins
,del
, andplus
.
Any other key you should be able to reference by name like
a
,/
,$
,*
, or=
.
On OSX yes. If you open any program with tmux or screen, there will be issues with the Pasteboard. This link also offers a solution in the form of brew install reattach-to-user-namespace
and following install instructions
LightTable uses CodeMirror for the underlying text editor. CodeMirror provides an extensive set of addons that can provide additional features. To use a particular addon, add a :lt.objs.editor/load-addon
behavior to your user.behaviors
. For example, to use the matchtags.js addon which highlights a matching tag, add:
[:app :lt.objs.editor/load-addon "edit/matchtags.js"]
Note that the addon path is relative to this directory where LightTable stores CodeMirror addons. Also note that LightTable lags some behind CodeMirror so the addons you see on the CodeMirror website may not be available in LightTable yet. It's possible to download an addon and use it with the :lt.objs.plugins/load-js
behavior but only if the addon can use the CodeMirror version that ships with LightTable.