-
-
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
Bookmarks for Spyder Editor #910
Comments
From ccordoba12 on 2013-02-13T09:21:58Z We'll consider them for 2.3 Labels: Cat-Editor MS-v2.3 |
From pierre.raybaut on 2013-05-11T05:42:37Z Labels: -MS-v2.3 MS-v2.4 |
From [email protected] on 2013-09-02T17:43:49Z I have much experience with the Vim method and the method in Delphi (objectpascal) IDE. In Vim the keystroke to set a bookmark (or "mark") is followed by the name of the mark, e.g. . Then, to jump back to mark "a", the keystrokes are <`>. I am used to the Vim method, but I don't think it makes sense to implement this exactly as-is. For spyder, I would much prefer the Delphi method: to set a bookmark, the keystrokes are <[0-9]> So you have 10 slots in which to store a bookmark. Then, to jump back to such a numbered bookmark, say, number 3, the keystrokes are: <3> In Delphi, a little icon with the number of the bookmark is drawn into the gutter of the editor. I am happy to help out with implementing this feature, unless anyone else has already started? |
From [email protected] on 2013-09-07T07:58:26Z An easy way to implement this would be to replicate most of the functionality that already exists for breakpoints, namely:
All one would have to add would be a key combination that would jump to the next bookmark. |
No matter how but I really think that is very important implement it, asap ... |
@goanpeca, what do you think? |
I do not see as so important to be honest, users could use the outline explorer and special comments to have quick access "bookmarks". Overloading functionality on the linenumber does not sound so good... ....
# --- Bookmark 1 This will appear in the outline explorer
....
# --- Bookmark 2 This will appear in the outline explorer We could provide a "Special comments" view to create a better experience @ccordoba12 , PR #2885 #2861 and #2184 are waiting 😈 |
Em 29/12/2015 02:10, Gonzalo Peña-Castellanos escreveu:
I see, but those are not the same thing ..., what you propose is to use Ademir Francisco da Silva Este email foi escaneado pelo Avast antivírus. |
Em 29/12/2015 09:57, Ademir Francisco da Silva escreveu:
Ademir Francisco da Silva Este email foi escaneado pelo Avast antivírus. |
The fact that this feature is not in the Roadmap probably means that it is very low on the priority list and has little chance to be implemented? That's a pity. If I should ever find myself having advanced a lot in Python/GUI programming - any hints of where to start on a feature like this? If I understand correctly, the two approaches mentioned here would either be using the breakpoint framework or that of the Outline Explorer / special comments. I guess the second approach would be easier to implement? Just finding the right regular expression, parsing the name/title of the 'bookmark' and adding it to the project outline in the appropriate location. |
Thanks for your answer ... Em 29/09/2016 10:09, Christopher escreveu:
Ademir Francisco da Silva Este email foi escaneado pelo Avast antivírus. |
Since this feature has not been requested by many users (yet), yes it is indeed not a very high priority, but with this growing interest I can assure you that this is definitely going to be included in Spyder 4.0 or in the Master Branch in a couple of months. The thing is that we are decoupling several parts of the Spyder API and widgets to make them more extendable and that work is currently happening with the editor so we can better support code folding and now this feature. Thanks for using Spyder and suggesting how to make it even better :-) |
Wow !!! Definitely I'm very happy now ... Em 29/09/2016 10:51, Gonzalo Peña-Castellanos escreveu:
Ademir Francisco da Silva Este email foi escaneado pelo Avast antivírus. |
@ccordoba12 Is anyone working on this? I would like to have this feature very much in Spyder. I actually use break points as a way to put bookmarks since I don't use the debugger much... |
Nop, there's none working on it. Would you like to give it a shot? |
Are Spyder Bookmarks still in preparation? |
They'll be added in Spyder 5, to be released in a year or year and a half. |
Thanks for your reply! |
Did a version of this end up making its way into Spyder 5.0.0? I couldn't find anything in the changelog, but it may have been introduced with terminology other than "bookmarks". Thanks! |
No, it didn't and it (most probably) won't arrive until Spyder 6, sorry. |
NP, thanks for the quick reply! |
I would really like this feature too, much like cup holders in cars people realized how useful it was once they had it! |
I think this is also a great solution however there is one problem, if you have functions inside a "bookmark" (with this method) then you would need to indent the entire function (an the rest of your code for that matter) so that the outline navigator understands the hierarchy. Meaning you would have to write your code like this:
which is weird and also raises the pycodestyle warning E113 or E116 (not ideal). Instead it would be nice to have some sort of special comment, say
Oh also, this doesn't seem to work on spyder 5 (it does on spyder 4) -_- |
What you describe sounds great, but a very different experience than what I think the advocates for this feature are referring to. The way we're using the word "bookmarks", we're referring to something much more akin to marks in vi, or bookmarks in Matlab/Visual Studio, which are transient and lightweight, and don't have names (they appear as just dots in the line number area, analogous to the way breakpoints are displayed). Among those examples, I think only VS even stores them from session to session, and only vi lets you bind specific keys to them. The extremely minimalist Matlab approach of just having transient, unnamed marks that appear as little boxes in the line number area - with a single key (F2 in Matlab, and I think also in VS) to cycle through all bookmarks - is fantastically helpful for many workflows. |
Yeah, maybe. I just want a way to organize your code hierarchically |
Yes, this is the way that I picture it (And that I know from other editors). And that would work for me. Just 3 keys (F2, SHIFT - F2 and CTRL - F2 for example) . I now use a quick and dirty AutoIt3 script to call the 'Goto Line' command (CTRL - L) , then paste a line number in it. |
When is it expected for the Spyder 6 release? I want to have this feature. |
Perhaps in the middle of 2023. But I don't know if we'll have time to implement this feature. |
From [email protected] on 2012-01-15T11:12:30Z
Hallo,
The spyder editor should support bookmarks like the VIM-editor or the editor in MATLAB.
Both bookmark-systems differ in the way you set and access the bookmarks and have their own charm.
MALAB:
In Matlab all bookmarks were set with the same bookmark-keyboard-shortcut (Ctrl-F2). This bookmarks can then be cycled trough by pressing a different shortcut like F2.
A short description (including pictures) about the behaviour of the bookmark-system can be found here http://blogs.mathworks.com/desktop/2007/06/15/scroll-less-with-editor-bookmarks/ This variant is better if you have only two or three bookmarks because you do not have to worry about remembering the specific shortcuts for different locations.
VIM
In VIM it is possible to set several bookmarks which can be accessed (moved to) separately.
See http://www.thegeekstuff.com/2009/02/how-to-add-bookmarks-inside-vi-and-vim-editor/ Especially if you use bookmarks a lot it is better to have specific jump-locations so you do not have to cycle trough all of them.
Thanks in advance,
HoWil
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=910
The text was updated successfully, but these errors were encountered: