Skip to content

Instantly share code, notes, and snippets.

@ivar
Last active August 1, 2022 00:04
Show Gist options
  • Save ivar/13d528f3bd3bb852e76e1fccb1272d23 to your computer and use it in GitHub Desktop.
Save ivar/13d528f3bd3bb852e76e1fccb1272d23 to your computer and use it in GitHub Desktop.
spacemacs - global search and replace

There's a couple of ways, one way is

  • Get search results
    • Do SPC / and type in your search string
    • or SPC x S and search string - where x is your scope indicator (p for project, d for directory, etc..)
  • Once you have the occurences you want, hit C-c C-e inside the helm buffer to put all your match occurences and puts them into a special buffer called the edit buffer or something like that
  • in that buffer you can use any commands you'd normally use on a buffer
  • the C-c C-c to commit your changes.

Editorconfig support used to be a separate layer, but the benefits of making it a layer were marginal.

In your .spacemacs file:

  1. Add editorconfig to dotspacemacs-additional-packages e.g.
dotspacemacs-additional-packages '(editorconfig)
  1. Add
(use-package editorconfig
  :ensure t
  :config
  (editorconfig-mode 1))

to the dotspacemacs/user-config section of .spacemacs

@achikin
Copy link

achikin commented Jun 28, 2018

Brilliant, thank you!

@dwahyudi
Copy link

This is awesome..

@AlekseyZaytcev
Copy link

You are awesome! oO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment