felixvo / vimtoemacs

an emacs configuration for vim user

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vim to Emacs, a simple configuration that won't blow your mind

Emacs - An extensible, customizable, free/libre text editor

Emacs overview

I'm a vim user but I'm learning Clojure now, so I decided to give emacs a try.
If you have no idea what Emacs is, I recommend you to check these guide before continue

Key Prefix meaning:

  • C: Control
  • M: Alt/Option
  • s: Command/Window
  • C-c: Hold Control and c

You don't have to remember all the command, the list below is enough:

  • M-x: execute extended command.
  • C-x C-c: quit emacs
  • C-g: cancel, like Esc in vim
  • C-x C-f: open file
  • C-x b: switch buffers

Install Emacs

The configuration file

Download the config file and save it in your home dir ~/.emacs

curl https://raw.githubusercontent.com/felixvo/vimtoemacs/master/init.el>~/.emacs

Then open your emacs. Hopefully, you will see the UI below

Emacs overview

projectile-discover-projects

basiclly this step will tell emacs where is your projects

To add a project to Projectile's list of known projects, open a file in the project. If you have a projects directory, you can tell Projectile about all of the projects in it with the command M-x projectile-discover-projects-in-directory
Projectile Docs

emacs project discover

Usage

  1. window management the vim way
  • :vs horizontal split
  • :sp vertical split
  • C-w C-w or C-h/j/k/l: switch around window
  • :close or C-x 0: close current window
  • C-x 1: close other windows emacs window
  1. manage open buffers
  • C-p: show list buffer and recent files (helm-mini window)
  • C-x C-b: list buffer
  • s-p (command+p): list buffer in project
  • :bd: close buffer
  • :bn/:bp: next/previous buffer ![emacs buffer](images/find buffers.png)
  1. switch project
  • s-p p (command+p p): swith project emacs switch project
  1. find files in project
  • s-p f (command+p f): find files in current project
  • s-p F (command+p F): find files in all project emacs find files in project
  1. grep in project
  • s-p s g (command+p s g): grep in current project emacs grep in project
  1. file explorer
  • C-x C-j: open file explorer in current buffer emacs file explorer
  1. helm mini
  • C-p: show list buffer and recent files (helm-mini window) emacs helm mini

you can click on projectile in the status bar below for more commands emacs projectile menu

References

highly recommend you to check out the links below for more details

About

an emacs configuration for vim user


Languages

Language:Emacs Lisp 100.0%