Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
function2 opened this issue Apr 30, 2023 · 1 comment
Open

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

function2 opened this issue Apr 30, 2023 · 1 comment

Comments

@function2
Copy link

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)
@function2
Copy link
Author

actually I don't think it's possible for boon to get the correct indentation for boundary conditions where the newly opened line has different indent length

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant