Author Topic: Improved Vim Visual Mode emulation  (Read 5686 times)

alex

  • Community Member
  • Posts: 64
  • Hero Points: 6
Improved Vim Visual Mode emulation
« on: June 02, 2007, 03:07:46 pm »
I've been working on upgrading Vim visual mode support in SE.  I think I've gotten it to the point where I can release it for feedback.

Features:

support for {,}, %, and most of the other Vim movement commands that don't work out of the box in SE 12's Vim emulation's visual mode.

Support for using < and > to indent/unindent in visual mode.

pressing : in visual mode causes the EX commands to automatically take on the range of visually selected text (note that it's a little annoying because you have to deselect the text that gets put in the command-line and then add the rest of your command after it.  Is there an easy fix that doesn't involve hacking SE internals?)

I cannot guarantee that this file will not do bad things to you.  It works in my environment, but it may have dependencies on other macros I've written that I don't realize.

I use this file with SE 12.0.1.  I used a previous version in SE 11, so it _may_ work for you in SE 11.

Also, it will blow away any of you current visual mode key bindings to rebind various keys in visual mode to the right visual mode command.

Oh, and I bound C-U and C-F to page up and page down, whereas C-U is usually scroll-up, which I don't use myself.  Feel free to change keybindings in the file.

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Improved Vim Visual Mode emulation
« Reply #1 on: June 04, 2007, 01:40:18 pm »
Cool!  I have not downloaded the module yet, but nice job.  The SlickEdit normal Summer release will have a bunch of enhancements to our Vim emulation...including all the visual mode features listed in this post.

- Ryan

 

Brandon Hamm

  • Community Member
  • Posts: 30
  • Hero Points: 1
Re: Improved Vim Visual Mode emulation
« Reply #2 on: June 04, 2007, 11:08:06 pm »
Alex, you're a life saver!

Quote
Support for using < and > to indent/unindent in visual mode.

pressing : in visual mode causes the EX commands to automatically take on the range of visually selected text (note that it's a little annoying because you have to deselect the text that gets put in the command-line and then add the rest of your command after it.  Is there an easy fix that doesn't involve hacking SE internals?)

These two alone are worth their weight in gold IMHO (and I can deal with that small annoyance for the time being)....I'm excited by Ryan's post about forthcoming Vim emulation enhancements, but you really deserve a pat on the back for posting these.

Again, truly excellent work!

drisner

  • Community Member
  • Posts: 15
  • Hero Points: 2
Re: Improved Vim Visual Mode emulation
« Reply #3 on: June 27, 2007, 07:47:10 pm »
Thank you very much.  This definitely helps.

Marcus

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Re: Improved Vim Visual Mode emulation
« Reply #4 on: June 29, 2007, 05:01:21 pm »
I would like to thank alex as well for vimode.e. It has made my vimlife feel much more natural when using SlickEdit, much less resorting to 'unnatural' means in getting the job done. Also glad to hear Slickedit is enhancing the emulation. Great stuff!!

Marcus

alex

  • Community Member
  • Posts: 64
  • Hero Points: 6
Re: Improved Vim Visual Mode emulation
« Reply #5 on: June 30, 2007, 01:54:12 am »
Wow, it's great to know that this is helping fellow Vi(m) emulation users!  You are all very welcome :)

Hammytime

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Re: Improved Vim Visual Mode emulation
« Reply #6 on: April 10, 2013, 08:07:16 pm »
This was a great find!  Thanks for posting this.  I have one question though.  I tried to strip the commands out of your vimode.e and put them in the vivmode.e within the SlickEdit\macros folder.  After putting the defs in videf.e I was able to see them in the Tools\Options\Key Bindings list but When I bound the keys nothing happened.  If I just drop your file into my macros folder, BOOM! everything works.  Anyone know why?
I am using SlickEdit 11.0.2