* Eric Weir [2011.04.14 09:00]:
> I've started writing with Vim. 

Congratulations!

> For now it'll be mainly in my journal and to keep todo lists. Very
> awkward, of course, but I can move around; insert and delete text;
> create, save, and open files. 

That's how we all started.

> I did ":set linebreak" in a file. I see that it isn't retained when I
> save, close, and then reopen a file. How do I make this default?

You need to put that command in a file that vim reads when it starts up.
That file is called a "vimrc" file. If you give that file just the right
name and put it in just the right directory, vim will automatically read
it when it starts up without you having to do anything special. If you
read ':h vimrc' you will find you what you need to name the file and
where to put it for your specific system. Since you're on a MAC this
will likely be something like: /Users/eric/.vimrc or something like
that.

The format of the commands in the file is exactly what you type in the
command-line (i.e. where you typed ":set linebreak" before), except you
don't need to put the colon every time. So to set the linebreak option
from a file, you need to write 'set linebreak' in the file.

It's likely you will accumulate many customizations over time about the
way you like vim to work. It's a good idea to create that file and maybe
even keep it open in vim while you work. That way you can add to it as
you discover what your preferences are, and it will make you learn how
to navigate windows and buffers as a bonus.

> I'm finding h, j, k, l; e, b; $, 0; and H, M, L a bit limited as ways
> to move around the screen. 

And indeed they are, but they barely scratch the surface of the motion
commands at your disposal. You could try <C-F>, <C-B> for the equivalent
of <PageUp>, <PageDown> (those should work too, but I find them way too
far away on my keyboard).

> Forgive me ridiculously elementary questions. I know there is
> excellent documentation in Vim itself, online, and in books. I'll make
> better use of them once I'm over the initial hurdles.

No need to feel bad. You're going at it just the right way: *using* vim
to generate questions, getting answers and moving on to using it some
more.

Before you know it you'll have your first "Aha!" moment when you'll
discover a feature really useful to you that you had never even thought
could exist.

Keep it up.

HTH,

-- 
JR

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to