merrickp / JumpMarks

Xcode plugin for numbered bookmarks
61 stars 7 forks source link

Adjust marks to line changes #1

Open merrickp opened 9 years ago

kirkgcm commented 9 years ago

Ever since moving to xcode/mac from pc/visual studio 3 yrs ago, missing bookmarks was a serious issue for me.

only today (aug 8 '15) did i find this (and xcodebookmarks by nicoster). i have always had a problem with not being able to jump around between 2 or more locations efficiently while debugging, this was a pleasant surprise to find, especially nicoster's which mimicked the use of visual studio's F2 to toggle/goto, nice.

but, these bookmarks do no adjust automatically when new lines are inserted. even though nicoster's bookmarks (really breaks) move with lines inserted above, the goto returns to the original line number. this one, the graphics stays put.

this imho makes it almost useless. can this be fixed????

merrickp commented 9 years ago

Thanks for the feedback. I have in plan to store the source code line just like the annotation/breakpoint system that nicoster's plugin is relying on to keep the line location.

kirkgcm commented 9 years ago

I have since found that the line info of breakpoint will correct itself after a successful compile, but thats a headache as if you bounce around using bookmarks mostly while modifying/fixing bugs and compile errors will exist until that settles, so you can't compile immediately.i have found that if you move a breakpoint one line down and then back up that would fix it but i don't know how to do this programmatically, as an idea would be to move all breaks slightly just before nextbookmark jump regarding your app, i imagine if you could intercept "newlineadded" (or whatever its called) then increment all bookmarks higher than that line, you would be fixed. how difficult do you think that is?I have zero experience with plugins, and i don't have time to jump to this right now, but i really appreciate that someone has addressed the missing bookmark functionality of Xcode, thanks a mil.

Date: Sun, 9 Aug 2015 00:59:40 -0700 From: notifications@github.com To: JumpMarks@noreply.github.com CC: kirk_gcm@hotmail.com Subject: Re: [JumpMarks] Logo (#1)

Thanks for the feedback. I have in plan to store the source code line just like the annotation/breakpoint system that nicoster's plugin is relying on to keep the line location.

— Reply to this email directly or view it on GitHub.

merrickp commented 9 years ago

You're welcome! Since the functionality is not documented, the hard part is to introspect the system to see what notification or signal I can hook on to. There are also multiple ways to modify a file (typing, pasting a block, the refactor function, and outside of the file (e.g. when I use Sublime Text for the multiple cursors)). It may be turn out to be very straightforward based on what is available, but I have to find that out first.

kirkgcm commented 9 years ago

thanks for your efforts, i will make some time to learn your project and see if i can find how to make changes to complete the little snag, or maybe make one of my own. if I learn how to insert a comment line and search for it, i might try a slightly different approach, not as nice but it would get it done. btw there is another thing that i sorely miss from visual studio, i use to live by this, it was control tab, it flipped back and forth between the previous and current file. it worked like this; control tab, tab, tab cycled thru all open files, but control tab, release, control tab release went back to previously visited file, back to current, back to previous, back to current etc.i would love to have that in xcode. just an idea that you might like. also note: i never used the modern visual studios, i had over 10 years with vc6, still use it using wine on mac, knew it and mfc better than i knew myself.

Date: Sun, 9 Aug 2015 13:59:09 -0700 From: notifications@github.com To: JumpMarks@noreply.github.com CC: kirk_gcm@hotmail.com Subject: Re: [JumpMarks] Logo (#1)

You're welcome! Since the functionality is not documented, the hard part is to introspect the system to see what notification or signal I can hook on to. There are also multiple ways to modify a file (typing, pasting a block, the refactor function, and outside of the file (e.g. when I use Sublime Text for the multiple cursors)). It may be turn out to be very straightforward based on what is available, but I have to find that out first.

— Reply to this email directly or view it on GitHub.

nbhhcty commented 8 years ago

For a simple jump, the more convenient than XToDo. But after xcode update can not be used, and can update it?

merrickp commented 8 years ago

@nbhhcty Just updated