Skip to content

dryman/felix-emacs-config

Repository files navigation

Felix's minimal Emacs configs

To use it, just put this in your .emacs file:

(load-file "~/.emacs.d/init.el")

Dependencies

Most of the dependency files are archinved in the elpa directory; however, if you need the list, here it is:

  • evil
  • evil-surround
  • evil-numbers
  • projectile
  • exec-path-from-shell
  • expand-region
  • markdown-mode
  • powerline
  • redo+
  • gnuplot
  • magit

Keybindings

Now I use evil mode, so smart-window keybindings are no longer needed.

  • control + = is expand region
  • C-h is backspace
  • C-x? is help
  • s-m toggle menubar
  • s-backtick switch to other frame
  • M-' toggle comment on line
  • M-; toggle comment
  • M-space hippie expand (for example, filenames)

projectile

  • C-c p f Display a list of all files in the project. With a prefix argument it will clear the cache first.
  • C-c p F Display a list of all files in all known projects.
  • C-c p g Display a list of all files at point in the project. With a prefix argument it will clear the cache first.
  • C-c p 4 f Jump to a project's file using completion and show it in another window.
  • C-c p 4 g Jump to a project's file based on context at point and show it in another window.
  • C-c p d Display a list of all directories in the project. With a prefix argument it will clear the cache first.
  • C-c p 4 d Switch to a project directory and show it in another window.
  • C-c p 4 a Switch between files with the same name but different extensions in other window.
  • C-c p T Display a list of all test files(specs, features, etc) in the project.
  • C-c p l Display a list of all files in a directory (that's not necessarily a project)
  • C-c p s g Run grep on the files in the project.
  • M-- C-c p s g Run grep on projectile-grep-default-files in the project.
  • C-c p v Run vc-dir on the root directory of the project.
  • C-c p V Browse dirty version controlled projects.
  • C-c p b Display a list of all project buffers currently open.
  • C-c p 4 b Switch to a project buffer and show it in another window.
  • C-c p 4 C-o Display a project buffer in another window without selecting it.
  • C-c p a Switch between files with the same name but different extensions.
  • C-c p o Runs multi-occur on all project buffers currently open.
  • C-c p r Runs interactive query-replace on all files in the projects.
  • C-c p i Invalidates the project cache (if existing).
  • C-c p R Regenerates the projects TAGS file.
  • C-c p j Find tag in project's TAGS file.
  • C-c p k Kills all project buffers.
  • C-c p D Opens the root of the project in dired.
  • C-c p e Shows a list of recently visited project files.
  • C-c p E Opens the .dirs-local.el file of the project.
  • C-c p s s Runs ag on the project. Requires the presence of ag.el.
  • C-c p ! Runs shell-command in the root directory of the project.
  • C-c p & Runs async-shell-command in the root directory of the project.
  • C-c p c Runs a standard compilation command for your type of project.
  • C-c p P Runs a standard test command for your type of project.
  • C-c p t Toggle between an implementation file and its test file.
  • C-c p 4 t Jump to implementation or test file in other window.
  • C-c p z Adds the currently visited file to the cache.
  • C-c p p Display a list of known projects you can switch to.
  • C-c p S Save all project buffers.
  • C-c p m Run the commander (an interface to run commands with a single key).
  • C-c p ESC Switch to the most recently selected Projectile buffer.

Orgmode publish setup

On my different desktop/laptop I store the org projects at different directories, yet I don't want to maintain complicated org-publish-project-alist separately. Hence I created a small utility to generate org-publish-project-alist. It takes a nested list as the argument, where the inner list specifies the project name, base directory, and optionally an output directory. If the output directory is not specified, by default it publishes to base-dir/public_html.

(setq org-publish-project-alist
      (build-org-publish-alist
       '((web-site "~/web-site" "/var/www/html")
         (notes "~/org-projects/notes"))))

Using this setup, you can run the org-publish command with the project names web-site and notes.

Deprecated stuffs

  • jabber
  • w3m
  • haskell-mode
  • tuareg (ocaml)
  • projectile
  • capslock ring bell

capslock ringbell

Build keyboard leds and put it on your path.

(setq ring-bell-function
      (lambda ()
        (call-process-shell-command "keyboard_leds -c1; keyboard_leds -c0" nil 0 nil)))

I choose to remove it to remove build dependencies.

License

Copyright (c) 2016 Felix Chern This config is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This config is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along with
OPIC.  If not, see <http://www.gnu.org/licenses/>.

About

Felix's minimal emacs config

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published