Skip to content

Instantly share code, notes, and snippets.

@enisozgen
Last active January 28, 2019 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enisozgen/e0ad9c9c52df5cb09f57832c57a3f7d1 to your computer and use it in GitHub Desktop.
Save enisozgen/e0ad9c9c52df5cb09f57832c57a3f7d1 to your computer and use it in GitHub Desktop.
Emacs lisp code that automaticaly uppercase acronyms
;; Auto upper case or camel case AWS related acronyms and words
;; stop asking whether to save newly added abbrev when quitting emacs
(setq save-abbrevs nil)
;; org-hook
(add-hook 'org-mode-hook (lambda () (abbrev-mode 1)))
(define-abbrev-table 'org-mode-abbrev-table
'(
("cfn" "CloudFormation" nil nil t)
("CFN" "CloudFormation" nil nil t)
("dynamodb" "DynamoDB" nil nil t)
("cloudfront" "CloudFront" nil nil t)
("codedeploy" "CodeDeploy" nil nil t)
("codepipeline" "CodePipeline" nil nil t)
("elasticache" "ElastiCache" nil nil t)
("cloudsearch" "CloudSearch" nil nil t)
("mib" "MiB" nil nil t)
("workdocs" "WorkDocs" nil nil t)
("workmail" "WorkMail" nil nil t)
("cloudwatch" "CloudWatch" nil nil t)
("mapreduce" "MapReduce" nil nil t)
("cloudtrail" "CloudTrail" nil nil t)
("ddos" "DDoS" nil nil t)
("kinesis" "Kinesis" nil nil t)
("firehose" "Firehose" nil nil t)
("analytics" "Analytics" nil nil t)
("redshift" "Redshift" nil nil t)
("elasticsearch" "Elasticsearch" nil nil t)
("lambda" "Lambda" nil nil t)
("glacier" "Glacier" nil nil t)
)
"Manual
Abbrev Table used in `org-mode'")
(define-abbrev-table 'org-mode-abbrev-table
(mapcar #'(lambda (v) (list v (upcase v) nil nil t))
'("acl" "ami" "arn" "asg" "aws" "az" "cdn" "cli" "cmk" "csp" "dns" "ec2" "ecs" "ecu" "efs" "efs" "efs" "emr" "es" "hdd" "hsm" "hvm" "iaas" "iam" "icmp" "isp" "kms" "mfa" "mta" "nat" "nfs" "olap" "pat" "ram" "rds" "rfc" "s3" "saas" "saml" "sdk" "ses" "ses" "sla" "smtp" "sns" "soa" "soap" "spf" "sql" "sqs" "sqs" "sse" "sse" "sts" "swf" "tls" "ttl" "vgp" "vlan" "vm" "vpc" "vpn" "waf" "wam" "wam" "wsdl" "mac" "ip" "api" "os" "alb" "elb" "eip")))
;; For more
;; http://blog.nguyenvq.com/blog/2013/07/26/automatically-capitalize-or-uppercase-or-expand-keywords-in-emacs-using-abbrev-mode/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment