1

I tried to override it by putting (:lt.objs.editor/tab-settings false 2 2) in the editor section of my user.behaviors, but it doesn't change anything. Everytime I press enter within for example <head> tag of my html file, I get 4 spaces indent. I've been googling it for about half an hour now. Do you know what am I doing wrong?

I'm on the OS X version. Here's my whole user.behaviors:

{:+ {
 ;; The app tag is kind of like global scope. You assign behaviors that affect
 ;; all of Light Table here
 :app [(:lt.objs.style/set-skin "dark")]

 ;; The editor tag is applied to all editors
 :editor [:lt.objs.editor/no-wrap
          (:lt.objs.style/set-theme "default")
          (:lt.plugins.vim/activate-vim)
          (:lt.objs.editor/tab-settings false 2 2)]

 ;; Here we can add behaviors to just clojure editors
 :editor.clojure [(:lt.plugins.clojure/print-length 1000)]}

;; You can use the subtract key to remove behavior that may get added by
;; another diff
:- {:app []}}
Michał Siwek
  • 794
  • 1
  • 10
  • 25

2 Answers2

2

I got the answer from Chris Ganger:

set it for editor.html

So the right way is

 :editor.html [(:lt.objs.editor/tab-settings false 2 2)]

Edit: For newer versions of Lighttable the correct syntax is

[:editor.html :lt.objs.editor/tab-settings false 2 2]
jdl
  • 17,702
  • 4
  • 51
  • 54
Michał Siwek
  • 794
  • 1
  • 10
  • 25
  • A note on my edit. "Newer than what?" I have no idea. I just know that the code wasn't working anymore, but what I added above makes Lighttable behave as expected. – jdl Mar 18 '15 at 02:16
1

As of April 2015, the accepted answer didn't work for me, but the LightTable FAQ's incantation took effect right away:

;; 2 2 is tab size in spaces and spaces per indent
[:editor :lt.objs.editor/tab-settings false 2 2]

LightTable 0.7.2 (binary 0.8.4) on OS X 10.10.3.

Merlin
  • 131
  • 5