Re: [gentoo-user] OT: .vimrc

2007-11-21 Thread Kenneth Prugh
On Wed, 21 Nov 2007 16:29:39 + (UTC)
James [EMAIL PROTECTED] wrote:

 Hello,
 
 
 I'm not the swiftest (hack) around with finessing the (bash) shell
 and customizations for c/c++  (command line) programming. What I'm 
 doing is trying to setup .vimrc so that when I edit a file 
 (*.c or *.cpp) my shell uses the entries in the (user's) .vimrc file. 
 However any other file I access via 'vi' I want it to ignore these
 customizations or use a second config file for 'vim' customizations. 
 Ideas on how to accomplish this are  welcome.
 
 
 I've stumbled across ideas on how to make .vimrc really cool for
 writing c/c++ programs. I have not found a comprehensive reference on
 all of the possibilities and what works. A wiki would be very cool.
 I've been testing a custom setup for .vimrc:
 
   set ai autoindent
   set si smartindent
   set cindentdo c-style indenting
   set tabstop=3  tab spacing settings below are just to
 unify it set softtabstop=3  unify
   set shiftwidth=3   unify
   set noexpandtabreal tabs please!
   set nowrap do not wrap lines
   set smarttab   use tabs at the start of a line, spaces
 elsewhere
 
 
 Additionally, I'm experimenting with QT4 so any suggestions
 related to QT4 are also appreciated. Any comments, ideas or resources 
 I can look at, would be  most appreciated.
 
 
 James
 
 

hmm, have you tried something like:

autocmd BufRead,BufNewFile *.cpp set ai(or whatever options you want?)

that's how I did some stuff wrt to python...
-- 
[EMAIL PROTECTED] mailing list



[gentoo-user] OT: .vimrc

2007-11-21 Thread James
Hello,


I'm not the swiftest (hack) around with finessing the (bash) shell
and customizations for c/c++  (command line) programming. What I'm 
doing is trying to setup .vimrc so that when I edit a file 
(*.c or *.cpp) my shell uses the entries in the (user's) .vimrc file. 
However any other file I access via 'vi' I want it to ignore these
customizations or use a second config file for 'vim' customizations. 
Ideas on how to accomplish this are  welcome.


I've stumbled across ideas on how to make .vimrc really cool for writing
c/c++ programs. I have not found a comprehensive reference on all of the
possibilities and what works. A wiki would be very cool. I've been 
testing a custom setup for .vimrc:

  set ai autoindent
  set si smartindent
  set cindentdo c-style indenting
  set tabstop=3  tab spacing settings below are just to unify it
  set softtabstop=3  unify
  set shiftwidth=3   unify
  set noexpandtabreal tabs please!
  set nowrap do not wrap lines
  set smarttab   use tabs at the start of a line, spaces elsewhere


Additionally, I'm experimenting with QT4 so any suggestions
related to QT4 are also appreciated. Any comments, ideas or resources 
I can look at, would be  most appreciated.


James


-- 
[EMAIL PROTECTED] mailing list