Author Topic: Is that possible with Slickedit?  (Read 6069 times)

ts-tum

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Is that possible with Slickedit?
« on: October 09, 2007, 07:16:28 pm »
Hi,

There are two "features" I can't get to work in Slickedit:

(1) Is there a keybinding or is it possible to define one in order to quickly "Go to the last edit location", e.g. I edit some code, then I navigate some symbols or look something up in other files, and then with only one keypress I want to go immediately back to the last edit location (the place where I most recently changed something).

(2) Is it possible to use the *same* keybinding for commenting *and* uncommenting code? Already commented code would be uncommented and vice versa.

Best Regards,
Tom
« Last Edit: October 09, 2007, 07:19:40 pm by ts-tum »

StephenW

  • Senior Community Member
  • Posts: 189
  • Hero Points: 21
Re: Is that possible with Slickedit?
« Reply #1 on: October 09, 2007, 08:01:43 pm »
(1) It is always possible to drop a bookmark so that you can go back to that spot, but I always find that I have forgotten to do that, so your idea of a "last edit location" sounds really good.

(2) I think the problem with toggling between commented and uncommented is that sometimes you are commenting comments!  But it should be possible to write a macro that looks at the code and decides that if the cursor is already in a comment it should run "comment_erase", and otherwise runs "comment".  I suspect that someone out there may already have done this.

hs2

  • Senior Community Member
  • Posts: 2749
  • Hero Points: 289
Re: Is that possible with Slickedit?
« Reply #2 on: October 09, 2007, 08:03:36 pm »
(1) there are (multilevel) 'back' and forward' commands you could bind to appr. keys
(2) see http://community.slickedit.com/index.php?topic=1789.msg8651#msg8651
Have fun,
HS2

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Is that possible with Slickedit?
« Reply #3 on: October 09, 2007, 09:03:15 pm »
Quote
(1) Is there a keybinding or is it possible to define one in order to quickly "Go to the last edit location", e.g. I edit some code, then I navigate some symbols or look something up in other files, and then with only one keypress I want to go immediately back to the last edit location (the place where I most recently changed something).

I think what you want is undo_cursor...check it out.  This is what we use to implement Vim's '. functionality, which jumps back to the last edit location.

- Ryan

hs2

  • Senior Community Member
  • Posts: 2749
  • Hero Points: 289
Re: Is that possible with Slickedit?
« Reply #4 on: October 09, 2007, 09:31:41 pm »
But 'undo-cursor' works only for the active buffer, right ?
@ts-tum: for symbol based navigation CTRL-DOT/-COMMA (push-tag/pop-bookmark) are fine.

HS2

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Is that possible with Slickedit?
« Reply #5 on: October 09, 2007, 09:33:16 pm »
Ah, that's right.

ts-tum

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: Is that possible with Slickedit?
« Reply #6 on: October 09, 2007, 11:21:52 pm »
Dear all,

first of all, thank's for these quick replies!

@StephenW:
(1) It is always possible to drop a bookmark so that you can go back to that spot, but I always find that I have forgotten to do that, so your idea of a "last edit location" sounds really good.
I forget dropping bookmarks before temporarely moving to other files/locations too. And this "go to last edit location" idea isn't mine, but a cool built-in feature of the "IntelliJ IDEA" Java IDE, which I strongly miss while editing non-Java stuff with Slickedit.

@hs2:
(1) there are (multilevel) 'back' and forward' commands you could bind to appr. keys
This isn't exactly what I'm looking for, as it generally requires multiple steps/keystrokes and some concentration from the user until reaching the last edit location.

@ts-tum: for symbol based navigation CTRL-DOT/-COMMA (push-tag/pop-bookmark) are fine.
But you have to "reverse" the *complete* symbol-navigation path until reaching the "startpoint" again. What I want, is *one* simple keystroke, which leads me directly back to the last edit location, regardless of the number of navigation steps/tag pushes I have done before.

@Ryan and @hs2:
Yes, unfortunately, 'undo-cursor' works only for the active buffer.

Best Regards,
Tom
 
« Last Edit: October 09, 2007, 11:29:54 pm by ts-tum »

hs2

  • Senior Community Member
  • Posts: 2749
  • Hero Points: 289
Re: Is that possible with Slickedit?
« Reply #7 on: October 10, 2007, 12:14:35 am »
Ok - if it's agreed that the 'last edit location' is the position in a buffer/file where the last buffer/file modification (cursor movements are not considered) was done, I think the Slickteam could think about a schedule for this quite useful feature. Stack-based navigation is sometimes a bit clumsy and sometimes it's the best way. This applies to both nav. methods (forward/back + undo-cursor and push-tag/pop-bookmark).

HS2

asipe

  • Senior Community Member
  • Posts: 113
  • Hero Points: 4
Re: Is that possible with Slickedit?
« Reply #8 on: October 10, 2007, 12:06:07 pm »
Quote
Ok - if it's agreed that the 'last edit location' is the position in a buffer/file where the last buffer/file modification (cursor movements are not considered) was done

+1 for this :)

ts-tum

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: Is that possible with Slickedit?
« Reply #9 on: October 10, 2007, 12:10:34 pm »
Ok - if it's agreed that the 'last edit location' is the position in a buffer/file where the last buffer/file modification (cursor movements are not considered) was done, I think the Slickteam could think about a schedule for this quite useful feature.
+1