Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Generic control the indentation level for each mode.

License

NotificationsYou must be signed in to change notification settings

jcs-elpa/indent-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL v3JCS-ELPAMELPAMELPA Stable

indent-control

Management for indentation level.

CI

Interface that combine all the indentation variables from each major modeto one giant list.

🏆 Features

  • Decouple from user knowing each major mode's indentation level variable. (if have)
  • Keep the indentation level across buffers. If you changed the indentation levelinbuffer A and switch tobuffer B with the same major mode; they will havethe same indentation level.

🔨 Usage

You can tweak variableindent-control-records to set the initialindentation level for each major mode.

(setq indent-control-records  '((actionscript-mode.4)    (c-mode.4)    (c++-mode.4)    (csharp-mode.4)    ...    (sql-mode.1)    (typescript-mode.4)    (web-mode.2)    (yaml-mode.2)))

Change indentation level

These functions will change the current indentation level for the major modethat you currently on.

  • indent-control-inc
  • indent-control-dec

You can tweak variableindent-control-delta to change the size of the oneindentation level. The default value is2.

Make indentation work across all modes

Is easy to make indentation level inherit last time modified in Emacs.Just enable the global minor modeindent-control-mode then it willautomatically records all changes from the indentation level.

This minor mode is already get called inprog-mode-hook, but with somemajor modes that they do not use inheritprog-mode will not work!You would have to manually called it in each mode's startup hook.For instanceactionscript-mode doesn't inheritprog-mode so you wouldhave to do the following.

(defunmy-actionscript-mode-hook ()"My actionscript mode hook."  (indent-control-continue-with-record))(add-hook'actionscript-mode-hook#'my-actionscript-mode-hook)

🛠️ Contribute

PRs WelcomeElisp styleguideDonate on paypalBecome a patron

If you would like to contribute to this project, you may eitherclone and make pull requests to this repository. Or you canclone the project and establish your own branch of this tool.Any methods are welcome!

🔬 Development

To run the test locally, you will need the following tools:

Install all dependencies and development dependencies:

eask install-deps --dev

To test the package's installation:

eask packageeask install

To test compilation:

eask compile

🪧 The following steps are optional, but we recommend you follow these lint results!

The built-incheckdoc linter:

eask lint checkdoc

The standardpackage linter:

eask lint package

📝 P.S. For more information, find the Eask manual athttps://emacs-eask.github.io/.

⚜️ License

This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.

This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.

You should have received a copy of the GNU General Public Licensealong with this program. If not, seehttps://www.gnu.org/licenses/.

SeeLICENSE for details.

About

Generic control the indentation level for each mode.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

  •  
  •  

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp