Skip to content

Commit

Permalink
New page: Spacemacs Vim
Browse files Browse the repository at this point in the history
A page in Spacemacs Basic that defines keybinding that each drive a menu of very
useful commands and transient states.
  • Loading branch information
practicalli-johnny committed Oct 4, 2018
1 parent 16ad893 commit e41f678
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* [Emacs Quick Reference](spacemacs-basics/emacs-quick-reference.md)
* [Vim Basics](spacemacs-basics/vim-basics.md)
* [Speaking Vim](spacemacs-basics/speaking-vim.md)
* [Spacemacs Vim](spacemacs-basics/spacemacs-vim.md)
* [Vim Quick Reference](spacemacs-basics/vim-quick-reference.md)
* [Create a Clojure Project](create-a-project/index.md)
* [Using Emacs Eshell](create-a-project/using-emacs-eshell.md)
Expand Down
Binary file added images/spacemacs-vim-normal-g-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/spacemacs-vim-normal-z-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions spacemacs-basics/spacemacs-vim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Spacemacs Vim

> ####TODO::Work in progress
> Adding neat things Spacemacs adds to the vim experience here, as I learn them. Here are a few powerful menus for vim normal state.

## The power of g

`g` in Vim normal mode brings up a menu of neat shortcuts


[![Spacemacs Vim Normal - g menu](/images/spacemacs-vim-normal-g-menu.png)](/images/spacemacs-vim-normal-g-menu.png)

I mainly use this for changing the case of letters, e.g.:

`v` to select the characters I want to change
`g` for the menu
`u` or `U` to change to lower or upper case





## `#` or `*` to navigate by words / symbols

`#` or `*` enters **symbol highlight transient state** allowing you to jump between the current symbol name and any other instance in the buffer.


[![Spacemacs Vim Normal - Symbol highlight transient state](/images/spacemacs-vim-normal-symbol-highlight-transient-state.png)](/images/spacemacs-vim-normal-symbol-highlight-transient-state.png)


`e` to start iedit state and edit all the symbols concurrently. This is so amazing.


`/` will show a helm popup with all the instances of the symbol through out the project files, a quick way to search a project.


`f` will show a helm popup with all the instances of the symbol in a specified file.

`b` will show a helm popup with all the instances of the symbol through out all open buffers (global buffers, so even those in a different layer).


## `z` for Code Folding etc.

Code folding is a handy way to hide parts of you code and comments you are not currently interested in.

`z` opens a menu to allow you to un/fold your code quickly.


[![Spacemacs Zoom menu](/images/spacemacs-vim-normal-z-menu.png)](/images/spacemacs-vim-normal-z-menu.png)

`SPC z .` is the code fold transient menu should you wish to un/fold code many times.

See the [code folding](/navigating-code/code-folding.html) section for more details.

0 comments on commit e41f678

Please sign in to comment.