Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-26-2011, 05:38 AM   #1
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
Lightbulb Post ~/.vimrc --> Share the wealth...

There are so many options in vim I thought it would be helpful to members if we posted files with comments on the options.

Here is mine


syntax on # highlight command syntax
set nu # number lines
set hlsearch # Highlights Searched items
set autoindent # set auto indent. Continues indent until CTL D is hit.
set ruler # shows % of file & cursor position in bottom right.
set history=100 # saves history to 100 commands ( :!Command )
set mouse=a # allows use of mouse --> Visual command

Old 09-26-2011, 09:09 AM   #2
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
set nocompatible			" Get out of vi-compatible mode. 
filetype on				" Detect the type of file. 
set history=1000			" How many lines of history to remember. 
set cf					" Enable error files and error jumping. 
set ffs=unix				" Support Unix file format. 
filetype plugin on			" Load filetype plugins.
set viminfo+=!			        " Make sure we can save viminfo.
set isk+=_,$,@,%,#,-		        " None of these should be word dividers, so make them not be. 

" Theme and colors.
set background=dark			" Use a dark background. 
syntax on				" Syntax highlighting on.
colorscheme elflord			" Set default color scheme. 

" Files and Backups
set backup				" Make backup files.
set backupdir=$HOME/.vimfiles/backup	" Where to put backup files.
set directory=$HOME/.vimfiles/temp	" Set directory for temporary files.

" User Interface
set ruler				" Always show current positions along the bottom 
set cmdheight=4				" Make command bar 4 high.
set number				" Turn on line numbers. 
set lz					" Do not redraw while running macros (much faster) (LazyRedraw). 
set backspace=2				" Make backspace work normally. 
set mouse=a				" Use mouse everywhere. 
set report=0				" Tell me when anything is changed via :...
set shortmess=atl			" Shorten messages to avoid 'press a key' prompts.

" Visual Cues
set showmatch				" Show matching brackets. 
set mat=50				" How many tenths of a second to blink matching brackets. 
set so=2				" Keep 2 lines (top/bottom) for scope. 
set laststatus=2			" Always show the status line.

" Text Formatting and Layout
set ai					" Autoindent. 
set si					" Smartindent. 
set cindent				" Do c-style indenting. 
set tabstop=4				" Tab spacing (settings below are just to unify it). 
set softtabstop=4
set shiftwidth=4 
set noexpandtab				" Real tabs please! 
set nowrap				" Do not wrap lines 
set smarttab				" Use tabs at the start of a line, spaces elsewhere.

Last edited by weibullguy; 09-26-2011 at 09:12 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
hi i not getting my .vimrc file in this path ~/.vimrc dina3e Linux - Newbie 6 07-31-2012 05:36 PM
Post and share your one liner micxz Linux - General 12 11-15-2010 10:31 AM
LXer: Time to Share the Wealth LXer Syndicated Linux News 0 07-24-2009 11:10 AM
LXer: Editor's Note: Money is Not Wealth LXer Syndicated Linux News 0 01-31-2009 10:50 AM
LXer: NComputing spreads I/O wealth LXer Syndicated Linux News 0 03-24-2008 09:20 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration