
Textmate to VIM - bsg75
http://www.jackkinsella.ie/2011/09/05/textmate-to-vim.html
======
tsm

        yy
        Copies the current selection, or, if there is no selection, the current line
    

Nope, if you've already selected something that's going to leave you in the
one-y-received-now-please-indicate-the-object-you-want-to-yank state. It's
absolutely critical to understand the verb-object grammar of Vim, and
understand how visual mode interacts with that. Don't memorize permutations of
y, just memorize how to move, and the fact that y yanks. </rant>

------
jlgreco
> _:e FILENAME Use Tab completion after typing the first few letters You may
> need to save your current file first_

If you need to save before opening another file, then you should add _set
hidden_ to your ~/.vimrc

It is a crime this isn't the default.

------
aidos
This is a really good overview. I've only been using VIM full time (more or
less) for about a year so I know there's still a lot to learn. Every article
has a little hint in there somewhere. I didn't know about moving lines up /
down like that.

~~~
macbony
:t is the "copy" version of the command. It's shorter than :co[py].

------
adambrod
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!

~~~
pyrotechnick
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 :)

~~~
hack_edu
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.

~~~
pyrotechnick
Fortunately, it's open-source so we have only ourselves to blame and
absolutely nothing to complain about.

<https://github.com/sublimehq/Vintage>

~~~
skinnymuch
Time and attention are worth something

------
wildgift
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?

~~~
lucian303
This was my question as well. I have seen it a lot. I understand it for people
that have vim ingrained in their fingers (muscle memory).

I do not understand the reason for this at all for people who don't know vim.
There are plenty of other editors that are just as feature rich, if not more
so (Sublime and PSPad come to mind). Also, if you need the GUI based macvim,
you lose the most important feature of vim and the actual main reason for its
popularity today: the ability to edit files locally or remotely inside a shell
that supports only text.

Then again, choosing inferior technology is actually quite common these days,
as the widespread use of Rails easily demonstrates.

~~~
X-Istence
MacVim can have all of it's toolbars removed (that's what I do). The only
reason I use MacVim over vim in a terminal is because I hate hunting for my
editor in all of the tabs I generally have open in my terminals...

~~~
revaaron
I'm on Windows and Linux, but my reasoning is similar. I also occasionally use
the mouse for text selection. On Windows I especially like using GVIM over VIM
because of the extremely limited font selection for the Windows terminal.

------
matthiasv
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.

~~~
vacri
_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.

------
iamartnez
There is a nice VIM plugin for renaming the current file you're editing. I use
this a lot:

<http://www.vim.org/scripts/script.php?script_id=1928>

------
bla2
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.

~~~
udp
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.

~~~
shredfvz
For me, p is for pasting between open buffers, and <leader>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 <leader>y "+yy
        " paste from clipboard
        map <leader>p "+p

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

In addition, I found this:

    
    
        vmap <C-c> "+y

