-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide Vim and Emacs key bindings for the editor #669
Comments
From Francois...@gmail.com on 2011-05-27T12:31:48Z I think the answer is unfortunately no ... Some useful links below Kate as an already excellent vim plugin: http://kate-editor.org/kate-vi-mode/ Emacs as also some vim-mode :) http://www.emacswiki.org/emacs/VimMode http://www.emacswiki.org/emacs/Vimpulse Netbeans as the excellent jVi plugin: http://jvi.sourceforge.net/ May I had that Pida succes in embedding vim in a really good pygtk IDE: http://pida.co.uk/ There is also vico, Kommodo edit, Gedit that have vim-mode: |
From pierre.raybaut on 2011-05-28T03:33:37Z The short answer is yes on Linux (the simplest way would be to use a QX11EmbedContainer), but no on Windows. Spyder being a cross platform IDE, we won't do things on one OS and not on the other, especially features like this one which would require a lot of work. The examples provided by François are interesting though. But AFAIK, noone has ever successfully embedded vim in another application on Windows. Status: WontFix |
From r.c.bruno.andre@gmail.com on 2011-05-28T07:37:47Z All the other apps François mentioned look nice, but none seem to be good replacements for spyder (not scientific computation oriented). It's too bad spyder is held back due to limitations of proprietary plateforms. |
From ccordoba12 on 2011-05-28T07:53:46Z It's not only that. If we were to embed vim then soon someone else would ask to embed emacs or kate or anybody else favorite editor. That would be a real burden for the development team. The only thing that would be possible to do is provide vim-like key bindings, as vigedit does. Just my 2 cents, |
From r.c.bruno.andre@gmail.com on 2011-05-28T08:08:07Z Vi-like key bindings would be great too. |
From ccordoba12 on 2011-05-28T08:43:44Z Very well then. I'll leave this issue open as an enhancement request, in case somebody else wants to develop it. Summary: Provide vim-like key bindings for the editor |
From pierre.raybaut on 2012-03-18T14:05:51Z Labels: -Type-Enhancement Type-Enh |
From pierre.raybaut on 2012-03-18T14:17:01Z Status: HelpNeeded |
From tbekolay on 2012-06-22T07:33:09Z There are editors, like Sublime Text 2, that emulate Vi pretty well through a "vintage mode". I'm an emacs user, so I'm kind of itching to put emacs keybindings in Spyder, and it would make sense to have that mechanism somehow general enough to also do Vi-like key bindings. I'm interesting in implementing such a change (though I'll likely start out with emacs keybindings), but it'll be my first code change in Spyder so it might take a while! |
From ccordoba12 on 2012-06-22T08:27:09Z Don't worry about it, it could take time. Spyder has a very good shortcut support, which is also configurable. Maybe you could start taking a look at https://code.google.com/p/spyderlib/source/browse/spyderlib/plugins/shortcuts.py If you need further help please let us know Summary: Provide Vim and Emacs key bindings for the editor |
From ccordoba12 on 2013-02-13T09:41:50Z Labels: MS-v2.3 |
From peishiy...@gmail.com on 2013-03-06T03:49:39Z very important feature!! |
From ccordoba12 on 2013-03-06T08:43:13Z Yep, totally agree. This would let people to easily move to Spyder with out leaving away their muscle memory :) |
From pierre.raybaut on 2013-05-11T05:32:29Z Labels: -MS-v2.3 MS-v2.4 |
From david.jo...@gmail.com on 2013-05-14T07:52:26Z If someone plans to take this on, you should take a look at this vim plugin: https://github.com/ivanov/vim-ipython It allows two-way communication between vim and the ipython kernel, and works very well. It also works in gvim. The lack of a truly powerful editor is the only thing that still keeps me from using Spyder on a regular basis. Several of the devs I work with have expressed interest in learning python as a modeling language. To make it easier for them, I created a Python 2.7 install on an NFS mount, with a bunch of scientific tools. I even went through the trouble of figuring out how to install Spyder. It took some work, because it's not in the Centos 6 repos, and our LAN isn't connected to the internet. It required making a separate build of QT and PyQt. I figured a Matlab-like UI would lower the learning curve a bit. The primary "IDE" where I work is vim, though I personally use Eclipse for a lot of my coding. I think it's fair to say that for most Linux devs, the editor is the most important component of the development environment. So embedding vim in Spyder would definitely increase its adoption rate. I may take this on myself, if nobody beats me to it, as Spyder seems like a project worth investing in. |
From ccordoba12 on 2013-05-14T09:30:40Z We are welcome to accept patches but we are not interested in embedding vim or emacs in Spyder at the moment. We prefer to have a simple editor with modern features (like autocompletion, go-to-definition and error highlighting) that can be used from day one, than a powerful one but hard to configure (which has been my experience with emacs, I've not used vim). However we are very interested in providing key-bindings to both of them so that people can easily switch to Spyder. |
From david.jo...@gmail.com on 2013-05-14T09:57:33Z Emacs does require extensive effort just to create a basic dev config, IMHO, which is why I don't use it. Vim is much easier to configure and add functionality. I prefer the emacs keys, but it's not worth the time sink for me. I've found the keyboard shortcuts in Spyder difficult to configure, and my custom shortcuts often don't work. I assume this is due to conflicts, though I couldn't find any. It would be nice if there were a warning prompt for this. It would also be much easier if you could type in the shortcuts, rather than using a dropdown. What would be great is to be able to load bindings from a file. Is this currently possible? I'm not a vim "shortcut ninja", but it's nice to have features like block editing. |
From ccordoba12 on 2013-05-14T10:58:54Z Our shortcuts support needs a little bit of love but we plan to improve it on 2.4. Sorry it's not possible to load bindings from a file, but it's a good idea. By block selection you mean column selection? That would be very interesting to implement. I think there is an open issue for something like that. |
From david.jo...@gmail.com on 2013-05-14T14:29:01Z Yes. Column selection. Of course, a key binding and/or button that switches the editor to column mode, like in Eclipse CDT, would be even better than the vim way. The Spyder editor could really be much better than vim for its intended use, while allowing the user consistent muscle memory for common actions. |
From david.jo...@gmail.com on 2013-05-15T06:54:19Z As far as adding vim key bindings, would it be possible to have a little command popup box for vim commands, like Vrapper in Eclipse? Or would that be too great a change to the interface? Unfortunately, for it to really be usable, adding vim key bindings would involve more than just remapping the key combinations. |
From gary.pa...@gmail.com on 2015-01-09T10:26:13Z The only thing keeping me from using Spyder is that I already have muscle memory for Emacs keybindings. It's not necessary to emulate everything, just a handful of common cases, such as next-character, kill-line, etc. I'll look into the source to see if I think I can do it. |
From paul.rou...@gmail.com on 2015-01-26T08:07:48Z @-carlos
The R-Studio IDE provides vim key bindings. They are far from complete but it's a good start to navigate effectively in the page and delete, copy-paste lines. Has someone started to implement vim key bindings? |
From ccordoba12 on 2015-01-30T14:23:08Z No one is working on adding Vim key bindings for Spyder. Unfortunately that's a hard and complex project because we would have to replicate the Command/Edit mode of Vim. However, Emacs key bindings will arrive in 2.4 |
It would be extremely useful to be able to load keybindings from an existing .vimrc file as well. Maybe even just a simple parsing of the vimrc to extract common binds (which I believe is what ideavim does for the intellij platforms: https://github.com/JetBrains/ideavim) |
@sho-87 could you post your suggestion over https://github.com/spyder-ide/spyder-vim |
@ccordoba12 Does this still need to be open here, or are we covered by what's on the |
We still need to provide Emacs keybindings, so please leave it open. |
Ah, gotcha; thanks. I added |
optionally, right click open file and click menu "open in other editor" to open vim editor .... ok? |
@ccordoba12 Any progress on providing other key bindings? Thanks |
No progress, sorry. |
Is there a way to add a config file instead of changing shortcuts individually. |
No, there isn't, sorry. |
okay reading by the posts.. it kinda feels stupid to not get vim keybindings for spyder we do not need another text editor to be used inside spyder since spyder is enough for editing stuff, but we do need vim keybindings in order to navigate and use spyder. i think you could easily find a way to implement neovim on spyder somehow |
See https://github.com/spyder-ide/spyder-vim for vim keybindings. It doesn't work for spyder 5, but it's an open source project so feel free to contribute ! |
I manually customized my keyboard shortcuts to mimic Emacs (at least for basic motion, killing, and file commands). Other than saving my spyder.ini for future reference, I don't see any way to export or import keyboard shortcuts. Perhaps I am missing something. I offer my shortcuts here. Unfortunately, I am not a GUI developer; otherwise, I'd offer more help - particularly regarding functionality to select a predefined set of bindings. If I am missing something obvious, or if there is some other way I could help, let me know. I hesitated using Spyder for a long time, because it did not have an easy way to select Emacs key bindings. |
@chinske, thanks for your help. Unfortunately, we're seriously understaffed at the moment, so we don't have time for this. Hopefully we will in the second half of the year. |
From r.c.bruno.andre@gmail.com on 2011-05-27T12:35:31Z
Could it be possible to use vim as the text editor in Spyder?
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=669
The text was updated successfully, but these errors were encountered: