1 |
On Wed, 21 Nov 2007 16:29:39 +0000 (UTC) |
2 |
James <wireless@×××××××××××.com> wrote: |
3 |
|
4 |
> Hello, |
5 |
> |
6 |
> |
7 |
> I'm not the swiftest (hack) around with finessing the (bash) shell |
8 |
> and customizations for c/c++ (command line) programming. What I'm |
9 |
> doing is trying to setup .vimrc so that when I edit a file |
10 |
> (*.c or *.cpp) my shell uses the entries in the (user's) .vimrc file. |
11 |
> However any other file I access via 'vi' I want it to ignore these |
12 |
> customizations or use a second config file for 'vim' customizations. |
13 |
> Ideas on how to accomplish this are welcome. |
14 |
> |
15 |
> |
16 |
> I've stumbled across ideas on how to make .vimrc really cool for |
17 |
> writing c/c++ programs. I have not found a comprehensive reference on |
18 |
> all of the possibilities and what works. A wiki would be very cool. |
19 |
> I've been testing a custom setup for .vimrc: |
20 |
> |
21 |
> set ai " autoindent |
22 |
> set si " smartindent |
23 |
> set cindent " do c-style indenting |
24 |
> set tabstop=3 " tab spacing settings below are just to |
25 |
> unify it set softtabstop=3 " unify |
26 |
> set shiftwidth=3 " unify |
27 |
> set noexpandtab " real tabs please! |
28 |
> set nowrap " do not wrap lines |
29 |
> set smarttab " use tabs at the start of a line, spaces |
30 |
> elsewhere |
31 |
> |
32 |
> |
33 |
> Additionally, I'm experimenting with QT4 so any suggestions |
34 |
> related to QT4 are also appreciated. Any comments, ideas or resources |
35 |
> I can look at, would be most appreciated. |
36 |
> |
37 |
> |
38 |
> James |
39 |
> |
40 |
> |
41 |
|
42 |
hmm, have you tried something like: |
43 |
|
44 |
autocmd BufRead,BufNewFile *.cpp set ai(or whatever options you want?) |
45 |
|
46 |
that's how I did some stuff wrt to python... |
47 |
-- |
48 |
gentoo-user@g.o mailing list |