Live data from Hacker News

Textmate to VIM

jackkinsella.ie

31–40 of 42 posts

Re: Textmate to VIM

#31
Sadly, this article never tries to teach Vim from a language standpoint, in which you use verbs and objects to describe text manipulations. It just gives some god-given key sequences resulting in the same actions as in Textmate but without any explanation why things are happening.

Re: Textmate to VIM

#32

Sadly, this article never tries to teach Vim from a language standpoint, in which you use verbs and objects to describe text manipulations. It just gives some god-given key sequences resulting in the same actions as in Textmate but without any explanation why things are happening.

This guide makes a few assumptions:

...

5. You’ve already learned the basics of VIM. If you haven’t type vimtutor in your terminal for a 20 minute tutorial.

--

It's not meant to be a newbie's guide.

Re: Textmate to VIM

#33

Earlier quoted context omitted.

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…

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.

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

#34

Earlier quoted context omitted.

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 tipp…

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…

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.

Re: Textmate to VIM

#35
post #12
post #9

cmd-o, cmd-s and so on Just Work in macvim too. cmd-c is "*yy in vim. Just yy writes to vim's internal clipboard, not to the system clipboard.

I prefer my default vim clipboard to be the system clipboard: set clipboard=unnamed Being able to yank and then paste in other software (or vice versa) is pretty handy.

This is nice, except that every cut gets added to the clipboard. Including deleting an individual character. Deleting/cleaning up text ... it all goes into the clipboard. Soon my clipboard is full of junk.

I'd have liked only yanked stuff going onto the clipboard, not deleted stuff.

Re: Textmate to VIM

#36
post #12

Earlier quoted context omitted.

I prefer my default vim clipboard to be the system clipboard: set clipboard=unnamed Being able to yank and then paste in other software (or vice versa) is pretty handy.

For me, p is for pasting between open buffers, and p is for pasting between programs. This way you can paste from an open buffer, and paste from the system clipboard with no go-between. vimrc: " copy to clipboard map y "+yy " paste from clipboard map p "+p

Thanks, this answers my previous point, of having set clipboard push every delete/cut into the clipboard.

In addition, I found this:

    vmap  "+y

Re: Textmate to VIM

#37

Why are people moving to vim? I've used it for a long time, but mainly because used vi back in the late 80s, and it was the most familiar cross-platform style of editor at the time. I don't think it's that much more (or less) powerful than the other really good editors (Emacs included). TextMate seemed really awesome, as did BBEdit, so why not stick to what you know?

Whenever there's a Vim article on HN, the same questions and comments appear. Is Vim really all that? Isn't it really old? I'm already using BBEdit/Textmate/Emacs/Notepad++/Sublime Text/the editor du jour - is it worth it to switch?

That's when I post links to articles like "Why, oh WHY, do those #?@! nutheads use vi?" http://www.viemu.com/a-why-vi-vim.html and "Coming Home to Vim" http://stevelosh.com/blog/2010/09/coming-home-to-vim/, "The vim learning curve is a myth" http://robots.thoughtbot.com/post/13164810557/the-vim-learni..., etc.

Even though I have several different editors on my Mac, including ones I've paid for like BBEdit, I've been pretty much using Vim exclusively for nearly 8-10 months and it's been great.

I started to get interested in Vim last year because of all of the blog posts from folks looking to switch from Textmate for a variety of reasons. And since Textmate was THE editor on the Mac for quite some time, I was curious why accomplished developers were moving away from it.

Of the many things I like about Vim, the one that sticks out for me: there's no ceiling on what it can do and what you can do with it compared to other editors. There's an internal consistency about it that I appreciate--the Vim "language".

Articles like this one "Learn to speak vim – verbs, nouns, and modifiers!" http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-n... really brought the concept home for me.

Re: Textmate to VIM

#38

Why are people moving to vim? I've used it for a long time, but mainly because used vi back in the late 80s, and it was the most familiar cross-platform style of editor at the time. I don't think it's that much more (or less) powerful than the other really good editors (Emacs included). TextMate seemed really awesome, as did BBEdit, so why not stick to what you know?

I went Dreamweaver -> BBEdit -> TextMate -> Vim.

I hated DW's bloat and I knew how to write HTML/CSS/JS by hand so I turned to what was considered the top text editor on Mac OS 9 at the time. I liked it and used it for a few years until I upgraded to Mac OS X. At that time, I simply fell in love with the command line and the beauty of TextMate's snippets and Cmd+T and many refinements. The love story quickly turned into boredom and TM soon took the road to nowhere. This happened at a time I wanted to switch to Linux full-time so I spent a year trying every cross-platform editor/IDE I could find. I finally chose Vim which blew my mind and still does at time.

Curiosity paid, in my case.

Re: Textmate to VIM

#39
post #12
post #9

cmd-o, cmd-s and so on Just Work in macvim too. cmd-c is "*yy in vim. Just yy writes to vim's internal clipboard, not to the system clipboard.

I prefer my default vim clipboard to be the system clipboard: set clipboard=unnamed Being able to yank and then paste in other software (or vice versa) is pretty handy.

    set clipboard=unnamed
breaks a few register operations. You should use

    set clipboard+=unnamed
instead.

Re: Textmate to VIM

#40
post #12

Earlier quoted context omitted.

I prefer my default vim clipboard to be the system clipboard: set clipboard=unnamed Being able to yank and then paste in other software (or vice versa) is pretty handy.

This is nice, except that every cut gets added to the clipboard. Including deleting an individual character. Deleting/cleaning up text ... it all goes into the clipboard. Soon my clipboard is full of junk. I'd have liked only yanked stuff going onto the clipboard, not deleted stuff.

    "_
is the "blackhole" register.

Add these lines to your ~/.vimrc:

    nnoremap d "_d
    vnoremap d "_d
and enjoy "real" deletion.
Post reply on HN