https://github.com/jscheid/dtrt-indent
A minor mode that guesses the indentation offset originally used for creating source code files and transparently adjusts the corresponding settings in Emacs, making it more convenient to edit foreign files.
https://github.com/jscheid/dtrt-indent
Last synced: about 1 year ago
JSON representation
A minor mode that guesses the indentation offset originally used for creating source code files and transparently adjusts the corresponding settings in Emacs, making it more convenient to edit foreign files.
- Host: GitHub
- URL: https://github.com/jscheid/dtrt-indent
- Owner: jscheid
- Created: 2013-01-26T20:57:15.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2025-01-30T17:02:51.000Z (over 1 year ago)
- Last Synced: 2025-04-02T03:17:49.447Z (about 1 year ago)
- Language: Emacs Lisp
- Size: 244 KB
- Stars: 188
- Watchers: 8
- Forks: 32
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - jscheid/dtrt-indent
README
# dtrt-indent
An Emacs minor mode that guesses the indentation offset originally used for creating source code files and transparently adjusts the corresponding settings in Emacs, making it more convenient to edit foreign files.
You can install dtrt-indent from MELPA.
To activate it, M-x customize-variable dtrt-indent-global-mode, and turn on
"Dtrt Indent Global Mode". See `dtrt-indent.el` for full documentation.
# Related work
[guess-style](https://nschum.de/src/emacs/guess-style/) is similar to dtrt-indent, but only supports `cc-mode`, and only guesses offsets of 2, 4 and 8.
[vim-sleuth](https://github.com/tpope/vim-sleuth) provides similar functionality for Vim.