Skip to content

novoid/title-capitalization.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

## Time-stamp: <2018-11-04 16:44:17 vk> ## -*- mode: org; coding: utf-8 -*- ## This file is best viewed with GNU Emacs Org-mode: http://orgmode.org/

title-capitalization.el — Proper English title capitalization of a marked region

This Emacs package provides the function title-capitalization. In case you selected a region (usually a heading/title), this function does capitalize the words according to general English rules.

For details, please do read my blog entry on http://karl-voit.at/2015/05/25/elisp-title-capitalization/

Why

It is wasted brain energy to do the task by yourself.

Usage

Mark the line of your title and invoke: title-capitalization

I have mapped it to C-c C-, c via:

(global-set-key (kbd "C-c C-,") 'my-map) ;; my personal prefix/map
(define-key my-map "c" 'title-capitalization)

Bonus: Your Own List of Exceptions

You can define a variable containing a list with exceptions. For example, if you want to have ”lazyblorg” and ”mutt” not capitalized in headings, use following snippet:

;; additionally to the list defined in title-capitalization:
(defvar my-do-not-capitalize-words '("lazyblorg" "mutt")
  "My personal list of words that doesn't get capitalized in titles.")

Similar Projects

Contributions

I got the idea for this code from a script by Doug Adams.

The code contains valuable and major contributions from David Mann, Barry Fishman, Santiago Mejia, Julien Chastang, and others from the Emacs development mailinglist.

Local Variables

About

Proper English title capitalization of a marked region

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published