Using subversion with spacemacs - emacs

Is there anybody use subversion in spacemacs ?
Or any suggestion for emacs newbie about using svn in emacs ?
I just want to use log, diff, blame in editor.

In the default configuration, Spacemacs has an SVN entry in the mode line. You can click it for the common operations. It will also show the keyboard shortcuts for those, as well. As suggested by #legoscia in the comment, the shortcuts start with C-x. Blame is called Annotate in the menu.

Related

How do you avoid key binding collisions between VS Code and vscodevim?

I have some shoulder pain that I am trying to get rid of by using vscodevim.
My biggest problem with vscodevim so far is that is sometimes collides with VS code shortcuts. For example I often save all my files with Ctrl+K S. But with vscodevim enables, instead that key combination does something else.
I feel tired about the prospect of having to build a configuration with my own key VS Code key bindings, that don't conflict with vsvim. I hope there is a better solution.
So I ask you, my better knowing colleagues, how do you solve this problem?
There is no easy way out for avoiding conflicts between vscode shortcut and vscodevim bindings. I suggest you to use vim keybindings instead of vscode shortcuts wherever possible. Vscodevim can prove to be a good gateway to vim provided you are open to relearning how you use vscode.
Instead of building your own configuration that doesn't collide with vscodevim you could redirect the effort in finding a way to do the same thing in vim. You can search web or use vim help.
Vim help is really comprehensive and easy to read. If you have vim installed you can use :help or :h followed by a specific subject, for example if you need to read about navigation type :h navigation.
Now you have two choices and I will try to use example you provided i.e. saving a file :
Use bindings available for saving file in vim.
Vim provides so many shortcuts just for saving and quitting files, in vim try :help write and :help quit to know more. Many of those shortcuts works in vscodevim too.
To save file :
:w to save a single file
:wa to write all buffers (in vscode all modified files).
Remove the bindings from vscodevim and use vscode shortcut.
You can delegate the key combination back to vscode. I suggest you do this only if there is any vscode shortcut that is absolutely necessary for you and it conflicts with vscodevim as doing this may result in some related vim bindings to not work. To know what Ctrl+k does in vim type :h ctrl-k in vim.
If you want to use Ctrl+K S for saving file do following:
Open vscode settings and search for vim handlekeys or directly open vscode's settings.json:
add following "vim.handleKeys": {"<C-k>": false}
I don't know if this a better solution but I was in your situation and tried different ways to solve it. Finally I found it was much easier to use vim keybindings than trying to coerce vscodevim.
I set up a "toggleVim" keybinding, like so: https://stackoverflow.com/a/61652769/1054322
When I want to use a hotkey that clashes with vim, I just turn off vim.
I installed "vscode neovim" instead of "vim".
Open the vscode setting, you can search "vscode-neovim: Use ctrl keys for insert Mode", disable it.
So you can use "ctrl k+ ctrl c" to add a line comment in insert mode. Also other vscode "ctrl" keys could be used in this mode.

How do I store a persistent history?

Im fairly new to Emacs (I'm using emacs now since 1 month) and migrated from vim. One "feature" of vim I really miss in Emacs, is the persistent history.
When I am starting vim I can easily open files I recently had open via the command history. But in Emacs when im in dired (or executing commands via M-x) and then pressing M-p I can only browse through the sessions history, and cannot open i.e. files I had opened in a previous session. So, now my question: Is it possible to store the Emacs-history persistent on my system, that when I re-open Emacs I can access my complete history?
(Btw. my Emacs Version is 24.3.1)
Thanks in regards,
Niklas
You can put (savehist-mode 1) in your .emacs to save your minibuffer history over several sessions. (You will need to restart for this to work)
For M-x specifically, look at the SMex package. It enhances M-x with a history, flex matching, better ordering, etc.

CEDET in emacs (command line mode)

I'm trying to setup and android development on my mac using Emacs and CEDET (I hate Eclipse, and I want to keep using emacs, but I want the auto-completion, so this setup seemed perfect).
However, I want to use emacs in the terminal. I have a problem with the auto-completion. CEDET is trying to use the graphical menu "popup-menu" and I got an error in CLI mode: "Symbol's function definition is void: popup-menu", which makes perfect sense.
My question is, is there any way to use Emacs' termcap menu for CEDET auto-completion?
Thanks!
Thibault.
Edit: you can find my emacs configuration there: https://github.com/tbronchain/emacs
Edit2: here are some screenshots showing 1- What is the CEDET auto-completion in GUI mode 2- the menu I would like to use for CEDET in CLI mode
CEDET = http://bit.ly/1iptfq3
auto-complete = http://bit.ly/1kZVDz9
I got my answer!
I didn't succeed to replace the menu by auto-complete, however, it works perfectly with company! It is a little bit more messy than the GUI menu, but it's still awesome!
Thanks to #Stefan for helping with this!
I will post my full configuration on github when I'll be done with this configuration (I'm trying to optimise the keyboard shortcuts a bit).
Cheers,

Is there a vim plugin for eclipse that let me remap jj to Esc?

I am looking for an eclipse plugin that gives me basic vim commands.
I don't expect to much but I'm so used to 'jj' for escape that this feature is essential for me. 'jj' should work like in vim: Leave insert mode but don't insert any characters.
I'm considering
viplugin
vrapper
viable
vimplugin
eclim
but didn't find much information if it is possible to remap anything to ESC.
With viplugin it seems possible to do that, but when remapping 'jj'
it still inserts 'jj'. Eclim should support it, but it's probably to heavy.
You can customize vrapper's behaviour with a vimrc-like file: ~/.vrapperrc. It works like ~/.vimrc syntax-wise but you are quite limited in what you can put there.
inoremap jj <ESC>
does exactly what you want, though, just like in Vim.
What worked for me:
Make sure your .vrapperrc is in what Eclipse has as your user director. A quick google gave this:
"If you go to Help > About > Installation Details > Configuration tab, can you check if the directory listed next to user.home is the one your .vrapperrc is in?"
Add this line to the .vrapperrc:
imap jj <ESC>
'inoremap' didn't seem to work for me, but that might have been because of some other issue.
Restart Eclipse and profit.

How to Make Eclipse More Like Emacs

I am very familiar with emacs--and I realize that there is nothing that it cannot do--but there are some things that it does not do well or efficiently. So, being between projects I am open to the idea of switching to a full-featured IDE such as Eclipse.
With muscle-memory being what it is, I would like to make Eclipse as emacs-like as possible. I have already discovered the excellent Emacs+ plugin which gets me about halfway there. However, I am still missing the following features of emacs which I routinely rely upon:
shell: It's not just a shell, it's also a buffer.
occur: Search->File... is close to what I want, but I just want it to search the current file--which might be a text file, a logfile, or a shell buffer, or whatever.
align-regexp: This awesome little command in emacs helps me make files more readable, and alignment helps with keyboard macros.
What plugins would you recommend to solve these issues? Are there any other emacs features you miss in Eclipse or plugins you would recommend?
Please, no emacs/vi zealots asking why on Earth I would do such a thing.
For the shell you have WickedShell
Ctrl+F is enough to trigger a Search within the current file. (does not create a new buffer with matched lines)
Only Mark Occurrences is about highlighting occurrences, but that is not as advanced as the Emacs function.
Formatter options can emulate "align-regex" function, as described here.
Preferences -> Java -> Code Style -> Formatter.
Click 'Edit' on the profile (you may need to make a new one since you can't edit the default).
In the indentation section select 'Align fields with columns'.
Then, in your code Ctrl+Shift+F will run that formatter.
I can confirm Brian's suggestion (Emacs key-bindings). What I do to resolve this dilemma is to use both Emacs and Eclipse simultaneously. They are both very good at reporting external changes to files so there is minimal chance of tromping on edits (but it can happen). More to the point, you can leverage the strengths of both tools without having to give up either one. The combination of using both tools and Eclipse having Emacs key-bindings makes this quite satisfactory for me.
IIRC (It's been a while since I've used eclipse) eclipse has a "use Emacs key-bindings" mode. I believe that there's also the option to tell eclipse to use emacs as its own editor...