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:
Recently, I don't know what I did, when I do the same thing, it becomes like this:
I mean I could use <tab> to move around the code, but it would be unconvnient. Besides, usually when I used an open parenthesis or bracket, it would remind me to close it. Now the warning is gone, too.
Could anyone help me change vim back to the original setting?
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
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.
I have written a code in Linux environment which compares two dates and print "correct" if 1st date is less than 2nd date. But when I'm running the same code in SunOS environment, "date -d is an illegal format" is the error it is throwing. How different should my code be so that it executes well in... (18 Replies)
Goodmorning,
I've some problem in using regular expression in a VIM syntax configuration file.
I've need to match a string as <<< some to match >>> so that it matches only some to match .
With standard regular expression i know that for this goal works fine the regex:
(?<=<{3}).*(?=>{3})
... (4 Replies)
Hi all
What I want?
I want in Insert mode, press Alt-hjkl move cursor, and then back to insert mode.
I know ctrl-o, hjkl can do the job. but everytime I want to move, i have to press ctrl-o, or I have to count how many hjkl I will do, do a C-O (n)hjkl.
What I tried (example only with 'j')... (2 Replies)
I downloaded vim.7.2 and compiled the vim source .
Added the vim binary path to PATH (Because iam not the root of the box)
when i load the file using vim it throws me an error
Error detected while processing /home2/e3003091/.vimrc:
line 2:
E185: Cannot find color scheme darkblue
line... (0 Replies)
can any one know that how can i get perfect format of phone number
my function is
phone_number=`echo $name_number | awk '{print $NF}'`
check=`echo $phone_number | egrep -c "--"`
i get the format but if i need perfect format like xxx-xxx-xxxx. if i enter not in this format it still... (1 Reply)
i need to send 2 diff mail in a single script:Below the script
#!/bin/ksh
echo "enter the number"
read num
if
then
mail -s "test" unix@yahoo.com
mail -s "test" 9886767000@nma.vodafone.in,9916138003@nma.vodafone.in
else
echo "test again"
fi... (5 Replies)
Can someone explain me why sometimes the cursor can not be moved to needed position?
for example:
mysql -u root db -sBe "ALTER TABLE $i ENGINE=$ENGINE"; echo -e "${GG}OK${BB}";
In this line I can not go to position after $i, why?
This is not first time I see such issue.
"INSERT" pressed :) (0 Replies)
hey everyone, Im making a program that prints different patterns using *
like this:
*
***
*****
*******
*****
***
*
i am letting the user decide what the number of rows can be, i want the shape to appear on the left (60 spaces from the right) if it is even and on... (5 Replies)