News for hackers. Stuff that matters.
Re:Textmate to VIM by adambrod on Saturday November 10, 2012 @01:37PM (#4767326)
Nice! I just recently switched from Sublime to Vim... this will come in handy!! I've been trying to figure out how to do "Move selected text up" in Vim... Thanks!
Re:Textmate to VIM by tmister on Saturday November 10, 2012 @03:15PM (#4767604)
Just put following line in your .vimrc

nnoremap <silent> <leader>sw kddpk

After that press ,sw to move the line upward.

Re:Textmate to VIM by pyrotechnick on Saturday November 10, 2012 @01:49PM (#4767361)
There's no need to abandon something you've paid money for to utilise features which are otherwise free...

http://www.sublimetext.com/docs/2/vintage.html

https://github.com/sublimehq/Vintage

If you're fortunate enough to be using Sublime on OSX, finding a shortcut is easy as:

1. Opening the help menu - "Command-?" (Command-Shift-/) 2. Entering search terms

Here's a screengrab of the process for your particular query (moving lines up): http://i.imgur.com/j226q.png

And here's a screengrab of CheatSheet (http://cheatsheetapp.com), a utility for quickly reviewing shortcuts in any OSX app, being applied to Sublime: http://i.imgur.com/HPUB4.png

Alternatives for these are available for other platforms, should you not be using OSX. Seek and you shall find :)

Re:Textmate to VIM by jlgreco on Saturday November 10, 2012 @02:57PM (#4767563)
On the other hand, continuing to use something merely because you already paid money for it is a sunken costs fallacy.

Use whatever works best for you, not whatever you already paid for.

Re:Textmate to VIM by pyrotechnick on Saturday November 10, 2012 @03:04PM (#4767578)
Thank you for completely overlooking any of the relevant issues I have attempted to alleviate.

This is why we can't have nice things.

Re:Textmate to VIM by jlgreco on Saturday November 10, 2012 @03:25PM (#4767628)
Aside from the sunken cost fallacy, all you've done is link how to get partial Vi (not Vim, nor even the Ex functionality you find in stock Vi.) functionality in sublime and tell him how to use documentation. I have a feeling that anyone that has decided to switch knows about those things.

As far as I can tell he wasn't even asking for help with sublime, nor did he lay out his reasons for wanting to switch away.

Re:Textmate to VIM by hack_edu on Saturday November 10, 2012 @04:58PM (#4767860)
Unfortunately, Sublime's vintage-mode is very deficient in even the intermediate level Vim bindings. I'll fire it up every week or so, frown after a few minutes, and go back to MacVim.
Re:Textmate to VIM by adambrod on Saturday November 10, 2012 @11:30PM (#4768745)
Yea i'm even running into this and have only been using it for 2 weeks.... sometimes certain things just won't work the same. On the plus side... it's an easy way to dip your toes into the water and get used to normal/insert/visual, which is what I found to be the hardest part.
Re:Textmate to VIM by pyrotechnick on Saturday November 10, 2012 @05:46PM (#4768019)
Fortunately, it's open-source so we have only ourselves to blame and absolutely nothing to complain about.

https://github.com/sublimehq/Vintage

[deleted]
Re:Textmate to VIM by pyrotechnick on Saturday November 10, 2012 @06:07PM (#4768083)
Nature abhors monocultures.

Nature abhors them so much that they do not exist in accordance with nature.

Re:Textmate to VIM by skinnymuch on Saturday November 10, 2012 @08:36PM (#4768442)
Time and attention are worth something
Re:Textmate to VIM by adambrod on Saturday November 10, 2012 @03:56PM (#4767706)
Very true, I am mostly experimenting to see what the hype with Vim is. I meant that I already knew the sb2 shortcut, just not the translation to Vim/MacVim... thanks anyway though!!

I haven't actually abandoned sublime text 2... for the time being i've been using vintage mode as you suggested. I've went cold turkey with MacVim for weekend projects but I still use sublime with vintage for work. If I do reach that tipping point where straight Vim is easier/faster/nicer then I would jump ship.

Re:Textmate to VIM by revaaron on Saturday November 10, 2012 @04:59PM (#4767864)
I think if you're happy with what you're using, stick with it.

I switched from pico/emacs/TextMate/Notepad++ to VIM about three years ago. I always hated vi. I love it now, and really wish I would have switched earlier. But the advantages don't become obvious until you make yourself to live with it for a while. The initial learning curve is pretty steep, but once you get over that hump it's pretty easy going.

This is very different from emacs, which was very easy for me to do simple tasks but very hard for me to do anything complicated. It's also different from pico, TextMate, and Notepad++, which are easy to pick up but plateau, sometimes leaving to write a script to do what you need.

Using a vi-like mode for another editor doesn't really cut it, not unlike an emacs-workalike that isn't built atop a powerful scripting language. For me, it's about the way commands stack and compose rather than using hjkl instead of arrow keys.

Good luck and have fun!

Re:Textmate to VIM by adambrod on Saturday November 10, 2012 @11:34PM (#4768749)
Thanks for the good luck! I've definitely been having fun fiddling with MacVim and it's array of plugins in my spare time. The vi-mode is definitely a limiting factor... I find it great for the getting into basics and getting comfortable, especially once you add a block cursor to help switching modes.