Get Started. It's Free
or sign up with your email address
Spacemacs by Mind Map: Spacemacs

1. help

1.1. spc h spc -> help

2. Find and replace

2.1. 12.8.12 Replacing text in several files Replacing an occurrence of text in several files can be performed via helm-ag. Say you want to replace all foo occurrences by bar in your current project: initiate a search with SPC / enter in edit mode with C-c C-e go to the occurrence and enter in iedit state with SPC s e edit the occurrences then leave the iedit state press C-c C-c

2.2. dired

2.2.1. SPC a d -> enter dired mode

2.2.2. wdired-change-to-wdired-mode this will enable you to edit file lists as if it was a file. Use C-c C-c to commit your changes

2.3. Move the cursor to the word to be changed. Press * to select all occurrences. Press e to edit in edit-mode. Press c i w to change the word. Finally press ESC ESC to exit to normal-mode.

2.4. SPC sf -> search for a file within a folder/directory

2.5. SPC / --css search-term -> search css files in project for "search-term"

2.6. SPC * Foo !bar -> search project for a "Foo" and not "bar"

3. narrow (only edit a section of a file)

3.1. SPC n r -> narrow to region

3.2. SPC n w -> widen

4. Indirect Buffer

4.1. C-x 4 c

4.2. clone-indirect-buffer-other-widow

5. helm

5.1. C-z -> available actions in helm

5.2. SPC rl -> resume last helm session

5.3. C-o in helm opens a file in another window

6. diff

6.1. select files in buffer using SPC SPC then C-c = to enter ediff

7. git

7.1. SPC gs - git status

7.1.1. From the git status window

7.1.1.1. s - stage files

7.1.1.2. u - unstage files

7.1.1.3. x - delete file

7.1.1.4. dd - diff

7.1.1.5. ds - diff staged

7.1.1.6. du - diff unstaged

7.1.1.7. cc - commit

7.1.1.8. Pp - Push orignin/branch_you_are_on

7.1.1.9. ll - git log

8. org-mode

8.1. alt arrows - move bullet points about left/right/up/down

8.2. shift right arrow - mark TODO and cycle through to DONE

8.3. - [ ] - to create a checkbox

8.4. C-c C-c - mark checkbox done

8.5. - [/] or - [%] - summary of checkbox

8.6. C-c C-c - Enter a Tag

8.7. S TAB - cycle through indentation levels

9. global-set-key example

9.1. (global-set-key (kbd "C-q") (lambda () (interactive) (shell-command "mix test")))

9.2. The above binds "Ctrl q" to the shell command mix test

10. project

10.1. SPC p t -> Neotree at project root

10.2. spc pf -> find file in project

11. shortcuts

11.1. spc : -> fuzzy find commands

11.2. spc bb -> list buffers and recent files

11.3. spc j J -> jump to char

11.4. SPC j w -> Jump to word starting with given char

11.5. spc ss ->find but show result in fuzzy list

11.6. SPC f R -> Rename current buffer file

11.7. SPC t n -> Toggle line numbers

11.8. SPC t r -> Toggle relative line numbers

11.9. SPC f e d -> Open spacemacs conf file

11.10. SPC r y -> view your yank ring

12. To try

12.1. http://spacemacs.brianthicks.com/2015/10/01/align-multiple-text-items/

13. coding

13.1. SPC ; -> place comment block around selection

13.2. SPC a u -> Undo tree visualize

13.3. SPC c y -> create a commented copy of the current line

13.4. To surround anything, just select it and press s

14. files

14.1. SPC f c -> Copy current buffer into a new file

14.2. SPC f f -> open a file or create a new one if it doesn't exist.

14.3. SPC f D -> Delete the current file in the buffer

15. vim shortcuts

15.1. change

15.1.1. in

15.1.1.1. ci" - change in " ci{ - change in { ci) - change in ) cip - change in p ciw - change in w ci' - change in '

15.1.2. around

15.1.2.1. ca" - change around " ca{ - change around { ca) - change around ) cap - change around p caw - change around w ca' - change around '

15.1.3. till

15.1.3.1. ct" - change around " ct{ - change around { ct) - change around ) ctp - change around p ctw - change around w ct' - change around '

15.2. select

15.2.1. vi" - select in " vi{ - select in { vi) - select in ) vip - select in p viw - select in w vi' - select in ' o - toggle position o start or end of selection

15.3. move lines

15.3.1. select lines in visual mode

15.3.1.1. :m