Skip to content

leodag/smart-delete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

smart-delete

Handle backspace/delete like IntelliJ IDEs.

When smart-delete-mode is enabled, do a smart delete, unless:

  • Called with an argument
  • Inside a string literal
  • Have non-spacing characters before/after point (for backward/forward deletes, respectively)

Deletes region when region is active and delete-active-region is non-nil.

A smart delete consists of:

When smart deleting backward:

  • If after indentation level, go back to indentation
  • If at or before indentation level, delete to end of previous line

When smart deleting forward:

  • Delete spaces after point
  • Smart delete backward at next line

Usage:

(smart-delete-mode 1)

About

IntelliJ-like backspace/delete

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published