Skip to content

V and C-v not honoring indent-tabs-mode #135

Description

@function2

When editing code that uses tabs for indentation boon will insert spaces instead of \t. This happens with the function boon-open-line-and-insert when hitting Shift-v and C-v.
I do think boon should respect indent-tabs-mode since many high profile projects (such as the linux kernel) use tabs.

As a work-around, I just rebind V and C-v to leave indentation up to the mode by have a macro press TAB for me:

  ;; ad-hoc solution for boon V and C-v to use proper indent tabs in coding styles.
  ;; rebind from boon-open-next-line-and-insert
  (fset 'my-boon-shift-v
    (kmacro-lambda-form [?\C-e ?\C-j tab ?v] 0 "%d"))
  (define-key boon-command-map "V" 'my-boon-shift-v)
  ;; rebind from boon-open-line-and-insert
  (fset 'my-boon-ctrl-v
    (kmacro-lambda-form [?\C-a ?\C-o tab ?v] 0 "%d"))
  (define-key boon-command-map (kbd "C-v") 'my-boon-ctrl-v)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions