Skip to content

Instantly share code, notes, and snippets.

@JuanCaicedo
Last active June 18, 2018 19:02
Show Gist options
  • Save JuanCaicedo/04c9341783b65f8ac73b to your computer and use it in GitHub Desktop.
Save JuanCaicedo/04c9341783b65f8ac73b to your computer and use it in GitHub Desktop.
Questions I've had while learning spacemacs

Questions

  • How do you navigate around directories?
    • Open tree view in files neotree
      • Shortcuts for neotree in evilmode in the docs
      • Using search (/) can be super useful to move around quickly
    • Use SPC p D to open the project root in Dired, and use SPC f j to jump to the Dired buffer corresponding to current buffer.
      • Dired shortcuts
        • copy C
        • rename R
        • delete D
        • compress Z files
        • create directories +
        • mark m
        • unmark u
        • refresh g
  • How do you add syntax highlighting for new languages?
    • You can add that language into the languages list in .spacemacs
  • How do you make new folders?
    • You can call into the terminal (SPC !) and run mkdir.
    • SPC : make-directory RET dirname RET
  • How do you make new files?
    • You can call into the terminal (SPC !) and run touch.
  • How to view all buffers?
    • There is an emacs shortcut to do it, C-x C-b
    • SPC b b
    • add the ibuffer layer and then SPC b B
  • Split tabs?
    • In the space windows commands there's a command for split right
  • Move between tabs?
    • Same as above (SPC w h/l)
  • How to access projects easily?
  • Why does evil mode's gg and G not work in normal navigation?
  • How do you cycle through matches in a search?
    • Once you perform a search using / you can use n/N for going to next/previous match.
  • How do you change indentation for a language (javascript 2 spaces)? For only the current file (specific project needs 6)?
    • To change javascript indentation
    • For project-specific indentation configuration, you can use .dir-locals.el (or .dir-locals*.el in Emacs 25 or later).
    • For file-specific indentation, you can use file variables
  • What's a normal startup time for Spacemacs?
  • How to do a text search in directory (similar to Sublime's CMD SHIFT f)
    • Spacemacs is integrated with different search utilities like ack, grep, ag, and pt. The search commands in Spacemacs are organized under the SPC s prefix.
    • To search in files in an arbitrary directory, use SPC s f. To search in a project, use SPC / (or SPC s p).
@xfq
Copy link

xfq commented Feb 6, 2016

@fiveNinePlusR
Copy link

Why does evil mode's gg and G not work in normal navigation?

it definitely should work in most modes.

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