Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Command line programming editors: Vim or emacs or ???
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Jun 18, 2014 4:16 pm    Post subject: Command line programming editors: Vim or emacs or ??? Reply with quote

Hi.

I don't want this to be a mud slinging festival.

I'm a dyed-in-the-wool vim user, for well over a decade.

I have a bunch of VMs and a few non-linux people who have to get on and maintain systems, and do development work. Right now they use nano.

It's been a long time since I learned vim, and I never bothered with emacs. What's easier to learn for a newbie programmer? We all typically use Sublime Text 2 on gui platforms, but these VMs have no gui.

I was thinking that emacs might be easier for someone used to control key shortcuts, but I don't really know anything about emacs.

Thanks.
Back to top
View user's profile Send private message
user
Apprentice
Apprentice


Joined: 08 Feb 2004
Posts: 200

PostPosted: Wed Jun 18, 2014 6:08 pm    Post subject: Reply with quote

Hi 1clue,
is newbie programmer a dos/windows user?
Did he use in his dos/windows life norton commander/total commander or other two-windows command tools with integrated editors?
If yes, maybe he will happy with mc (midnight commander) and integrated mcedit (like nano, but more control) at Text UI level.
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 810

PostPosted: Wed Jun 18, 2014 7:03 pm    Post subject: Reply with quote

i dont get nano, its best to let people have a choice imo, let them use what they are familiar with, it doesnt take much space to have installed vim, emacs, midnight commander, nano, all at once.
_________________
“Music is a moral law. It gives a soul to the Universe, wings to the mind, flight to the imagination, a charm to sadness, gaiety and life to everything. It is the essence of order, and leads to all that is good and just and beautiful.”

― Plato
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Jun 18, 2014 7:11 pm    Post subject: Re: Command line programming editors: Vim or emacs or ??? Reply with quote

1clue ...

On the machine I had my first unix shell the sys admin had set the default shell to emacs, at login you were prompted with a menu '1) mail, 2) gopher 3) shell' (or something of that nature) and when after a week or so of using mail, I decided to hit 'shell' and was in an editing buffer with no prompt of any kind (I'd used DOS prior) ... I was completely lost. Anyhow, since then when making decisions about users I always make sure that the defaults provided are not similarly intrusive, and can be changed to suit whatever the user might be used to. So, I will provide emacs, vim, pico/nano, nvi and jed (if someone asks for them), I then provide a README with all of various editors/shells/etc documented, with links to tutorials, etc, etc. This way each user has the opportunity to try various things out, or opt for what's most familiar from prior experience. Also, as I've been the go-to person for support I'd explain why I use what I use, how to improve their workflow, etc, so often users adopt things on this basis, but some not, the point is to offer as many options as possible and let the users find out what works best for them.

Most ftp/sftp clients have the option to edit remote files via the a local GUI editor, vim has 'netrw', and the other editor has a macro to soak up the whole internet in 5 keystokes :) ... so even if the machines has no GUI users can still use graphical clients if some network protocol allows them access.

1clue wrote:
It's been a long time since I learned vim, and I never bothered with emacs. What's easier to learn for a newbie programmer?

That's a tricky question because "easier to learn" doesn't necessarily equate to being worth the investment, it might start out easier (and I'm not saying either vim or emacs are easier than the other) but might be a more of a burden than an aid at some stage. Its dependent on what use the acquired skills are going to be put to. For instance, I started with emacs but abandoned it and learnt vi when I discovered that I could rely on vi being available in some form or other.

1clue wrote:
I was thinking that emacs might be easier for someone used to control key shortcuts, but I don't really know anything about emacs.

Well, readline is not something most new users will have encountered, so that familiarity may not be there at the outset. There are other considerations like resources, support, etc, and again if the users can edit remotely they most will probably opt to do this rather than use whatever is provided in the VM.

best ... khay
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Jun 18, 2014 8:32 pm    Post subject: Reply with quote

Maybe more information is needed here.

First, this is production web application servers on the Internet, most of which have some sort of financial information on them. There will be no ftp or anything else. Some (the ones with real financial data) will be behind a VPN but not all of them.

Second, we're talking 3 or 4 people, none of whom are dummies. But they're not "linux friendly." They've used Eclipse, STS, Sublime, and more.

Third, these people are already working 50+ hours a week, and we all have families. If it's not easy to learn, they won't learn it. I'm hoping I can give them something without so steep a learning curve that they can grow into when they get time. My learning on vim was so long ago none of these guys was in college yet, and one of them wasn't in high school. I remember the curve being steep for vim, but I really don't remember details. Actually I learned vi on AIX and then switched to Linux and vim.

We need to edit configuration files, and sometimes on test systems we may be editing live code. The files are xml or some programming language, and I want syntax highlighting.

My plan is to have the production server and the test server be essentially identical. I'm literally scripting the install. They're all VMs so once a specific server is configured and working I'll clone it to production and make minimal changes for the production environment, and reload with production data.
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 810

PostPosted: Wed Jun 18, 2014 9:01 pm    Post subject: Reply with quote

it really depends on the individual, perhaps since there is a small number of them, you can ask them which they prefer, they might have some experience with something that may be familiar with them.

with a small number of people you can always just choose vim, or whatever you like, and hand out a physical cheatsheet of vim commands, or email a cheatsheet saying you might want to print this out for reference this is the text editor that's going to be used on the system.

I remember learning vim, and literally about 4 commands was enough to get started, i learned a lot more since then, but it wasn't all that impossible or terribly steep learning curve.
_________________
“Music is a moral law. It gives a soul to the Universe, wings to the mind, flight to the imagination, a charm to sadness, gaiety and life to everything. It is the essence of order, and leads to all that is good and just and beautiful.”

― Plato
Back to top
View user's profile Send private message
Navar
Guru
Guru


Joined: 20 Aug 2012
Posts: 353

PostPosted: Wed Jun 18, 2014 10:48 pm    Post subject: Reply with quote

Are these your clients or employees?

:? You're asking for opinions; clearly expressing not wanting any, and yet still share your own biases. There are reasons questions of the like are immediately closed elsewhere as overly subjective and non-constructive.

1clue wrote:
I have a bunch of VMs and a few non-linux people who have to get on and maintain systems, and do development work. Right now they use nano.


... 'great'?

I sure hope these do not have any of my financials on them. Company name disclosure?

Let them use nano then, or anything else under the sun accessible via shell/front facing console terminal (since you've clearly eliminated remote access of any sort on content distributing servers). They will be no less productive than any basic vi/emacs clone use. I highly suspect you won't be making any *nix + respective CLI editor converts. Make sure ed is on there too for extra pain. While you're at it, hand them an old school book on sed/awk (or just the usual rtfm man introduction), later on you can slip them a book on perl. Tell them it'll make their lives 'easier'. If you need to sell them tell them the java guy infamously made his own 'me too' since you point out they're also Eclipse users.

Perhaps focusing harder on supporting your existing favorite via several remote options would serve everyones' purposes best:
Google it.


If you're responsible for their paychecks and can open your mind to a more neutral point of view instead of dictating the status quo, then spend a few days putting them on some real world examples where they can only use 3 to 5 editors meeting your requirements (syntax highlighting, etc.). Evaluate the obvious psychological productivity points of how comfortable they were in doing the exercises with each and how far they got in the time allotted. Make sure they're actually pressed for time. Extra points if you incorporate random shock therapy (the mouse makes a good carrot). Grab the experts from HR if you need more help, they love this stuff. Afterwards, allow them to stick with whatever they were most comfortable and productive with while hoping they don't know where you live.

Moderators: given that this is a very subjective (i.e. political/religious/olderthanthehillsnotgoinganywheresoon issue that has hit the forums and everywhere else long in the past and present, can we quietly lock this down and move on while politely pointing the OP back to the obvious web searches and own research to support their opinions further? I believe while the OP is obviously in the know-better-camp that they still hoped a miracle of some form would materialize in the form of a response here from people (who took the time in attempting to care) that they do not know nor obviously trust on an actual business need and responsibility.

Thanks.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Jun 18, 2014 11:34 pm    Post subject: Reply with quote

@Navar,

You have made the first hostile post on this thread. Not a single one of your comments has any relevance here. Your post is insulting, hostile and unhelpful. You have broken the code of conduct.

Please leave.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Thu Jun 19, 2014 12:08 am    Post subject: Reply with quote

I've already asked these people what is important to them. The points I made in my earlier post are what they found most important: Syntax highlighting on a good code editor, easy to learn but with more advanced features if they need them.

The new users are mostly Windows background, but we all have Macs through the company. I'm the only one who chooses UN*X on my personal equipment. I've never been a Windows user, so I'm not very qualified to figure out which editor a Windows user would find it easiest to learn. I thought maybe emacs because of the control keys, but again I don't know. I don't have any specific limited choices, I just want it to be a full-featured programming editor.

The public financial systems need to pass PCI compliance. The rest, I like to follow that same model of minimalism, which means we could cause any one of these servers to be PCI compliant by going through the certification process with minimal fuss.

What PCI compliance means is that there are no unnecessary services running on the box. Every exposed port needs to be certified, and anything like a file server or FTP server is an automatic fail. Files are put onto or taken from the system by using a client to connect to a remote server, or use ssh through a VPN if it's a compliant box. Every app is scrutinized for its necessity. Regular scans by a third party probe the system for openings, and check the current list of CVE's for possible problems. Given the amount of effort it takes to get and maintain a clean system, you generally don't see anything on the system that you don't absolutely need.

Something like an editor is not a problem, but adding a gui or a service means a whole lot of extra work on the certification process.

We're using Linux because it can be stripped down to the bare essentials, making the certification process easier. I'm the main Linux guy, but I've been using it so long I'm not sure if I have a handle on what Windows users would like.

So, back to the question: What full-featured programming editor with syntax highlighting is easier for a Windows user to learn?

Please and thank you.
Back to top
View user's profile Send private message
Navar
Guru
Guru


Joined: 20 Aug 2012
Posts: 353

PostPosted: Thu Jun 19, 2014 1:51 am    Post subject: Reply with quote

Pfft. Insulting to whom exactly? I consider the topic (vi/emacs, could have rephrased) for the most part already discussed in the past, a lazy attempt, and one that encourages [strike]trolling[/strike] disagreements.

I never suggested anything insecure such as over FTP. You can or you cannot utilize ssh tunneling for PCI compliance? If you can, then what others and I've said applies and you can find plenty of examples for sublime use via this route, nano or whatever editor. If you have this option at all, you're doing a disservice to your clients in not exercising it.

Additionally, the PCI-DSS v3 specs do not preclude SFTP/FTPS/SCP use. The main gist of that document is simply stating to avoid unsecured situations, particularly exchanges involving the older use of clear-text protocols, etc. (the historical purpose behind the PCI-DSS compliance). There is no such thing as 100% secure. If SFTP/FTPS were an issue then SSL, etc. would also need elimination.

Edited for additional clarification.


Last edited by Navar on Fri Jul 18, 2014 10:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Thu Jun 19, 2014 2:25 am    Post subject: Reply with quote

@Navar,

And we got some of that.

I ignored your post because of its nature. I was responding to earlier posts.

What is your deal? Why do you assume I have simply dictated terms to my coworkers with no discussion? My coworkers all agree that I don't know how a Windows user thinks, so I'm coming to the forum. I'm not doing anyone a disservice.

Any tunnel must undergo PCI compliance, as does the network it's attached to. Temporary multi-factor authentication VPNs to a single host still undergo scrutiny but it's not as difficult to secure. Ssh goes through the vpn. There is no reason for any other type of connection.

By unanimous consent, an ssh tunnel with a gui editor on the other end (sublime for example) is too slow to be useful. The problem isn't the server site, it's the slow Internet connection on the client end, and the VPN.

So could we get back to who knows what CLI programming editor recent Windows converts find particularly easy to learn? I thought this would be a simple show of hands and I pick the top two of them for my coworkers to look at.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Thu Jun 19, 2014 4:11 am    Post subject: Reply with quote

1clue wrote:
Ssh goes through the vpn. There is no reason for any other type of connection.

By unanimous consent, an ssh tunnel with a gui editor on the other end (sublime for example) is too slow to be useful. The problem isn't the server site, it's the slow Internet connection on the client end, and the VPN.

That's a shame, as back in the day it was well-known that the best IDE for remote PHP work was just a KDE desktop with kwrite and fish:// (ie kioslave ssh) access. You just use konqui (not dolphin) and click on what you want to work on.

OFC nowadays one tends to use git/hg/bzr, so you have more options.
Quote:
So could we get back to who knows what CLI programming editor recent Windows converts find particularly easy to learn? I thought this would be a simple show of hands and I pick the top two of them for my coworkers to look at.

Well I found pico relatively reasonable when I got to Uni; such that I can handle nano now. But that's only for quick edits when I'm on the console. I never got on with vim nor emacs (I found the first's keys too weird, and the second just too weird.) Not tried joe nor jupp, though they have a good reputation.

You can also use pnotepad+ and putty/winscp on a windows box to do the equivalent of working over fish; we did that at a company I worked for, and it works really well.

My personal favourite is Kate (see second page for more info): it's very lightweight and quick but you can change literally everything about it, if it matters enough to you; and it's easy to work on your own syntax highlighter. Even if i hate XML, I have to admit it's very very nice to tweak the awk.xml, for instance, as I've been doing, and get it to highlight tricky things. Finding out that vim can't handle the same things is just gravy ;-)

It also has excellent plugins that make it into an IDE, if you want, and different sessions with different plugins enabled is very useful ime. (eg I don't do XML for anything else, so only my "Kate Syntax" session has any XML plugins loaded.) The GDB plugin has got to be the most impressive, though for day-to-day usage, I find the Build plugin to be the most handy, followed by the recent Project plugin's git integration (which makes searches across the project lightning fast.)

Much much quicker than Java IDEs I've had to work with in the past, and you can move up to KDevelop if you have to work on C++, using the same editor component (so it's familiar, and your custom highlighters still work.) I've never found the need, but then I avoid C++ nowadays. Oh and vim mode has progressed steadily over the last 5 years (see this blogpost from a die-hard vim user.) I've seen the discussion in #kate over that time, when ehamberg was mostly working on it on his own. (That's changed in last couple of years.)

I realise that isn't console, but really, I'm curious as to why there isn't a VCS in the middle. If there is, then people can use whatever they want, since you're running integration tests way before it gets deployed or pushed to QA.
Back to top
View user's profile Send private message
Navar
Guru
Guru


Joined: 20 Aug 2012
Posts: 353

PostPosted: Thu Jun 19, 2014 5:44 am    Post subject: Reply with quote

1clue,

Had you kept history in mind and followed the respective links while viewing some of it as obvious humor aspect (because the serious historical reasonings were never funny--just painful), you would have got the points. Yes, I was irritated at another vi/emacs thread and the circumstances. Hostile, no--I had/have no time for the editor wars. Personally, I think it's a cruel gesture to Windows/Mac GUI environment web developers feeling productive if you have any opportunity not to. Likewise I hope you're not implying they're maintaining these systems from any administrative standpoint when discussing with an auditor.

I believe the topic could have been better chosen and the particulars of restricted circumstances explained better. And simply I prefer those asking unsupported questions in a public forum to have at least put forth some effort to search, particularly on any serious job related responsibilities. No one is being paid support to respond and it's far easier to just ignore.
--
Anyway, for the slowness factor have you tried a performance test using a simple editor remotely through the tunnel instead of Sublime? How about compression and other cipher settings (assuming you're not locked into a particular) for the tunnel? I've not used Sublime; I've seen/heard good things but maybe it's trying to do too much over the wire.

I've used many editors (and a number of IDEs), moreso in Windows/DOS environments than *nix. Haven't found the perfect one. In a CLI environment I tend to default to jove, a light clone of emacs without all the extra bells and whistles that they will most likely not use. I've used it off and on since the 80s, so it's old, but like your extended experience with vi, things eventually are burned into long term memory. While I don't believe I've used it, jed, is probably a more modern jove equivalent (highlighting, etc.). From the vi front you know what to do there.

It is what it is. Sorry, to my knowledge, there is no magic bean for your windows clients if it's tty CLI or bust environment access only. For the requirements given, it's essentially vi/emacs and respective clones (which often tend towards a lighter faire). They usually allow the user to rebind key assignments as needed. For those not a fan of fighting with control keys, I'm not a fan of reaching the same distance for a smaller escape key to jump in and out of modes, etc. Vi actually feels like it's slowing me down but I had die-hards trying to convert me for years in early 90s. To each their own, with either, practice makes perfect, key reassignments, and they can somewhat fake emulating the other in order to win more converts (again see links for more complicated setups, viper, etc.).

The best advice, if they have to develop in this environment, is to use both for awhile with some real-world testing (search/replace, regexps, movement, indenting, highlighting, etc.) focusing on the most basic needs and forget worrying about the rest (given their constraints). Other alternatives tend to mimic very simplistic editors like notepad to ease transition for windows users on basic text editing (when they actually have to). It wouldn't surprise me at all if several developers picked one while others went the other way.

And keep in mind where these types of editors were originally developed for. You can also look here for more ideas.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Thu Jun 19, 2014 8:51 am    Post subject: Reply with quote

If they are done to notepad-like editors they might feel like at home with jed. Decent editing can be done with it, though I've never used it intensively.

It supports highlighting and unicode (in case you have any use for that).

It's also supposed to have "emulation" (whatever that means) for Borland, Emacs and Wordstar, so that might come in handy if your team has experience with either of these.

It also has mouse support, though X and gpm, I have no idea how that will work with your VMs though.

If you can't find something that they will like you might have other options, for example, using some other light OS that has networking support. I think FreeDOS would do with the aid of external modules but never tried myself. Yet another option is to use a DOS editor that they like with dosemu or dosbox.
Back to top
View user's profile Send private message
hasufell
Retired Dev
Retired Dev


Joined: 29 Oct 2011
Posts: 429

PostPosted: Sat Jun 21, 2014 10:07 pm    Post subject: Reply with quote

djdunn wrote:
i dont get nano, its best to let people have a choice imo, let them use what they are familiar with, it doesnt take much space to have installed vim, emacs, midnight commander, nano, all at once.


That's the only correct answer. Some cannot learn vim, some cannot learn emacs, some even cannot learn nano (lol). Just provide all of them.

Code:

eix -c app-editors/
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Sun Jun 22, 2014 4:18 am    Post subject: Reply with quote

I'm not opposed to adding all of these editors, on principle. It's not that much space, and the security implications are really small. On one of the test systems I've already added all the ones that have been recommended. In fact if the other factors were what I'd consider to be normal I wouldn't even post here because as has been mentioned it's a topic that has been covered a thousand times. The problem is, it's always an "I like foo editor because...." followed by "bar editor is much better than foo because..." and that's not what I'm after here.

I'm more interested in "I've been a programmer and Windows user for years, I've used (sublime|eclipse|...) with hotkeys for a long time, I've found that foo programming editor seems most like Sublime or Eclipse or ..."

I'm going to reiterate and expand a few things and hopefully it will be more clearly stated now. While I didn't think most of this was pertinent before, it seems that I'm having a hard time getting my point across, so here it is:

I've been a Linux user since about 1996. I moved from IBM's AIX as my primary workstation and OS/2, and from a Mac before that. I'm leaving out the stuff that booted off floppies or cassettes. I've never owned a Windows system until I had to buy my wife a laptop less than a year ago, although I've had to use Windows for my job years ago. As in, before about 1994, and I've also had to test software using Windows as a small part of my job, even now. While I can use Windows, it has never, ever been my first choice and the times when I actually used it on my workstation it was still something that ran in DOS and was commonly booted off a floppy. I started with vi editor and moved to vim at some point. My coworkers insist that my "windows instincts" are severely off target, and I believe this paragraph illustrates why.

We had a meeting and the non-linux people who need access all have certain characteristics. As well, we all know the product we produce very well and have maintained it on other platforms. Notepad++ on Windows is barely useful for us, because it doesn't have enough features. We all use Sublime by preference on our gui systems, and we all use keyboard shortcuts on sublime. If you haven't used Sublime, in my opinion it is a gui editor in the spirit of vim or emacs, but the interface is more similar to other gui apps in terms of keyboard shortcuts. http://www.sublimetext.com

What we (the users) want is a recommendation for what they should learn, because they're all working overtime and don't want to waste time on something more difficult. We are all programmers with at least a decade of professional experience. We've all used several variants of Eclipse, as well as other IDEs and we all spend time to learn the keyboard shortcuts of each. Most of us have, in this company, spent time where we use one IDE for one group of languages and another for another language group. We all currently use Mac OS X, because that's what is supplied by the company. I'm the only one who cares that Mac is UNIX underneath, everyone else uses the command line because that's where the compiler is, but would rather point and click. We all CAN learn any editor, we just don't have time to browse.

The company (not my sole choice) has decided that we will stay command-line. There is no reason for these servers to have a gui, and extremely good business reasons why some of them shouldn't. The users (not just me) unanimously say that editing with a workstation-local gui editor through an ssh tunnel is too slow.

Unicode support is definitely a big plus, there is a legitimate advantage for that.

I would think that using vim would be best because I already know a bunch about that. However, consistently I get confused coworkers when I try to walk them through it. So I think vim is probably not what they need.

Thanks.

PS: I installed nano because it's extremely easy to use for basic editing. I started this thread because the other users are frustrated with it, I did them a disservice giving them an editor for dummies. They are not dummies.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum