Fork me on GitHub

on ubuntu using spacemacs - how do I copy from/to spacemacs from another editor (usually C-c C-v) and vica versa?


@dev.4openid in Spacemacs you yank or kill some text and it should go into the Ubuntu clipboard and be available from C-v in other editors and applications. To paste into a terminal shell, use the shift key, eg C-S-v. Anything you copy with C-c in Ubuntu can be pasted with p (Evil normal state). I have forgotten all the Emacs keybindings... To yank something using Evil normal state, y y for the current line, v to select a region and y to yank the highlighted region, SPC v to select a symbol (`v` to grow the scope, S-v to shrink the scope of selection) and y to yank. There are other approaches too...


I’ve hit a major roadblock with Calva and while I love Calva, I am forced to move to Spacemacs. I am just beginning, and it might be weird to ask, but I am guessing most people here are sufficiently happy with spacemacs


„forced to move“? I do not hear that very often…


@U067P1FT2 - a flair for the dramatic


As you might guess, the ones who hang out in this channel are satisfied with Spacemacs…


@U067P1FT2 - Indeed. I am unsure where to start though. It seems like the defaults of evil mode should be the right way to go


documentation time


The @jr0cket Website is an excellent resource


and use the Spacemacs develop branch rather than the default master branch

Drew Verlee17:06:33

^^^ @srijayanth read all of then get started, imo.

Drew Verlee17:06:56

i made it hard on myself for not doing that.

Drew Verlee17:06:28

spacemacs comes with more options then you need in some areas and it can be painful if you don't follow the advice there.

Drew Verlee17:06:11

No need to master every section but have it as your go to reference for how to do something. Its likely mentioned in there.


@U0DJ4T5U1 - thanks, I am well on my way. My familiarity with both vim and emacs helped me immensely


I’ve used vim almost all my adult life and emacs doesn’t bother me very much


As long as I have decent nrepl integration with formatting, I am happy


@jr0cket you are right with what you stated. However, I was asking to copy text between spacemacs and a text app - both ways:grin:


I already answered that part too...


Darndest thing, I had tried that and did it again. Did not work. Upgraded packages and rebooted spacemacs and now works?!!!!??? Grrrrr"


I think emacs will just share the system clipboard, like a good OS citizen.


Sorry to ask here as well


Hope the answer in #clj-kondo works for you. If you get stuck let us know. Thanks.

thanks 4

Is there a way to eval a form in a scratch buffer?


Is there a function to surround expression with () ?


I’m using viw to select inner word and then an M-(


@srijayanth SPC k w is the smartparens command to wrap an expression, or in Evil I would use SPC v to highlight the expression, or * if its a symbol, and then s ) to surround with () without spaces. There are lots of ways though 🙂


, e f is the usual command to evaluate the current form (from the top level). Havent tried the scratch buffer though


spc k w is cool. Spc v won’t work on hyphenated expressions


you can extend what spacemacs considers a word to include - in clojure-mode and then it works


v will expand the SPC v selection and shift v contracts the selection


I added a bunch of Evil key combinations on this page as I was learning Vim style editing There are more examples on the following page and a lot more I havent thought of...


cider-doc requires fully qualified namespace?


so how would I get the doc of say something under my cursor?


@srijayanth with the cursor over the name of a function, , h h or SPC SPC cider-doc will popup a buffer with the clojure docstring for that function. This only works if a Clojure REPL is running for the project. To start a REPL use , ' or SPC SPC cider-jack-in-clj . This works the same for a project or the clojure-scratch buffer, either way you require a running REPL. You will need Clojure CLI or Leinignen installed, eg.


my clj kondo isn’t working. Not sure why. Master branch


it is on path, I’ve added flycheck-clj-kondo to dotspacemacs-additional-packages


If you havent restarted Emacs since adding that config, that would be the first thing I would do. Just doing SPC f e R does not always resolve the loading order of Emacs packages when they are already running.


no, restarted it


dotspacemacs-additional-packages '(flycheck-clj-kondo)


Do you also have this in the dotspacemacs/user-config in the .spacemacs file?

(use-package clojure-mode
 :ensure t
 (require 'flycheck-clj-kondo))


That line seem alright?


SPC e v will run flycheck-verify setup in a Clojure buffer, that may show if there is an error with any particular back end. Confirm you have the syntax-checking layer added to the .spacemacs file. Check the message buffer for errors, SPC b m In general, I do recommend switching Spacemacs develop branch as it has about 2 years worth of fixes and features over Spacemacs master. Here is a guide to switching if you decide you want to clj-kondo is also easier to install :)


Ah cool. clj-kondo is installed


but flycheck mode is disabled


When I run SPC e v with the current buffer being in Clojure mode, I get the following output

Syntax checkers for buffer 034_implement_range.clj in clojure-mode:

First checker to run:

    - may enable: yes
    - may run:    t
    - executable: Found at /home/practicalli/bin/clj-kondo

Checkers that are compatible with this mode, but will not run until properly configured:

    - may enable: yes
    - may run:    nil
    - executable: Found at /home/practicalli/bin/clj-kondo

Flycheck Mode is enabled. Use SPC u C-c ! x to enable disabled checkers.


Flycheck version: 32snapshot (package: 20200513.444)
Emacs version:    26.3
System:           x86_64-pc-linux-gnu
Window system:    x


The first checker shows that it found clj-kondo-clj has been found, shows it runs and shows which binary its using


Thanks. Its working well now


@jr0cket - on your site where you say

SPU u before cider-jack-in displays the command line to be run, ...


is that SPC u? If so, I am not sure how that works


I got what you were saying. Prefixing a command with an argument can be done by spc u

👍 4

Pretty much got most things I want working, the only thing really missing is that I can’t get help to work for the word under cursor


Do you have a repl running? Can you evaluate code, e.g using , e f when the cursor is on an expression? Do you get an error when using , h h ? Or a prompt in the mini buffer saying Doc: ?


I have a repl running, my , e f works


I am upgrading to development branch, let us see


Upgraded, but now, I can’t seem to get my autocomplete to work


Interesting. Autocomplete works but not at a require level


auto-complete doesn't complete external libraries in require, but think it does ones for the project. For external libraries you can try enabling clojure-enable-clj-refactor variable on the Clojure layer