This is CoffeeScript Major Mode marging defunct's coffee-mode and python-mode's heardocs highlighting and smart delete.
basic information:https://github.com/defunkt/coffee-mode
We can set our tab-width
to two using set-coffee-tab-width
in the coffee-mode-hook
:
(defun coffee-custom ()
"coffee-mode-hook"
(set-coffee-tab-width 2))
(add-hook 'coffee-mode-hook
'(lambda() (coffee-custom)))
If we use set-coffee-tab-width
, we maybe avoid incorrect indentation bugs.
else
, switch
, when
, try
, catch
, finally
also cause the next line
to be indented a level deeper automatically.
And, this applies to lines ending in (
additionally.
Powered by python-mode's highlight heardocs solution, we highlight heardocs correctly.
Highlight lambda function, built-in function, Object's property and number literal.
When you press backspace
once:
line1()
line2()
^
delete spaces corresponding to one tab:
line1()
line2()
^
delete
is the same.
This feature is introduced from python-mode.
When you press Shift-TAB
:
line1()
line2()
^
we un-indent the line:
line1()
line2()
^
When you press C-c <
, we un-indent region.
And press C-c >
, we indent region.
- Jeremy Ashkenas for CoffeeScript
- Chris Wanstrath for coffee-mode
- Barry A. Warsaw, Tim Peters and https://launchpad.net/python-mode for python-mode