You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using pine-script-mode with a 4 space TAB. Here is an inner block of an if statement that is already aligned. How can I prevent adding a TAB char (or 4 space chars) when I press TAB?
pine file:
if x == 1
line1_x = 100
line2_x = 110
Here when cursor is at the beginning of the line1_x or line2_x lines and I press TAB it adds 4 spaces. Instead, since it is already aligned I want it to do nothing.
basic emacs config file:
(require'package)
(add-to-list 'package-archives
'("melpa-stable"."https://stable.melpa.org/packages/"))
(package-initialize)
(fset 'yes-or-no-p 'y-or-n-p)
(use-package pine-script-mode
:ensuret:pin melpa-stable
:mode (("\\.pine". pine-script-mode)))
(defunpine-custom-settings ()
(setq indent-tabs-mode nil)
(setq tab-width 4))
(defunc/pinescript-indent ()
"Just do dumb indentation rather than emacs' relative indentation."
(setq indent-tabs-mode nil)
(setq tab-width 4) ; this can be omitted if standard-indent is 4
(setq indent-line-function 'insert-tab))
(add-to-list 'indent-line-ignored-functions 'insert-tab)
(add-hook 'pine-script-mode-hook 'c/pinescript-indent)
The text was updated successfully, but these errors were encountered:
I am using
pine-script-mode
with a 4 space TAB. Here is an inner block of anif
statement that is already aligned. How can I prevent adding aTAB
char (or 4 space chars) when I pressTAB
?pine file:
Here when cursor is at the beginning of the
line1_x
orline2_x
lines and I pressTAB
it adds 4 spaces. Instead, since it is already aligned I want it to do nothing.basic emacs config file:
The text was updated successfully, but these errors were encountered: