Skip to content

Instantly share code, notes, and snippets.

@sohjiro
Last active January 7, 2017 05:56
Show Gist options
  • Save sohjiro/a811737976144c6997703d9edca29858 to your computer and use it in GitHub Desktop.
Save sohjiro/a811737976144c6997703d9edca29858 to your computer and use it in GitHub Desktop.
Alchemist cmd sheet
<SPC> m h h Looking for documentation
<SPC> m g g Going to definition of a function
<SPC> m , Going Back
<SPC> m m c Compile whole project
C-c a x Prompt for a mix command including a list of all available mix commands. alchemist-mix
C-c a m c Compile the whole elixir project. alchemist-mix-compile
C-c a m r Runs the given file or expression in the context of the application. alchemist-mix-run
C-c a p s Toggle between a file and its tests in the current window. alchemist-project-toggle-file-and-tests
C-c a p o Toggle between a file and its tests in other window. alchemist-project-toggle-file-and-tests-other-window
C-c a p t Run the tests related to the current file. alchemist-project-run-tests-for-current-file
C-c a p f List all files available in the test directory. alchemist-project-find-test
C-c a p l List all files available in the lib directory. alchemist-project-find-lib
C-c a n w List all files available in the web directory. alchemist-phoenix-find-web
C-c a n c List all controllers in web/controllers directory. alchemist-phoenix-find-controllers
C-c a n l List all channels in web/channels directory. alchemist-phoenix-find-channels
C-c a n t List all templates in web/templates directory. alchemist-phoenix-find-templates
C-c a n m List all models in web/models directory. alchemist-phoenix-find-models
C-c a n v List all views in web/views directory. alchemist-phoenix-find-views
C-c a n s List all files in web/static directory. alchemist-phoenix-find-static
C-c a n r Open the router.ex file in web directory. alchemist-phoenix-router
C-c a n R Run the Mix task phoenix.routes. alchemist-phoenix-routes
C-f Move forward a character
C-b Move backward a character
M-f Move forward a word
M-b Move backward a word
C-n Move to next line
C-p Move to previous line
C-a Move to beginning of line
C-e Move to end of line
M-a Move back to beginning of sentence
M-e Move forward to end of sentence
C-v Move forward one screenful
M-v Move backward one screenful
C-l Clear screen and redisplay all the text,
M-< Move to the beginning of the file
M-> Move to the end of the file
<Delback> Delete the character just before the cursor
C-d Delete the next character after the cursor
M-<Delback> Kill the word immediately before the cursor
M-d Kill the next word after the cursor
C-k Kill from the cursor position to end of line
M-k Kill to the end of the current sentence
C-<SPC> Select and C-w to delete
C-u 0 C-l Center the screen at the top
C-x u Undo
C-x C-f Find a file
C-x C-s Save the file
C-x C-b List buffers
C-x b buffer_name Change to the buffer with that name
C-x s Save some buffers
C-x C-c Quit Emacs
C-x 1 Delete all but one window
C-z Suspend Emacs
fg %emacs Resume Emacs
M-x repl s<Return>changed<Return>altered<Return> # change string
M-x recover file<Return> Recover a file from crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment