Skip to content

Latest commit

 

History

History
113 lines (86 loc) · 3.29 KB

emacs-linux.org

File metadata and controls

113 lines (86 loc) · 3.29 KB

Emacs for Linux

Mostly key bindings for the Super key to work as a Command key on Linux.

Key Bindings

(global-set-key (kbd "s-z") 'undo-tree-undo)
(global-set-key (kbd "s-y") 'undo-tree-redo)
(global-set-key (kbd "s-Z") 'undo-tree-redo)
(global-set-key (kbd "s-x") 'kill-region)
(global-set-key (kbd "s-c") 'kill-ring-save)
(global-set-key (kbd "s-v") 'yank)

(global-set-key (kbd "s-a") 'mark-whole-buffer)
(global-set-key (kbd "s-f") 'isearch-forward-regexp)

(global-set-key (kbd "s-o") 'ido-find-file)
(global-set-key (kbd "s-s") 'save-buffer)
(global-set-key (kbd "s-+") 'text-scale-increase)
(global-set-key (kbd "s--") 'text-scale-decrease)
(global-set-key (kbd "s-l") 'goto-line)
(global-set-key (kbd "s-w") 'bury-buffer)
(global-set-key (kbd "s-M-w") 'kill-this-buffer)

(global-set-key (kbd "s-<up>") 'beginning-of-buffer)
(global-set-key (kbd "s-<down>") 'end-of-buffer)
(global-set-key (kbd "s-<left>") 'smarter-move-beginning-of-line)
(global-set-key (kbd "s-<right>") 'move-end-of-line)

(global-set-key (kbd "M-<up>") 'backward-page)
(global-set-key (kbd "M-<down>") 'forward-page)
(global-set-key (kbd "M-<left>") 'backward-word)
(global-set-key (kbd "M-<right>") 'forward-word)

Notifications

Perhaps I would want to tie into the Linux notification system. Then again, maybe not.

Locate

While I use Apple Spotlight for indexing my text files on the Mac, on Linux, we use recoll

(setq locate-command "recoll")

Applications

GNU Global

While I can use Homebrew to install Gnu Global on the Mac, on Linux, I may need to do things old school:

First, ctags:

 if [ -d ~/Other/ctags ]
 then
   cd ~/Other
   wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz
   tar xfz ctags-5.8.tar.gz
 fi
 cd ~/Other/ctags

./configure && make && make install

And then Gnu Global:

if [ ! -d ~/Other/global-6.4 ]
then
    cd ~/Other
    wget http://tamacom.com/global/global-6.4.tar.gz
    tar xfz global-6.4.tar.gz
fi
cd ~/Other/global-6.4

./configure --with-exuberant-ctags=/usr/local/bin/ctags
make && make install

Now, the code in emacs.org should work like a charm.

Technical Artifacts

Make sure that we can simply require this library.

(provide 'init-linux)

Before you can build this on a new system, make sure that you put the cursor over any of these properties, and hit: C-c C-c