Register
It is currently Tue Oct 21, 2014 7:34 am

Vi and Vim the .vimrc file


All times are UTC - 6 hours


Post new topic Reply to topic  [ 7 posts ] 
Author Message
 PostPosted: Tue Aug 15, 2006 12:51 am   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 669
Location: Des Moines, Iowa
Here is my .vimrc file... Works pretty good for what i do..... :)

Code:
" Switch syntax highlighting on, when the terminal has colors
  syntax on
" Also switch on highlighting the last used search pattern.
  set hlsearch
" Turn on line numbers
  set nu
" Turn on auto indention features. Use ESC to exit indention.
  set ai



Top
 Profile WWW  
 PostPosted: Mon Sep 04, 2006 4:09 am   
User avatar

Joined: Sat Sep 02, 2006 10:19 am
Posts: 13
Location: United Kingdom
All useful settings. I love the syntax high-lighting in vim and I don't think I could work half as well without it. Something to be aware of is that vim assumes you are working on a console with a light background. If your console colour scheme has a dark background you may want to add this.

Code:
set background=dark


It changes the syntax high-light colours to use lighter colours and making them contrast better with a dark background. You can also set it to light if you have a light console.

Code:
set background=light


Cheers


Top
 Profile WWW ICQ  
 PostPosted: Mon Sep 04, 2006 7:59 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 669
Location: Des Moines, Iowa
Thanks ;)

Good tips :)


Top
 Profile WWW  
 PostPosted: Mon Aug 19, 2013 12:37 pm   
User avatar

Joined: Fri Jul 22, 2011 5:39 pm
Posts: 47
make any file with a shebang 700 with
Code:
au BufWritePost * if getline(1) =~ "^#!" | if getline(1) =~ "/bin/" | silent !chmod 700 <afile>


Top
 Profile WWW  
 PostPosted: Wed Sep 18, 2013 2:39 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 669
Location: Des Moines, Iowa
Ahh necroposting... :) oh well, interesting to see how my .vimrc file has changed over the years... :D
Code:
> cat .vimrc
syntax on
set showmatch
set bg=dark
set incsearch
set tabstop=4
set shiftwidth=4
set expandtab
set nocompatible
command Preview :!firefox %<CR>
colorscheme desert


Top
 Profile WWW  
 PostPosted: Sat Dec 28, 2013 5:37 am   
User avatar

Joined: Sat Dec 11, 2010 5:27 pm
Posts: 15
Location: NSW, Australia
Love the word "necroposting"!!

Of clourse REAL programmers use nano

<:-P


Top
 Profile  
 PostPosted: Tue Jan 14, 2014 11:04 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 669
Location: Des Moines, Iowa
lol ... nano.. well, it isn't the worst editor I've ever used... :)

vim rules for me anyway. So many shortcuts you can use, and you can create your own.
I've created my own wrapper for RCS , and it uses vim, I'm not a fan of git really (i know i know, blasphemy)...


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP