sample .vimrc for text use.

65 views
Skip to first unread message

John Culleton

unread,
May 28, 2016, 11:42:00 AM5/28/16
to vim...@googlegroups.com
I set up my .vimrc many years ago. recently my
computer died and my .vimrc went with it. I use
vim for creating text documents. It would save me
many hours of cut and try if someone could
recommend or send me a .vimrc or .gvimrc set up
for left justified text with paragraphs separated
by a blank line. I also had an F key function
that would rejustify all the paragraphs of the
document where I had added or deleted text. Does
that ring a bell with anyone?

Thus far all I have is the line:
set textwidth = 72
and that took some hours of research in my copy
in the Oualine book (2001 version.)

Sven Guckes

unread,
May 28, 2016, 12:12:07 PM5/28/16
to vim...@googlegroups.com
* John Culleton <Jo...@wexfordpress.com> [2016-05-28 17:53]:
> I set up my .vimrc many years ago. recently my computer died and
> my .vimrc went with it. I use vim for creating text documents.
> It would save me many hours of cut and try if someone could
> recommend or send me a .vimrc or .gvimrc set up for left
> justified text with paragraphs separated by a blank line.

well - paragraphs are *defined* as block of
non-empty lines separated by the *empty* lines
around them. no need for any setup here.

> I also had an F key function that would
> rejustify all the paragraphs of the document
> where I had added or deleted text.
> Does that ring a bell with anyone?

this one rejustifies the current paragraph:

map <f1> gqip

this one rejustifies all text:

map <f2> 1GVGgq

> Thus far all I have is the line:
> set textwidth = 72
> and that took some hours of research in my
> copy in the Oualine book (2001 version.)

well, book dont rearrange themselves
to what you are sarching for. ;)

how about this one:
http://www.guckes.net/Setup/vimrc.minimal

explanation:
http://www.guckes.net/vim/setup.html

take a look at ":set" for what is really changed.
and then there is this great command ":options"
which creates a HUGE setup file with everything. :)

back up your setup. put it online.
you might find a backup in google.. ;)
https://www.google.de/search?q=sven.guckes+vimrc
whee - 2100 hits \o/ however, on page #11 is says:
"In order to show you the most relevant results,
we have omitted some entries very similar
to the 102 already displayed" - ah, well..

you might also want to ask interactively
on IRC on channel #vim. there are usually
over 1000 clients/nicks connected to that channel.

here is how: http://webchat.freenode.net/
choose a nickname, choose "#vim" as the channel,
you might want to "auth" to services,
and check that "i'm not a robot" box -
and then you (click on) "connect".

as the channel topic says:
"Don't ask to ask!
| Use :help and :helpgrep
| WIKI: http://vim.wikia.com
| PASTE: http://vpaste.net/?ft=vim

good luck in recreating your setup file! :)

Sven

--
http://www.guckes.net/Setup/vimrc
http://www.guckes.net/Setup/vimrc.forall
http://www.guckes.net/Setup/vimrc.mine
.
"Vi IMproved -- Vim"
http://vim.sourceforge.net/docs.php
by Steve Oualline vim-book(at)mail.oualline.com
ISBN: 0735710015 (New Riders, April 2001)
http://www.newriders.com/books/opl/ebooks/0735710015.html
http://www.truth.sk/vim/vimbook-OPL.pdf

John Culleton

unread,
May 28, 2016, 1:10:34 PM5/28/16
to vim...@googlegroups.com
Exactly what I was looking for. Thanks to all who
responded.

JohnBeckett

unread,
May 28, 2016, 7:39:36 PM5/28/16
to vim_use
On Sunday, May 29, 2016 at 1:42:00 AM UTC+10, wexfordpress wrote:
> I set up my .vimrc many years ago. recently my
> computer died and my .vimrc went with it.

http://vim.wikia.com/wiki/Example_vimrc

John

kamaraju kusumanchi

unread,
May 31, 2016, 1:14:13 AM5/31/16
to vim...@googlegroups.com
On Sat, May 28, 2016 at 11:41 AM, John Culleton <Jo...@wexfordpress.com> wrote:
> I set up my .vimrc many years ago. recently my
> computer died and my .vimrc went with it.

Sorry, I cannot help much with the formmatting question. But two suggestions.

1) Consider setting up a repository in places like gitlab to store
your custom configuration files. For example, I store all my dotfiles
in https://gitlab.com/d3k2mk7/dotfiles/ and you can see my vimrc at
https://gitlab.com/d3k2mk7/dotfiles/blob/master/vim/vimrc . You can
use gitlab or github or any other repository hosting service. While
both gitlab and github offer free public repositories, the advantage
of gitlab is that it offers free private repositories.

2) Make backups

raju
--
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

A. S. Budden

unread,
May 31, 2016, 5:50:29 AM5/31/16
to vim...@googlegroups.com
I'll echo raju's comment about keeping vimrc under version control,
but from your description I imagine that the 'F' key was mapped as:

map F gggqG

:help gg
:help gq
:help G

Al
Reply all
Reply to author
Forward
0 new messages