Skip to content

My custom Emacs settings, optimized for Yamamoto Mitsuharu's Emacs macOS port, emacs-mac

License

Notifications You must be signed in to change notification settings

debajit/.emacs.d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Install Emacs Configuration

cd
git clone https://github.com/debajit/.emacs.d.git

Install Emacs

On macOS

brew tap railwaycat/emacsmacport
brew cask install emacs-mac

Then start Emacs.

Keyboard Shortcuts — Work in Progress

  • s represents the Super key (Command / Windows key)
  • M represents the Meta key (Option / Alt)
  • C represents the Control key

Smart Shortcuts

s-. — Open the item at Point

In programming modes, this will open the definition/declaration of the item (the function, for instance) — and s-. will take you back to where you came from.

If you’re on a filename or a hyperlink (e.g. in a comment or in a string), it will open that.

If you’re in an Org mode link to a URL or local file, it will open that instead.

s-r — Run the Code

If some code is selected, that will be run. Otherwise the entire buffer will be run by calling the appropriate interpreter/tool.

s-n — Narrow or Widen Intelligently

If you’re in a programming mode, it will narrow to the function.

In Org mode, narrows to the current sub-tree if any.

If invoked from a selection, it will narrow to that selection.

If you’re already narrowed, it will widen automatically.

Nifty Shortcuts

Edit OperationKeyNotes
Wrap in parensM-(Works without or with a selection
Fill paragraphM-qHow did we live without this? See also auto-fill-mode
Unfill paragraphM-Q“Unfill” a filled paragraph
Clear inside pairs⌘JClear a string’s contents, or clear any text inside the innermost paired characters. Nifty 😀
Align regexp⇧⌘AAlign multiple lines on a character (e.g. the equals signs in assignments). Wicked 😈
Correct last misspelt wordCommand + Enter
Git region history⇧⌘HSee the history of just the selected region. Very useful 🙂
Git diff current file⇧⌘CSee what new changes you have made to the current files.

Integration with Other Applications

OperationActionNotes
Open URLCommand + click
Look up word in DictionaryCommand + Control + D or Force TouchJust like any other native Mac app
Search selection in GoogleCommand + Shift + G
Open web bookmark in browserCommand + Shift + EnterSee webjump settings

File Operations

OperationKeyNotes
News-n
Saves-s
Open quickly from gits-tLike TextMate
Open recent files-SPCYou may need to press Command+Shift+Space as Command+Space is usually bound

Text Editing

Edit OperationKeyNotes
Undo⌘Z
Cut⌘X
Copy⌘CCopies the current line if nothing is selected
Paste⌘V
Comment⌘;The default M-; also works. Press repeatedly to toggle commenting the line vs adding the comment at the end of the line.
Delete a line⌘K
Insert line at cursor⌘O
Insert line belowOption + O

Navigation

OperationKeyNotes
Jump to methods-i
Jump to lines-lTip: Try also enabling line numbers with F8
Open hyperlinks-clickClick on the link while holding down Command

Window Management

OperationKey
Close a buffers-w
Close a panes-W
Close a windows-q
Split side-by-sides-J
Split top-to-bottoms-K
Balance windowss-:

Org-Agenda (“OmniFocus” mode)

Start Org-Agenda with Control+Shift+Space. Then press

KeyOperation
aAgenda
nAgenda with TODOs

On the Agenda screen, the following keys will work:

Special Useful Commands

KeyOperation
kEnter new task (org-capture)
AAgenda command

Customize View

KeyOperation
EShow notes on tasks
DShow diary entries like holidays

Close

KeyOperation
qClose the agenda view
xClose the agenda view and org buffers opened
sSave all org buffers opened

Filtering

KeyOperation
/, tabFilter by tag
/ /Reset filters

Clocking

KeyOperation
IClock in to a task
OClock out of a task
JJump to a task that is being clocked

Navigation

KeyOperation
.Jump to today
pMove to line below
nMove to line above
fShow timeline in the future
bShow timeline in the past

About

My custom Emacs settings, optimized for Yamamoto Mitsuharu's Emacs macOS port, emacs-mac

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published