From 482097c8182933e539f8f5ff6b508519f2baed78 Mon Sep 17 00:00:00 2001 From: Tu Do Date: Fri, 14 Nov 2014 15:33:13 +0700 Subject: [PATCH 1/5] Remove helm-quick-update It is not needed anymore since helm-candidate-number-limit is small (less than several thousands). If this is the case, then there's no difference between quick update and no quick update execution time. Enabling helm-quick-update makes helm buffer flashing for every entered character to retrieve new candidate list, which would annoy user. --- spacemacs/packages.el | 1 - 1 file changed, 1 deletion(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 65e40928edc0..ddca925dbe09 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1288,7 +1288,6 @@ determine the state to enable when escaping from the insert state.") :defer t :init (setq helm-split-window-in-side-p nil - helm-quick-update t helm-bookmark-show-location t helm-buffers-fuzzy-matching t helm-always-two-windows t) From c568eee434ba95ef5164b76d46e0568c4bdef460 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Fri, 14 Nov 2014 22:22:43 -0500 Subject: [PATCH 2/5] New documentation on escaping in readme --- README.md | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4eae5a42c266..a906f6099e5d 100644 --- a/README.md +++ b/README.md @@ -739,27 +739,29 @@ They are both extended with various packages to build on their foundations. Every sequences must be performed in `normal` mode. -### Return to normal mode - -`ESC` is the default key to return to normal mode. This is one of the main -design flaw in Vim key bindings because the `ESC` key is very far from the -home row. - -The popular way to avoid this is to replace `ESC` by `jj` pressed rapidly. -Unfortunately it is pretty difficult in Emacs to keep a consistent behavior -with this sequence (same thing with `jk` or `kj`). -`Spacemacs` uses the sequence `fd` instead of `jj` which works in any Evil -state and in any buffer and in the minibuffer. +### Escaping + +`Spacemacs` uses [evil-escape][] to easily switch between `insert state` and +`normal state` with the key sequence `fd`. + +The choice of `fd` was made to be able to use the same sequence to escape from +"everything" in Emacs: +- escape from all evil states to normal state +- escape from evil-lisp-state to normal state +- abort evil ex command +- quit minibuffer +- abort isearch +- quit magit buffers +- quit help buffers +- hide neotree buffer This sequence can be customized in your `~/.spacemacs`, for instance to -revert back to the popular configuration using `jj` (not recommended) add this -to your file: +revert back to the popular configuration using `jj` (just for the example +it is not recommended) add this to your `config` function: ```elisp -(defun dotspacemacs/init () - "User initialization for Spacemacs. This function is called at the very startup." - (setq-default spacemacs-normal-state-sequence '(?j . ?j)) - (setq-default spacemacs-normal-state-sequence-delay 0.2) +(defun dotspacemacs/config () + (setq-default evil-escape-key-sequence (kbd "jj")) ) ``` @@ -1750,3 +1752,4 @@ developers to elisp hackers! [1st-clayer]: https://github.com/syl20bnr/spacemacs/commit/e802027d75d0c0aed55539b0da2dfa0df94dfd39 [1st-arctile]: http://oli.me.uk/2014/11/06/spacemacs-emacs-vim/ [100th-issue]: https://github.com/syl20bnr/spacemacs/pull/100 +[evil-escape]: https://github.com/syl20bnr/evil-escape From 734534882249ee6bf36a59328ca7fe1bf04c5e67 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Fri, 14 Nov 2014 22:30:22 -0500 Subject: [PATCH 3/5] Fix typos in contribute --- CONTRIBUTE.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index a065125e3440..1f4ad8727ee4 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -11,9 +11,9 @@ ## Pull Request Guidelines -`Spacemacs` uses the `git-flow` model, so you'll have to submit your -contributions and fixes within a pull-request to apply against the `develop` -branch. +`Spacemacs` branch model is inspired from the [git-flow][] model: You'll have +to submit your contributions and fixes within a pull-request to apply against +the `develop` branch. _PR = pull request_ @@ -41,8 +41,7 @@ Those PRs are _merged_. **Getting Help:** If you have any question on this process, join the [gitter chatroom][gitter] -and ask your questions there. Do not hesitate to ask your questions even the -simplest one, it will be a pleasure to help you to contribute! +and ask your questions there. It will be a pleasure to help you to contribute! ## Submitting a contribution layer upstream @@ -53,4 +52,9 @@ associated with them. To submit your contribution layer follow the above [guidelines](#pull-request-guidelines) for pull requests. -**Note:** by submitting a configuration layer you become the maintainer of it. +**Note:** by submitting a configuration layer you become the maintainer of it, +if you cannot maintain it anymore, no worry but I'll appreciate that you send +a message to me to warn me. + +[git-flow]: http://nvie.com/posts/a-successful-git-branching-model/ +[gitter]: https://gitter.im/syl20bnr/spacemacs From ab55be3d3599a2e51ac8f41e889d061987002a42 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Fri, 14 Nov 2014 22:43:15 -0500 Subject: [PATCH 4/5] Add evil-args and evil-jumper to the list of plugins in readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a906f6099e5d..9e182ab5aa74 100644 --- a/README.md +++ b/README.md @@ -733,6 +733,8 @@ They are both extended with various packages to build on their foundations. [evil-nerd-commenter][] | port of [nerdcommenter][] [evil-search-highlight-persist][] | emulation of hlsearch behavior [evil-numbers][] | like C-a/C-x in vim +[evil-args][] | motions and text objects for arguments +[evil-jumper][] | jump list emulation [NeoTree][neotree] | mimic [NERD Tree][nerdtree] ## Commands @@ -1715,6 +1717,9 @@ developers to elisp hackers! [vim-surround]: https://github.com/tpope/vim-surround [evil-nerd-commenter]: https://github.com/redguardtoo/evil-nerd-commenter [nerdcommenter]: https://github.com/scrooloose/nerdcommenter +[evil-escape]: https://github.com/syl20bnr/evil-escape +[evil-args]: https://github.com/wcsmith/evil-args +[evil-jumper]: https://github.com/bling/evil-jumper [evil-org-mode]: https://github.com/edwtjo/evil-org-mode [nose]: https://github.com/nose-devs/nose/ [nose.el]: https://github.com/syl20bnr/nose.el @@ -1752,4 +1757,3 @@ developers to elisp hackers! [1st-clayer]: https://github.com/syl20bnr/spacemacs/commit/e802027d75d0c0aed55539b0da2dfa0df94dfd39 [1st-arctile]: http://oli.me.uk/2014/11/06/spacemacs-emacs-vim/ [100th-issue]: https://github.com/syl20bnr/spacemacs/pull/100 -[evil-escape]: https://github.com/syl20bnr/evil-escape From 571860f51c8ab0d28227cb9cd5c869d80541a4af Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Fri, 14 Nov 2014 22:51:07 -0500 Subject: [PATCH 5/5] Add doc for -excluded-packages variable in readme --- README.md | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9e182ab5aa74..26dd1de63304 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,10 @@ for contribution guidelines_ - [Other describe functions](#other-describe-functions) - [Configuration layers](#configuration-layers) - [Structure](#structure) - - [Extensions and Packages declaration and initialization](#extensions-and-packages-declaration-and-initialization) + - [Extensions and Packages](#extensions-and-packages) + - [Declaration](#declaration) + - [Initialization](#initialization) + - [Exclusion](#exclusion) - [Packages synchronization (Vundle like feature)](#packages-synchronization-vundle-like-feature) - [Contribution layers](#contribution-layers) - [Adding a contribution layer](#adding-a-contribution-layer) @@ -64,7 +67,7 @@ for contribution guidelines_ - [Base packages](#base-packages) - [Evil plugins](#evil-plugins) - [Commands](#commands) - - [Return to normal mode](#return-to-normal-mode) + - [Escaping](#escaping) - [Executing Vim, Emacs and shell commands](#executing-vim-emacs-and-shell-commands) - [Navigating](#navigating) - [Point/Cursor](#pointcursor) @@ -345,7 +348,9 @@ packages.el | The list of packages to install and the functions to initial `Packages` are `ELPA` packages which can be installed from an `ELPA` compliant repository, and `Extensions` are generally elisp code from git submodules. -### Extensions and Packages declaration and initialization +### Extensions and Packages + +#### Declaration `Extensions` and `Packages` are declared in variables `-pre-extensions`, `-post-extensions` and `-packages` where `` is the layer @@ -355,6 +360,18 @@ loaded after `Packages`. They are processed in alphabetical order so sometimes you'll have to use some `eval-after-load` black magic. +Example: + +```elisp +(defvar -packages + '( + package1 + package2 + ) +``` + +#### Initialization + To initialize an extension or a package `xxx`, define a function with this format in `extensions.el` or `packages.el`: @@ -364,6 +381,24 @@ format in `extensions.el` or `packages.el`: ) ``` +#### Exclusion + +It is possible to exclude some packages from `Spacemacs` in a per layer basis. +This is useful when a configuration layer aims to replace a stock package +declared in the `Spacemacs` layer. + +To do so add the package names to exclude to the variable +`-excluded-packages`. + +Example: + +```elisp +(defvar -excluded-packages + '( + package1 + ) +``` + ### Packages synchronization (Vundle like feature) `Spacemacs` features a synchronization engine for the ELPA packages. It means