Text and virtual modes

Is it possible to emulate vim modes, macros and bindings in textmate?

+6
vim textmate macos
source share
4 answers

I used to love TextMate, but changed to Vim, finally giving it a chance. I am somewhat surprised that ViMate exists. However, in my experience, vi input modes are a kind of hit and miss. (Example: viper mode in emacs . It closes, but not enough to start using emacs . Also, system-wide key bindings for OS X.) I will be interested to see how this works.

If what you are looking for is β€œMac Integrated Vim” via TextMate, you can try MacVim . This is real Vim, but it has Mac keys and looks prettier. :) (I like gvim , but it’s written in Cocoa, I believe.)

+9
source share

You can use ViMate.

http://www.macupdate.com/info.php/id/27072

This is a list of features already implemented in ViMate. Hope this helps.

Implemented by

traffic
  • k - moveUp
  • j - moveDown
  • l - moveForward
  • h - moveBackward
  • w - moveWordForward
  • b - moveWordBackward
  • e - moveToEndOfWord
  • 0 - moveToBeginningOfLine
  • $ - moveToEndOfLine
  • [motion] - move # number of times

Embed
  • a - insertForward (not repeated)
  • i am insertBackward (not repeating)
  • o - insertBelow (not repeated)
  • O - insertAbove (not repeated)
A cut
  • d - cutSelection
  • dd - cutLine (not repeated)
  • dl, x - cutForward (does not repeat)
  • dh, X - cutBackward (does not repeat)
  • dw - cutWordForward (does not repeat)
  • db - cutWordBackward (does not repeat)
  • de - cutToEndOfWord (does not repeat)
  • d0 - cutToBeginningOfLine
  • D, d $ - cutToEndOfLine
copy
  • y - copySelection
  • yy - copyLine (not repeated)
  • yl - copyForward (does not repeat)
  • yh - copyBackward (not repeated)
  • yw - copyWordForward (does not repeat)
  • yb - copyWordBackward (does not repeat)
  • ye - copyToEndOfWord (not repeated)
  • y0 - copyToBeginningOfLine
  • y $ - copyToEndOfLine
+ Change
  • c - changeSelection
  • cc - changeLine (does not repeat)
  • cl - changeForward (does not repeat)
  • ch - changeBackward (does not repeat)
  • cw - changeWordForward (does not repeat)
  • cb - changeWordBackward (does not repeat)
  • ce - changeToEndOfWord (does not repeat)
  • c0 - changeToBeginningOfLine
  • c $ - changeToEndOfLine
Embed
  • P - pasteBefore (cracked end of file)
  • p - pasteAfter (hacky near end of file)
manuscript
  • ctrl-e - scrollLineDown (does not repeat, does not save the caret)
  • ctrl-y - scrollLineUp (does not repeat, does not save the caret)
  • ctrl-f - scrollLineDown (does not repeat, does not save the caret)
  • ctrl-b - scrollLineUp (does not repeat, does not save the caret)
+6
source share

@TK Here's the full list of ViMate teams from The Hungry Cyclist :

 Movement: k - moveUp j - moveDown l - moveForward h - moveBackward w - moveWordForward b - moveWordBackward e - moveToEndOfWord 0 - moveToBeginningOfLine $ - moveToEndOfLine #[movement] - move # number of times Insert: a - insertForward (not repeatable) i - insertBackward (not repeatable) o - insertBelow (not repeatable) O - insertAbove (not repeatable) Cut: d - cutSelection dd - cutLine (not repeatable) dl,x - cutForward (not repeatable) dh,X - cutBackward (not repeatable) dw - cutWordForward (not repeatable) db - cutWordBackward (not repeatable) de - cutToEndOfWord (not repeatable) d0 - cutToBeginningOfLine D,d$ - cutToEndOfLine Copy: y - copySelection yy - copyLine (not repeatable) yl - copyForward (not repeatable) yh - copyBackward (not repeatable) yw - copyWordForward (not repeatable) yb - copyWordBackward (not repeatable) ye - copyToEndOfWord (not repeatable) y0 - copyToBeginningOfLine y$ - copyToEndOfLine Change: c - changeSelection cc - changeLine (not repeatable) cl - changeForward (not repeatable) ch - changeBackward (not repeatable) cw - changeWordForward (not repeatable) cb - changeWordBackward (not repeatable) ce - changeToEndOfWord (not repeatable) c0 - changeToBeginningOfLine c$ - changeToEndOfLine Paste: P - pasteBefore (hacky near end of file) p - pasteAfter (hacky near end of file) Scroll: ctrl-e - scrollLineDown (not repeatable, doesn't keep caret in view) ctrl-y - scrollLineUp (not repeatable, doesn't keep caret in view) ctrl-f - scrollLineDown (not repeatable, doesn't keep caret in view) ctrl-b - scrollLineUp (not repeatable, doesn't keep caret in view) Visual Mode: V - highlight line v - visual mode Repeat: 1,2,3... - repeat next command (buggy) 
+1
source share

Try VicoApp . It is similar to textmate and supports many Vim key bindings.

+1
source share

All Articles