Spacemacs users?

128 views
Skip to first unread message

Nick Anderson

unread,
Apr 14, 2016, 6:41:17 PM4/14/16
to help-cfengine
In case there are any other spacemacs users out there, I submitted a
pull request to add a cfengine layer.

https://github.com/syl20bnr/spacemacs/pull/5797

It's probably terribly wrong, but it works for me :)

If you don't know what spacemacs is, its a vimified configuration
framework for emacs. (the only way I can use emacs is in evil mode, and
org-mode is awesome).


signature.asc

Christian Linden

unread,
Apr 15, 2016, 5:27:36 AM4/15/16
to help-cfengine
What's emacs good for? I'm a confident vim user.
What coud I use this framework for?

Marco Marongiu

unread,
Apr 15, 2016, 5:32:20 AM4/15/16
to help-c...@googlegroups.com
On 15/04/16 11:27, Christian Linden wrote:
> What's emacs good for?

/me grabs popcorn and waits for Ted to reply

:-D

Nick Anderson

unread,
Apr 15, 2016, 9:40:00 AM4/15/16
to Christian Linden, help-cfengine
On 04/15/2016 04:27 AM, Christian Linden wrote:
> What's emacs good for? I'm a confident vim user.
> What coud I use this framework for?

First off, I consider myself a vim user. All documents that I edit that
do not have a vi mode end up littered with `:w`.

org-mode is why I have emacs open all the time. Its for taking notes and
remembering things. It's pretty darn awesome in it's own right. But why
would you consider looking at spacemacs? Because it functions like vim.
Most of the vim keybindings work as you would expect, and the
cfengine-mode has some cool things like flycheck-mode where it can show
you syntax errors as you type, and support for eldoc-mode where it gives
you the function prototype in the minibuffer as you type, not to
mention there is some auto-completion.

I will let someone else pontificate on emacs itself.
2016-04-15_Selection_003.png
2016-04-15_Selection_001.png
signature.asc

Christian Linden

unread,
Apr 15, 2016, 2:30:16 PM4/15/16
to Nick Anderson, help-cfengine
=)

Looks very lovely, gonna check next week!

Thanks & bye,
Chris
> <2016-04-15_Selection_003.png><2016-04-15_Selection_001.png>

signature.asc

Ted Zlatanov

unread,
Apr 24, 2016, 11:14:57 AM4/24/16
to help-c...@googlegroups.com
On Fri, 15 Apr 2016 11:32:16 +0200 Marco Marongiu <bront...@gmail.com> wrote:

MM> On 15/04/16 11:27, Christian Linden wrote:
>> What's emacs good for?

MM> /me grabs popcorn and waits for Ted to reply

Well, I don't want to imply vim is bad in any way. Like Nick, I use
both. vim is a kick-ass editor. I find it a bit suboptimal for CFEngine
editing specifically but often jump into it for other tasks. For
CFEngine editing, I use and maintain the cfengine.el mode that's part of
Emacs (so you just run a recent version of Emacs and most of this stuff
will Just Work). So what's the benefit?

I like the Flycheck integration. It lets me see when I make mistakes
immediately: http://i.imgur.com/xO7GBrG.png

I love the ElDoc integration. It shows me function parameter names and
allowed values: http://i.imgur.com/T9I4k2i.png (this shows the return
type and allowed parameters of the execresult() function)

The syntax highlighting and indentation are really useful too:
http://i.imgur.com/P9jG9xM.png

These are the CFEngine-specific things I use. Besides that, Emacs can
also do general editing and syntax checking of JSON, YAML, shell
scripts, and many other languages and tools, locally and remotely. It
works the same way on Mac OS X, Windows, Unix. So for me, it's been a
good environment.

Ted

Christian Linden

unread,
Apr 25, 2016, 2:00:53 PM4/25/16
to help-cfengine
sounds and looks very useful.. but I don't know when to learn emacs shortcuts.. I'm used to vi since >10 years..
I'm used to run update.cf -Dvalidated_updates_ready on a node, cf-agent -v > into.file and check in there what's going on
if cf-promises didn't say something in advance..

c

mike.w...@verticalsysadmin.com

unread,
Apr 26, 2016, 4:10:46 AM4/26/16
to help-cfengine
Christian, if you haven't already, you may want to install Vim syntax highlighting for CFEngine 3 policy files, from GitHub.

--Mike Weilgart

Brian Bennett

unread,
Apr 26, 2016, 10:29:09 AM4/26/16
to Christian Linden, help-cfengine
If you're used to shell cursor movement characters (^E to go to end of line, ^A for beginning of line, etc.) then you already know a lot of them. Shells and emacs have a large overlap of key binding behavior.

On OS X there's an added benefit that a lot of these work in any place you can enter text in the windowing environment. That's something I always miss in [X-]Windows.

-- 
Brian Bennett
Looking for CFEngine training?
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengin...@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.

Mike Weilgart

unread,
Apr 26, 2016, 1:41:20 PM4/26/16
to Christian Linden, help-cfengine
Hi Chris,

Good question!  You know, I'd never actually looked at the number of files in the repo, because I just ran Aleksey Tsalolikhin's install script and have been working with that ever since:


It sets some basic Vim settings, and then installs the ftplugin and syntax files for cf3 from Neil Watson's repository.

Hope that helps?

(The only things I've added to those settings myself are as follows, though not specifically related to cf3):

set tabstop=2
set shiftwidth=2
set expandtab
set showcmd

set hlsearch
nnoremap <silent> <C-l> :nohl<CR><C-l>

Best,
--Mike Weilgart
Vertical Sysadmin, Inc.

On Apr 26, 2016, at 10:24 AM, Christian Linden wrote:

Thanks, Mike.
Tried that a couple of months ago already but didn#t work for me..
- the doc folder is missing 
do I need to put where?
All in .vimrc?

Chris

--
You received this message because you are subscribed to a topic in the Google Groups "help-cfengine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/help-cfengine/CCsUaRzWDZk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to help-cfengin...@googlegroups.com.

Nick Anderson

unread,
Apr 26, 2016, 1:47:40 PM4/26/16
to help-c...@googlegroups.com
In the past I used pathogen.

Then I simply put the vim_cf3 clone in the .vim/bundles directory.

Kind of old
https://github.com/nickanderson/vim
>> <mailto:mike.w...@verticalsysadmin.com> wrote:
>>
>> Christian, if you haven't already, you may want to install Vim syntax
>> highlighting for CFEngine 3 policy files
>> <https://github.com/neilhwatson/vim_cf3>, from GitHub.
>>
>> --Mike Weilgart
>>
>> On Monday, April 25, 2016 at 11:00:53 AM UTC-7, Christian Linden wrote:
>>
>> sounds and looks very useful.. but I don't know when to learn
>> emacs shortcuts.. I'm used to vi since >10 years..
>> I'm used to run update.cf <http://update.cf/>
>> <mailto:help-cfengin...@googlegroups.com>.
>> To post to this group, send email to help-c...@googlegroups.com
>> <mailto:help-c...@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/help-cfengine.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "help-cfengine" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to help-cfengin...@googlegroups.com
> <mailto:help-cfengin...@googlegroups.com>.
> To post to this group, send email to help-c...@googlegroups.com
> <mailto:help-c...@googlegroups.com>.
signature.asc

Christian Linden

unread,
Apr 28, 2016, 4:41:44 AM4/28/16
to mike.w...@verticalsysadmin.com, help-cfengine
Thanks, Mike.
Tried that a couple of months ago already but didn#t work for me..
- the doc folder is missing 
do I need to put where?
All in .vimrc?

Chris

--
You received this message because you are subscribed to a topic in the Google Groups "help-cfengine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/help-cfengine/CCsUaRzWDZk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to help-cfengin...@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.

Christian Linden

unread,
Apr 28, 2016, 4:41:44 AM4/28/16
to Brian Bennett, help-cfengine
Thanks for the hints, Brian.

Christian Linden

unread,
Apr 28, 2016, 4:41:44 AM4/28/16
to Mike Weilgart, help-cfengine
I see nothing happening..
out for today.. headache..

thanks, c

Tony Lill

unread,
Apr 28, 2016, 4:41:44 AM4/28/16
to help-c...@googlegroups.com
Start off using vi-mode. It's a fairly complete vi emulator that lets you use all the vi commands, you can then pick up the emacs commands at your leisure. I turned a whole software development department into emacs fiends by starting them out with this.
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengin...@googlegroups.com.

Christian Linden

unread,
Apr 28, 2016, 1:44:27 PM4/28/16
to Tony Lill, help-c...@googlegroups.com
Thank you, Tony =)
I will pick that up in between.. whenever..

c.

Christian Linden

unread,
May 31, 2016, 5:10:16 AM5/31/16
to help-cfengine
Hi,

I got spacemacs running.. ;-)
How do I get the cfengine layer added?

[.. or do I need to use the puppet one? 🙊]

Chris

Christian Linden

unread,
May 31, 2016, 12:25:33 PM5/31/16
to help-cfengine

Christian Linden

unread,
Jun 2, 2016, 11:19:11 AM6/2/16
to help-cfengine
I added the cfengine lines in my .spacemacs file and it was downloaded and installed while restarting it but
I still don't find the layer added.
?

c

Nick Anderson

unread,
Jun 2, 2016, 11:23:57 AM6/2/16
to help-c...@googlegroups.com
On 06/02/2016 10:19 AM, Christian Linden wrote:
> I added the cfengine lines in my .spacemacs file and it was downloaded
> and installed while restarting it but
> I still don't find the layer

The cfengine layer is still in the develop branch of spacemacs.

what branch is your .spacemacs.d or .emacs.d directory checked out to?

cd ~/.spacemacs.d
git branch



signature.asc

Christian Linden

unread,
Jun 2, 2016, 12:14:15 PM6/2/16
to Nick Anderson, help-c...@googlegroups.com
Christians-MBP:.emacs.d christianlinden$ git branch
* master

signature.asc

Nick Anderson

unread,
Jun 2, 2016, 12:31:52 PM6/2/16
to Christian Linden, Nick Anderson, help-c...@googlegroups.com
On 06/02/2016 11:14 AM, Christian Linden wrote:
> Christians-MBP:.emacs.d christianlinden$ git branch
> * master

git checkout develop

and try starting spacemacs, it should install the cfengine layer.

signature.asc

Christian Linden

unread,
Jun 2, 2016, 12:58:45 PM6/2/16
to Nick Anderson, help-c...@googlegroups.com
yeah, got it, great =)

Thank you
signature.asc

Christian Linden

unread,
Jun 6, 2016, 1:44:32 PM6/6/16
to help-cfengine
Do you know where the documentation https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org
was moved to?

c


Am Freitag, 15. April 2016 00:41:17 UTC+2 schrieb Nick Anderson:

Nick Anderson

unread,
Jun 6, 2016, 1:49:26 PM6/6/16
to Christian Linden, help-cfengine
On 06/06/2016 12:44 PM, Christian Linden wrote:
> Do you know where the
> documentation https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org
> was moved to?

https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org

Works for me.

But maybe your looking for the published documentation that is a bit
more browsable.

http://spacemacs.org/doc/DOCUMENTATION


> c
>
> Am Freitag, 15. April 2016 00:41:17 UTC+2 schrieb Nick Anderson:
>
> In case there are any other spacemacs users out there, I submitted a
> pull request to add a cfengine layer.
>
> https://github.com/syl20bnr/spacemacs/pull/5797
> <https://github.com/syl20bnr/spacemacs/pull/5797>
>
> It's probably terribly wrong, but it works for me :)
>
> If you don't know what spacemacs is, its a vimified configuration
> framework for emacs. (the only way I can use emacs is in evil mode, and
> org-mode is awesome).
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "help-cfengine" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to help-cfengin...@googlegroups.com
> <mailto:help-cfengin...@googlegroups.com>.
> To post to this group, send email to help-c...@googlegroups.com
> <mailto:help-c...@googlegroups.com>.
signature.asc

Christian Linden

unread,
Jun 6, 2016, 5:24:40 PM6/6/16
to Nick Anderson, help-cfengine
The main link works but did you try to follow a link on there?

Thanks for the other one.

c
signature.asc

Nick Anderson

unread,
Jun 6, 2016, 5:26:07 PM6/6/16
to Christian Linden, Nick Anderson, help-cfengine
On 06/06/2016 04:24 PM, Christian Linden wrote:
> The main link works but did you try to follow a link on there?

That org file resides inside the spacemacs repository. I believe the
actual documentation is built from it. I don't think the links when
viewing the doc from github are expected to work.
signature.asc

Christian Linden

unread,
Jun 6, 2016, 5:38:02 PM6/6/16
to Nick Anderson, help-cfengine
Ok.. prob is that I can’t read the inline doc because I can’t navigate =)
Therefor I looked up how to nagivate and ended up there..
signature.asc

Christian Linden

unread,
Jun 28, 2016, 6:32:09 AM6/28/16
to help-cfengine, nick.a...@cfengine.com
One question regarding the spacemacs general usage:

I edit a file by
: edit /my/endless/path/to/my.file

If I want to edit another I file and type : I get the last edit command: : edit /my/endless/path/to/my.file
How can I edit this edit line? One can't use the arrow keys, neither CTRL-E or $ to get to the end of the line to chance my.file to my_other.file..

Chris

Nick Anderson

unread,
Jun 28, 2016, 3:34:35 PM6/28/16
to Christian Linden, help-cfengine, nick.a...@cfengine.com
On 06/28/2016 05:32 AM, Christian Linden wrote:
> I edit a file by
> : edit /my/endless/path/to/my.file
>
> If I want to edit another I file and type : I get the last edit command:
> : edit /my/endless/path/to/my.file
> How can I edit this edit line? One can't use the arrow keys, neither
> CTRL-E or $ to get to the end of the line to chance my.file to
> my_other.file..

Try pressing the up arrow after you type : to select the previous
command then you should be able to edit it.

if you drop a .projectile file into a directory (put *.cf in it, or
other patterns to include) you can use `SPC p p` to pull up a list of
projects (directories that contain .projectile files). And then after
selecting a project you can start typing the name of a file.

And also `SPC b b` is conveniant to show you all the buffers you have open.

signature.asc

Christian Linden

unread,
Jun 29, 2016, 12:01:49 PM6/29/16
to help-cfengine, lindo...@gmail.com, nick.a...@cfengine.com
up and down arrow skips through the command history.. oh yes, after one time up and back down
one can edit it =)  USEFUL! 

didn't use projectile yet.. will give it a try next days..

SPC b b I already knew =)

Thanks, Nick!
Reply all
Reply to author
Forward
0 new messages