LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-15-2004, 10:28 AM   #1
bretzeltux
LQ Newbie
 
Registered: Oct 2003
Location: Montreal, Canada
Distribution: Fedora Core 2
Posts: 23

Rep: Reputation: 15
Question Different editors -- messing up text formating


Sorry for my poor english :-)

I am often editing my source code ( mostly C++ ) from different locations so I login to my home computer @home and fire VIM.

When I am at home, I use KDevelop ( because of its powerful features such as code-comp. ).

I am pissed-off every time I edit from VIM or jed and then return to KDevelop and realize that
my indentations and format are totally messed up!!! This is really ugly.

vim and co inserts TAB key and KDevelop (kate plugin) let me put SPACEs char instead.
Because of TAB Key is not defined the same every where, the indetations are... not well...

I need advice or know if VIM has some setup somewhere to let me define that TAB char should be replaced with s[aces. Such common setup and the fact that SPACEs are actually SPACEs doesn't change value in another editor...


My two cents: TAB character code MUST BE VANISHED AND REPLACED BY A STANDARD SPACE CHARS!!!!-- There are no reasons today for that kind of "optimization" .

...And YES, I've had pain to dig in VIM helps to find how to disable TABs key or re-define it as SPACES ...


thanks
Bretzel

Last edited by bretzeltux; 02-15-2004 at 10:31 AM.
 
Old 02-15-2004, 11:02 AM   #2
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
:set expandtab


Done.
 
Old 02-15-2004, 12:17 PM   #3
bretzeltux
LQ Newbie
 
Registered: Oct 2003
Location: Montreal, Canada
Distribution: Fedora Core 2
Posts: 23

Original Poster
Rep: Reputation: 15
--- sorry

Quote:
Originally posted by Strike
:set expandtab


Done.

Doh!!
Thanks you
 
Old 02-16-2004, 12:53 PM   #4
cjcuk
Member
 
Registered: Dec 2003
Distribution: Openwall, ~LFS
Posts: 128

Rep: Reputation: 15
The main reason that TABs are used is not to save space in the file. It is because people like different indentations, and spaces are messy. I like my code indented by 8 spaces (the default of most tabs), but some people like it 2 or 3 -- if we both use tabs, then we can each set our text editor to show a tab as that many characters; if we both use spaces, then we have a real mess.
 
Old 02-16-2004, 02:59 PM   #5
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
Quote:
Originally posted by cjcuk
The main reason that TABs are used is not to save space in the file. It is because people like different indentations, and spaces are messy. I like my code indented by 8 spaces (the default of most tabs), but some people like it 2 or 3 -- if we both use tabs, then we can each set our text editor to show a tab as that many characters; if we both use spaces, then we have a real mess.
And decent text editors can recognize this and switch back and forth between the formats (in vim, :retab and :retab!)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
text editors for solaris sunOs 5.9 ranger225 Solaris / OpenSolaris 1 11-30-2004 01:42 AM
what are the 'best' text editors (for C, html, js, etc) name_in_use450 Linux - General 4 08-31-2004 08:01 AM
GUI vs text editors R00ts Programming 9 07-20-2004 05:01 AM
Text mode php editors?? friendklay Programming 3 04-21-2004 02:49 PM
Text editors Penguin Dropout Programming 6 06-16-2003 10:22 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration