Managing code
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Managing code
scotws wrote:
By blind luck, I started off with vi (now vim http://www.vim.org/) on my very first Unix-y machines decades ago.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Managing code
Both vi and emacs are fantastic editors, both of course giving you multiple views and windows into the source code (one reason I don't use IDEs is because they usually force you to use their built-in editor, which simply can't compare).
I think the main reason for liking one or the other is the difference between a modal concept (vi) or non-modal (emacs). Personally I've never seen the point of the "editor wars". I happen to prefer emacs for programming, although I use vi for *nix config file editing (it's always available, unlike other editors).
One thing I use emacs for btw is to edit files on some other computer which may not be *nix or support a big editor, and may be low on resources -- if it is networked and can handle ftp, emacs can handle that transparently.
I think the main reason for liking one or the other is the difference between a modal concept (vi) or non-modal (emacs). Personally I've never seen the point of the "editor wars". I happen to prefer emacs for programming, although I use vi for *nix config file editing (it's always available, unlike other editors).
One thing I use emacs for btw is to edit files on some other computer which may not be *nix or support a big editor, and may be low on resources -- if it is networked and can handle ftp, emacs can handle that transparently.
Re: Managing code
Some very interesting responses - thanks guys. With regard to VI... I'm not a fan, but acknowledge that I don't know enough to say if it's completely rubbish or the best thing since sliced bread. At the moment I much prefer Nano (although it does sort of reminds me of Wordstar if anyone remembers that
).
The reason I aked the question is that I've been busy doing other things and have recently gone back to my 6502 compiler only to find myself somewhat confused about which version did what. I've made sure that the code is commented, but is getting large enough that it's not easy to see differences between versions.
Also, the assembly source code for my 6502 build is looking like one massive confusing list of mnemonics so I need to find a way fo sectioing it off to make it easier to read/edit. I think maybe include files is the way to go on that.
The reason I aked the question is that I've been busy doing other things and have recently gone back to my 6502 compiler only to find myself somewhat confused about which version did what. I've made sure that the code is commented, but is getting large enough that it's not easy to see differences between versions.
Also, the assembly source code for my 6502 build is looking like one massive confusing list of mnemonics so I need to find a way fo sectioing it off to make it easier to read/edit. I think maybe include files is the way to go on that.
Re: Managing code
banedon wrote:
Some very interesting responses - thanks guys. With regard to VI... I'm not a fan, but acknowledge that I don't know enough to say if it's completely rubbish or the best thing since sliced bread. At the moment I much prefer Nano (although it does sort of reminds me of Wordstar if anyone remembers that :)).
Quote:
The reason I aked the question is that I've been busy doing other things and have recently gone back to my 6502 compiler only to find myself somewhat confused about which version did what. I've made sure that the code is commented, but is getting large enough that it's not easy to see differences between versions.
Quote:
Also, the assembly source code for my 6502 build is looking like one massive confusing list of mnemonics so I need to find a way fo sectioing it off to make it easier to read/edit. I think maybe include files is the way to go on that.
Re: Managing code
"Folding" is the main reason I ended up in the emacs camp: both visual editors have something of a learning curve, so people are likely to stick closely to the one they know how to use. At Inmos there was a folding version of microemacs, which became the normal way to work on the 25-line VDUs we had. Although microemacs is no true emacs, it shares many key bindings and some facilities. (Inmos' software development system had a folding editor, which became a standard way to work with Occam, their high level language. We used the folding when working in our HDL, whose name I forget.)
- GARTHWILSON
- Forum Moderator
- Posts: 8774
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Managing code
What does "folding" mean? I don't know if this is the same or not, but the two major editors I've used, Norton and MultiEdit, both allow condensing the display, making it so you only see the lines that have something in column 1. This is why I don't like local labels to start in column 1. In condensed mode, you see the global labels and any comments you want visible in condensed mode. Go to a line you want, press Enter, and it goes back to the normal display starting at that line.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Managing code
That does sound like a version of folding. In my case, the editor interprets certain comments as fold markers, so you can choose whether you want to fold at function declarations, or fold up inner loops, or fold up related collections of functions.
Re: Managing code
Another approach I've seen is to use literal form-feed characters between major sections of code, followed by a description of the next section. If your editor allows easy navigation to the next such break (emacs certainly does, although it's a sufficiently-unique character that simply searching for it would work) then you can move around quite quickly.
Re: Managing code
BigDumbDinosaur wrote:
scotws wrote:
By blind luck, I started off with vi (now vim http://www.vim.org/) on my very first Unix-y machines decades ago.
The explanation for why most people don't get "attuned" to it is its murderous learning curve. The more you use it the more you'll think less of other editors.
Re: Managing code
Welcome, Factory! (That's an unfortunate post to have picked up for your first contribution here: most of us, most of the time, manage to avoid the sort of phrasing which is likely to divide the audience into two opposing camps. Or at least, I like to think so.)
- GARTHWILSON
- Forum Moderator
- Posts: 8774
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Managing code
Factory wrote:
emacs users are literally the opposite of "knuckle draggers".
The explanation for why most people don't get "attuned" to it is its murderous learning curve. The more you use it the more you'll think less of other editors.
The explanation for why most people don't get "attuned" to it is its murderous learning curve. The more you use it the more you'll think less of other editors.
[1] Edit, 8/9/25: I just found out, from the Wikipedia article that MultiEdit is defunct, due to the heart-attack death of the man who really made it go, and that even the website has been gone since Aug 2022.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Managing code
Factory wrote:
emacs users are literally the opposite of "knuckle draggers".
The explanation for why most people don't get "attuned" to it is its murderous learning curve. The more you use it the more you'll think less of other editors.
The explanation for why most people don't get "attuned" to it is its murderous learning curve. The more you use it the more you'll think less of other editors.
I'm a silver-back "knuckle-dragger" when it comes to UNIX and its editors.
Unfortunately, some of that emacs stench has rubbed off on vim, which isn't all that surprising.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Managing code
BigEd wrote:
Welcome, Factory! (That's an unfortunate post to have picked up for your first contribution here: most of us, most of the time, manage to avoid the sort of phrasing which is likely to divide the audience into two opposing camps. Or at least, I like to think so.)
Re: Managing code
unclouded wrote:
Nicely said. Next we'll be arguing about tabs versus spaces.
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Managing code
Martin_H wrote:
unclouded wrote:
Nicely said. Next we'll be arguing about tabs versus spaces.
x86? We ain't got no x86. We don't NEED no stinking x86!