Author Topic: Wishlist for enhancements  (Read 11163 times)

FullyArticulate

  • Community Member
  • Posts: 21
  • Hero Points: 4
Wishlist for enhancements
« on: December 07, 2007, 11:07:30 pm »
I'm new to SlickEdit, and love it! It does what I always wanted emacs or Eclipse to do. It seems pretty close to perfect, except for a couple of stumbling blocks I've found in my conversion from Emacs. Maybe some other users can contribute their wishlists here too.

1) Emacs-emulation mode, Ctrl-x Ctrl-b invokes "find-buffer" with a default name of the current buffer you're already editing (or maybe it's the name of the last buffer you loaded? I don't know). You almost certainly don't want to find your current buffer by default! :-) In emacs, ^x^b defaults to the previous buffer you edited. That way you can toggle back and forth between two buffers with a simple ^x^b <return>.

2) Ctrl-x Ctrl-f invokes a nice file browser, but it requires you take your hands off the keyboard to use a mouse to navigate. It would be great if there were a mode that would allow you to load files (with autocomplete) solely from the command line. Again, just like Emacs.

3) In vi insert mode, if I'm typing along and an auto-complete box pops up, ESC just makes the autocomplete box go away, it does not take me out of edit mode. It might be nice for the ESC key to optionally close the autocomplete box AND take me out of edit mode.

4) In vi-mode, if I delete a group of lines and then undo, keep my cursor at the same spot from which I started. For example, go to a block of code, and type "d20d" to delete 20 lines. Then hit "u" to undo. For some reason, your cursor is now on a different line (sometimes several lines away) from where you typed the initial delete command.

5) In Ctrl-x Ctrl-b "find buffer", if I type in the name of the buffer I want, it ignores me. I have to actually highlight it in the combo box. It would be nice if it autocompleted the buffer name from the combo box.

Thanks for listening, and making a great editor!
« Last Edit: December 07, 2007, 11:48:30 pm by FullyArticulate »

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Wishlist for enhancements
« Reply #1 on: December 07, 2007, 11:20:12 pm »
I find #3 frustrating, as well -- I'd like ESC to go from insert mode to command mode, regardless of any popups.


evanratt

  • Senior Community Member
  • Posts: 300
  • Hero Points: 23
Re: Wishlist for enhancements
« Reply #2 on: December 08, 2007, 12:10:52 am »
Hope these help:

1) I have "Ctrl-x b" bound to "select-buffer", which I think does exactly what you want. Prompts for a buffer to switch to, with the default being the previously edited buffer in that window. Documentation even says it's used for Emacs emulation.

2) I have "Ctrl-x Ctrl-f" bound to "edit" which prompts for a filename, with autocomplete, from the command line, just like Emacs.

5) I do see what you mean with find-buffer. As a partial solution, you can press Tab to autocomplete the filename with the actual entry from the combo box. I actually use "list-buffers" to switch between buffers more frequently (bound to "Ctrl-X Ctrl-b"). It brings up a window to select a buffer from, but it actually functions about the same as if it were on the command line. As I start typing it fills in the filter box and the list narrows down, so if I've typed the full name of the file that's open, it's the only one listed and I can just hit Enter. Otherwise, I have keys bound to scroll up and down that list, so I have mouse-free operation of that list.

FullyArticulate

  • Community Member
  • Posts: 21
  • Hero Points: 4
Re: Wishlist for enhancements
« Reply #3 on: December 08, 2007, 12:28:40 am »
1) select-buffer is exactly what I wanted (I had it bound to find-buffer) (I misspoke in my original post, I meant "Ctrl-x b", not "Ctrl-x Ctrl-b").

2) edit (instead of gui_open) did what I wanted as well.

Thanks!

FullyArticulate

  • Community Member
  • Posts: 21
  • Hero Points: 4
Re: Wishlist for enhancements
« Reply #4 on: December 19, 2007, 03:43:07 am »
I've got a quick fix for #3. Add the following to your vusrmacs.e:


void egs_codehelp_hardesc()
{
  XW_TerminateCodeHelp();
  vi_escape();
}

defeventtab codehelp_keys;
def ESC=egs_codehelp_hardesc;

void egs_autocomplete_hardesc()
{
  AutoCompleteTerminate();
  vi_escape();
}

defeventtab auto_complete_keys;
def ESC=egs_autocomplete_hardesc;


Hitting esc will close all help windows AND take you out of insert mode (in both codehelp and autocomplete modes).
« Last Edit: December 19, 2007, 06:16:41 am by FullyArticulate »

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Wishlist for enhancements
« Reply #5 on: December 19, 2007, 04:12:10 pm »
Alright...we are going to add in a def-var to control the behavior requested in #3.  It may seem like you would never want this to even be an option, but to just "be that way"...but there are people who will definitely be surprised (and irritated) when they hit ESC and additional operations are performed outside of dismissing codehelp.

So in v13...this will be controlled by def_vim_esc_codehelp, defaulted to off.  Hopefully this makes everyone happy...at least for this particular request :).

- Ryan

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Wishlist for enhancements
« Reply #6 on: December 19, 2007, 06:11:51 pm »
Quote
4) In vi-mode, if I delete a group of lines and then undo, keep my cursor at the same spot from which I started. For example, go to a block of code, and type "d20d" to delete 20 lines. Then hit "u" to undo. For some reason, your cursor is now on a different line (sometimes several lines away) from where you typed the initial delete command.

Are other people seeing this behavior?  I can't reproduce this...

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Re: Wishlist for enhancements
« Reply #7 on: December 19, 2007, 06:14:00 pm »
yea  ;D  the sometimes I can j and sometimes I get j is irritating.  I just got in the habit of hammering ESC.  My left little fingee has a really big callus.

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Wishlist for enhancements
« Reply #8 on: December 19, 2007, 06:17:08 pm »
yea  ;D  the sometimes I can j and sometimes I get j is irritating.  I just got in the habit of hammering ESC.  My left little fingee has a really big callus.

Actually, I have gotten into the same habit...I think that's why it has never really bothered me.  You hit ESC with your left pinky finger?  Maybe it's just my keyboard layout (curved), but if I did that and I worked in Vim (like I do)...I think my wrist would be broken by now.

FullyArticulate

  • Community Member
  • Posts: 21
  • Hero Points: 4
Re: Wishlist for enhancements
« Reply #9 on: December 19, 2007, 06:52:32 pm »
I think the cursor movement immediately before the cut is included in the paste.

Here's how you reproduce:
1) Got the line below (or above) where you want to delete.
2) Hit 'k' (or 'j') to move to the start of the block you want to delete.
3) 'd5d' to delete the 5 lines
4) 'u' to undo

Notice the cursor movement immediately before the delete command is included in the undo.

I've included a video demonstrating this. Each time a block disappears, I'm simply doing a "d5du".
http://www.engarde.com/wrongline.swf. Notice the undo not only undoes the delete, but also the cursor movement immediately preceding it.

Also, please see my post here:
http://community.slickedit.com/index.php?topic=2466.msg10299#msg10299

Paste is moving the cursor inappropriately too.

Thanks for the esc-to-cancel-everything fix (or break, depending on your point of view)!! :-)
« Last Edit: December 19, 2007, 06:56:37 pm by FullyArticulate »

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Wishlist for enhancements
« Reply #10 on: December 19, 2007, 09:00:53 pm »
Thanks...I see what you are talking about now that I know what I'm looking for.  Oh, and hero point for the video :)

We have been examining the undo behavior in Vim since you made that post...we are looking into this for v13.  I'll keep the Vim crowd updated.

- Ryan

Meco

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Wishlist for enhancements
« Reply #11 on: December 20, 2007, 08:41:38 am »
I have another suggestion.
If you have two files in your project: YourMatch.cpp and NotYourMatch.cpp
Now if you choose "project-load" and type "YourMatch" it will first select NotYourMatch.cpp, because N is before Y.
Please change it so that YourMatch.cpp is selected first (but still show NotYourMatch.cpp)

In general, first select the filename that starts with the filter-criteria. Thanks!

mreaves

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Wishlist for enhancements
« Reply #12 on: December 20, 2007, 10:06:27 am »
When I use brace expansion, for example when typing...

If ( )
{
}

Could the intellisense thing become active while you are doing this?

hs2

  • Senior Community Member
  • Posts: 2738
  • Hero Points: 288
Re: Wishlist for enhancements
« Reply #13 on: December 20, 2007, 12:54:04 pm »
@Meco: When you're using v12 'Files TB' you can select 'Prefix match' in the context menu.
HS2

fastdad

  • Community Member
  • Posts: 5
  • Hero Points: 1
Re: Wishlist for enhancements
« Reply #14 on: December 27, 2007, 09:25:01 pm »
I tried the fix for #3 and I like it. I had complained about this before and I'm glad to see a work around. Vi emulation should work like vi.

-Mike