Spacemacs - General Discussion, Blog Posts, Wiki

I did, many times.

Still not working.

Frustrating, I am gonna test a bit later tonight. I will steal my wife`s mac and test it there.

Are there any short but concise video tutorials on spacemacs and alchemist? I really want to learn more about spacemacs than I do now (basic VIM usage, traversing windows, project tree), but I would rather invest a maximum of 1 hour to learn the important stuff and then focus on actual elixir development and learning :slight_smile: .

1 Like

I’ve been told that the spacemacs documentation is really good and worth skimming over so I’d recommend that - it may also be worth going through this thread as there’s some great tips here.

Re Alchemist… I am not aware of any tuts but the docs look good Basic usage - Alchemist: Elixir Tooling Integration Into Emacs :023:

Ok guys I have updated the first post - can you take a look and see if this now serves as a good guide for those new to SpaceMacs?

Do you think we should add some basic Alchemsist tips? Or is directing people to the basic usage guide sufficient?

2 Likes

Thx it seems it works without company-mode :slight_smile:

1 Like

I found this video short but nice :slight_smile:

1 Like

Nice find @mkunikow - added it to the wiki :023:

I am currently trying to set up shell right now, for some reason it is not honouring my .bash_profile - anyone have any ideas on how to get it to do so? (On Mac OS X)

I don’t know Mac but for linux you set env in .profile file. The .bashrc is only used when you start bash.

1 Like

I just found this:

Emacs shell environments behave differently from Terminal environments and in order to have correct environments like LANG=en_GB.utf-8 LC_ALL=en_GB.utf-8 or PATH= for sub-applications launched from Emacs like R, Octave, Gnuplot etc., set the environments not only in .bash_profile but in .bashrc and try (since Yosemite /etc/launchd.conf is no more consulted for security reasons).

I just created a .bashrc file and added . ~/.bash_profile to it and now it seems to be working fine :smiley:

1 Like

Only thing I really want now is for numbers to show for each window - so I can use SPC <number> to jump to that window. Anyone know how to get them to show with each window? From what I read it should already show with 3 or more windows open… but I’m not seeing it :confused:

What you’re describing reminds me of ace-window, but I don’t know if it’s been configured for Spacemacs or there’s a preferred alternative.

1 Like

I must be going blind because the numbers are already there :043: (in the bottom left corner of each window :icon_redface:)

Been looking through this over the weekend and I have been trying a lot of weirdness (good thing I took backup of the config file before starting) I am still no closer I have been moving around stuff removing layers and so on, I would really like to have this solved myself. so I will look into it after work tomorrow. let me know if you solve it somehow.

Are you referring to ace-window or the problem @dwahyudi was having? Maybe you meant to quote something else.

There Should not be a quote there at all :slight_smile: fixed it.

Now you know how 90% of my bugs are made !

1 Like

Does anyone know how to get the shell (SPC ') to open in the project root, or the user’s own root? Currently it opens in the directory of whichever file you have open.

You need to override the default-directory variable. I discovered that by…

  1. Pressing C-h k SPC ' to learn SPC ' is bound to (spacemacs/default-pop-shell) which is defined in ../layers/+tools/shell/funcs.el.
  2. Opening the link to that file and seeing spacemacs/default-pop-shell calls the shell function.
  3. With the cursor over shell, press C-h f RET to see docs for shell.
  4. Notice mention of default-directory.

If ā€˜default-directory’ is a remote file name, it is also prompted
to change if called with a prefix arg.

Hopefully all those keybindings work. I’m currently using the hybrid keybinding mode since I don’t know many Vim commands yet.

Then I tinkered with ielm to come up with a strategy for calling shell with a custom default-directory and came up with:

(defun shell-in-directory (dir)
     (let ((default-directory dir))
       (shell)))

(shell-in-directory "/usr/local/bin")
;; opens a shell window at /usr/local/bin when evaluated

Let me know if you could use help integrating that with your keybindings.

2 Likes

Nice one - thanks @jmitchell :slight_smile:

Where would I put the above? When I put it in defun dotspacemacs/user-config or dotspacemacs/user-init and reload it it immediately opens a shell and when I close the shell window and try to open another with SPC ' it just ignores your code and opens it in the directory like it would have previously.

This part about default-directory suggests there may be a way to do this without adding any custom configuration, but I haven’t figured out how to pass the directory as a prefix argument in Spacemacs.

I’m also not sure yet whether spacemacs/default-pop-shell would have to be patched to pass through the prefix argument to shell.