![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mail format problem: | ali560045 | Shell Programming and Scripting | 5 | 06-04-2008 05:52 AM |
| To convert multi format file to a readable ascii format | gaur.deepti | UNIX for Dummies Questions & Answers | 5 | 03-25-2008 12:03 PM |
| CSV format problem | ccwq | Shell Programming and Scripting | 10 | 08-05-2007 11:16 PM |
| format problem | bebop1111116 | High Level Programming | 5 | 10-10-2006 07:41 AM |
| serial no. format problem | unknown2205 | UNIX for Dummies Questions & Answers | 6 | 12-05-2005 08:45 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi, there. Everyone had a great Thanksgiving?
I have a slice format problem when I am using vim to edit c++ source code. I don't know how to discribe the problem exactly. You see, usually when I use the command "vi hello.cpp" to write a code, it will have the format like this: Code:
#include <iostream>
using namespace std;
int main()
{
cout << "hello, world!" << endl;
cin.get();cin.get();
return 0;
}
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "hello, world!" << endl;
cin.get();cin.get();
return 0;
}
Could anyone help me change vim back to the original setting?
__________________
Powered by HOUSCOUS |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Take a look in your home directory for a hidden file .exrc This is the vi customization file. Did you by chance delete it? or unwittingly modify it?
Here is a link for more information on setting it up and for customizing your vi options. |
|
#3
|
||||
|
||||
|
in the .exrc file you may have a entry like
set tabstop= or se ts= which means set the tabstop. You may set it and then check. also check if your vi is vi and not vim. sometimes vi is aliased to vim or soft linked to vim. in that case your configuration file will not be .exrc. it will be .vimrc There are a couple of more things that set the tabs 1. autoindent 2. smartindent 3. cindents to know more of these you can simple type h cindents in the vi editor's command mode i.e. the : mode hope this helps
__________________
War doesnt determine who is right, it determines who is left |
|
#4
|
|||
|
|||
|
I believe smartindent is what you need. Try to enter the command
set smartindent and see if this is what you want. |
|
#5
|
|||
|
|||
|
Thank you, guys. I didn't find the .exrc file. I think I might delete or damage it by incident. I think I just install vi again to see what will happen. Thanx again.
HOUSCOUS
__________________
Powered by HOUSCOUS |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|