News for hackers. Stuff that matters.
Re:Putting the I back in IDE by patientplatypus on Wednesday March 28, 2018 @09:05PM (#16703676)
This is cool, I guess. Personally coding in a terminal like window for me would be awful - I like using my mouse to navigate among folders and save stuff etc in Atom/VSCode like environments. Plus, how often are people switching branches of code that the number of key strokes for git becomes a problem? Seems like an overengineered solution for a very niche audience - if it works for them great though.
Re:Putting the I back in IDE by iBelieve on Wednesday March 28, 2018 @10:21PM (#16704052)
I recently started using Emacs in a tiling window manager on Linux after using "standard" GUI editors like PyCharm, AppCode, Atom, VSCode, etc. on macOS. At first, I felt exactly like you describe - it felt so constraining not having a tree view and tabs I could click on. But after a while I got used to using a keyboard shortcut to quickly jump between files or search for a file to open. I'm slowly getting used to it and find even the basic set of keyboard shortcuts I've learned feel so much more productive then combined use of a mouse and keyboard.

Just one example of that - recently I needed to create some UUIDs to use in my code. Previously, I would have googled a UUID generator or used uuid on the command line and then pasted the output into my editor. With Emacs, I was able to easily insert the UUID directly into my code using `C-u M-! uuidgen` (that keyboard shortcut inserts the output of the given command at the current cursor location).

Re:Putting the I back in IDE by eadmund on Thursday March 29, 2018 @12:21AM (#16704470)
> it felt so constraining not having a tree view and tabs I could click on

There are emacs packages for tree views[0] and tabs[1], but as you note the built-in buffer management is more powerful. Stuff like Helm or Ivy is even better!

There's also an emacs uuidgen package, which can generate a uuid & insert it with M-x uuidgen; you could of course bind it to a key sequence if you use it frequently.

0: https://github.com/jaypei/emacs-neotree

1: https://www.emacswiki.org/emacs/TabBarMode

Re:Putting the I back in IDE by iBelieve on Thursday March 29, 2018 @09:25AM (#16706797)
Thanks for the suggestions. I knew about tree views for Emacs, but I usually work with Emacs and a terminal side-by-side on a 13" laptop screen, so a tree view just takes up extra space and I ended up not missing it much. As for the uuidgen package, this was just a one-time thing for a few uuids, so using the uuidgen command I already had installed on Linux was simplier.
Re:Putting the I back in IDE by nextlevelwizard on Thursday March 29, 2018 @04:04AM (#16705365)
Thous things are pretty much things to avoid in my opinion. I used to have NERDTree in Vim and all kind of other useless nonsense. After I learned how to use fuzzy searching to jump between files and definitions all tree view does is take up space.

Even with Atom finding files is way faster than clicking through the tree viewer.

Re:Putting the I back in IDE by eadmund on Thursday March 29, 2018 @08:58AM (#16706588)
I agree re. tree views, but was merely noting that they exist, if one really wants them. rms may be doctrinaire, but emacs is not!
Re:Putting the I back in IDE by cup-of-tea on Thursday March 29, 2018 @03:09AM (#16705129)
Every day around the world a few users discover that the most efficient input tool is directly in front of them, uses both hands and all digits.
Re:Putting the I back in IDE by codemac on Thursday March 29, 2018 @01:33AM (#16704723)
You can also try speedbar / speedbar-sr. Gives you a quick tree-like view when wanted, and then can be dismissed.
Re:Putting the I back in IDE by kuschku on Thursday March 29, 2018 @03:37AM (#16705243)
And with pycharm you'd have simply used a generator preset for uuids.

There's even a dozen of generator presets integrated, you can just easily invoke them from your keyboard, without pressing all modifier keys at once.

And PyCharm even has all the keyboard navigation as well, you can even get emacs or vi keybindings, if you wish, I only use the mouse when the app's already running and I'm going through the log.

Re:Putting the I back in IDE by iBelieve on Thursday March 29, 2018 @09:29AM (#16706835)
PyCharm is great, and I use it along with AppCode and Android Studio. I'm mainly trying to learn Emacs because so many people have great things to say about it, plus I've started using Org Mode for todos and notes and it's awesome. In addition, I've tried using the VIM emulation in the Jetbrains IDEs and have always ended up turning it off each time as I kept forgetting I was in VIM mode and would try to use the editor like a normal editor. Emacs with Evil mode is different enough that I don't try to mix VIM and regular editor usage.
Re:Putting the I back in IDE by hollerith on Wednesday March 28, 2018 @11:25PM (#16704287)
Just want to make sure that people realize that Emacs has decent support for pointing devices and can link with the native GUI libraries on Windows and Mac and GTK+ on Linux.

So for example although the (very old) version of Emacs (/usr/bin/emacs) that comes with OS X was built in such a way that it can communicate with the user only via the terminal, the following command line will install a GUI-capable Emacs:

brew tap railwaycat/emacsmacport && brew update && brew install emacs-mac

(The simpler command line `brew update && brew install emacs` would install a GUI-capable Emacs, too, but delivers the pure-FSF version of Emacs, which for mac for many years now has been buggier than the FSF version plus Mitsuharu's patches, which is what the first command line delivers. In the past there have been times when `brew install emacs` would install an Emacs that is just not usable because of bugs while `brew install emacs-mac` would install and Emacs that works fine.)

Whether or not the code Jane Street added to Emacs can be used with a pointing device I do not know.

Re:Putting the I back in IDE by yorwba on Wednesday March 28, 2018 @11:13PM (#16704248)
There's nothing about terminal-like windows that precludes using the mouse. The magic of escape sequences makes e.g. mouse selection in Vim possible. I just don't find it very useful when there are keyboard shortcuts for everything.

When you need to open a shell in a certain directory, do you use cd or do you navigate using a GUI? I much prefer the tab-completion I get with the former, especially in hierarchies with high branching factor.

Re:Putting the I back in IDE by oblio on Thursday March 29, 2018 @02:24AM (#16704936)
I don't use GUI file explorers that much, but I have to point out even Windows Explorer has path autocompletion.

Just like using CLIs does not preclude using a mouse, using GUIs does not preclude using keyboard shortcuts ;)

Quick Explorer example (sometimes I mix and match, maybe I want to show something to a colleague):

explorer . # does what you'd expect; alternatively Win-e

Alt-d # focus path in Explorer

Start typing, Explorer autocompletes stuff

Enter

Tab around, if need be, to change panels

And this is with what is, basically, the dumbest common GUI file manager out there :)

Re:Putting the I back in IDE by flukus on Wednesday March 28, 2018 @11:40PM (#16704341)
> When you need to open a shell in a certain directory, do you use cd or do you navigate using a GUI?

Really depends on the workflow. If I know where I'm navigating then I prefer cd, if I don't then a gui is better than a cd/ls loop. Fortunately programs like ranger cover the latter quite well too.

Re:Putting the I back in IDE by jolmg on Thursday March 29, 2018 @01:59AM (#16704832)
Another way to navigate with cd is to use tab completion instead of ls. "cd "+tab and you get a listing of files. You might have your shell configured to cycle among the options with tab or select with arrow keys. If you've selected a directory, press "/"+tab and repeat. If you want to go back up a level, quickly hit ctrl+w to delete the last piece of the path (that's the behavior of vi keybindings, emacs keybindings delete the whole path). You might in the end have found the file you want to work with and forego cd by using key shortcuts to quickly navigate to the beginning of the command line and switch the command.

This is how I do all my file navigation.

Re:Putting the I back in IDE by flukus on Thursday March 29, 2018 @02:30AM (#16704965)
This is great locally or at home, a lot of the time when I'm "browsing" it's on remote windows shares on another continent though, the latency from windows and the network is simply to high for tab completion to be usable, it makes using FTP over dialup seem snappy.

This is through cygwin, real linux is another story. I don't know what the difference is between how windows and linux mount remote drives, but the performance difference is stark, ls on a mounted network drive in linux is essentially instant but there is a noticeable lag doing the same from a windows machine.

Re:Putting the I back in IDE by usrusr on Thursday March 29, 2018 @04:44AM (#16705503)
I have mostly stopped using cd at all, working with absolute paths + tab almost exclusively. The benefit is that your ctrl + r archive of commands become immediately useful, independent of the current location. It's probably not that useful when you spend the whole day on the command line, but as an occasional visitor I find it quite convenient. I imagine it could make a real difference in a low latency console/high latency filesystem setting, if there is at least some repetition.
Re:Putting the I back in IDE by jolmg on Friday March 30, 2018 @12:20PM (#16717414)
I think, I'll try this. It sounds like a good idea, but I wonder if the benefit outweights the cost of having to prefix all paths. It occurs to me that I can make a keybound function that inserts $CWD, so it ends up expanded in the history.
Re:Putting the I back in IDE by Lio on Thursday March 29, 2018 @03:52AM (#16705307)
I use NeoVim in tmux pretty much exclusively.

You can turn on mouse support for terminal apps like Vim and Emacs and still click things like the file viewer, scroll text with two fingers and resize windows with a mouse.

You just have to configure it.

This to my mind is the real difference between classic editors like Vim and Emacs and GUI IDEs.

With the terminal editors you can be at least sure that you'll get a comprehensive keyboard interface system, I haven't always found that with GUI IDEs especially when it comes to third party plugins.

Re:Putting the I back in IDE by Retric on Wednesday March 28, 2018 @09:09PM (#16703697)
It's really easy to start working on and switch between several different branches at the same time. O&M fixes may be handled by a different team and regularly need to be moved into development. Now add in some experimental branches used for various things etc.
Re:Putting the I back in IDE by Const-me on Wednesday March 28, 2018 @11:07PM (#16704229)
I agree.

Another reasons why I prefer GUI are auto complete, tooltips and context menus. Also for some documents like xml, also when working with other people’s code, I find it useful to collapse/expand blocks of text.

All these features pretty much require a GUI-based editor.

Re:Putting the I back in IDE by eadmund on Thursday March 29, 2018 @12:29AM (#16704500)
Those features are available in emacs, and work in both the GUI and the terminal.

For auto-complete, vanilla emacs has dynamic abbreviations; there are several packages for fancier auto-completion; company-mode, for example, works just fine in the terminal, as well of course as in the GUI (X11, macOS or Windows).

Likewise with tooltips, which in the terminal generally are generally displayed in a special region of the terminal instead.

Likewise with context menus, which can be shown just fine in a VT100 terminal.

Likewise with expanding & collapsing text ('folding'). Org-mode, to take just one example, is built on folding — and is easily one of modern emacs's killer features.

Seriously, give emacs a shot. Both Prelude & spacemacs are excellent configs for it.

Re:Putting the I back in IDE by Const-me on Thursday March 29, 2018 @01:58AM (#16704823)
> give emacs a shot. Both Prelude & spacemacs are excellent configs for it.

Are there any advantages over Visual Studio + Visual Assist, for C++ or C# languages?

Because I see many disadvantages.

About text editor features, your workarounds have flaws compared to good GUI. For tooltips, that special region of the terminal is physically separate from the cursor. For folding, a separate, visually distinct indicators of what’s folded/unfolded help navigating the code faster.

Another text editor feature hard to do in text mode is spell checking for strings and comments. Color is already used for syntax highlighting, so wavy red underlines come handy.

But visual studio is more than an editor, it includes a build system, debuggers and profilers, package manager, and many more related features. Everything comes already integrated and just works out of the box.

Re:Putting the I back in IDE by eadmund on Thursday March 29, 2018 @08:57AM (#16706582)
> Are there any advantages over Visual Studio + Visual Assist, for C++ or C# languages?

A fully-extensible, flexible environment which anyone (even a secretary!) can easily extend.

> About text editor features, your workarounds have flaws compared to good GUI.

They're not workarounds; they are the features. emacs has a GUI. I repeat: emacs has a GUI. Tooltips in a GUI display as you'd expect. Folding in a GUI displays as you'd expect.

> Another text editor feature hard to do in text mode is spell checking for strings and comments. Color is already used for syntax highlighting, so wavy red underlines come handy.

Terminals support underlines!

> But visual studio is more than an editor, it includes a build system, debuggers and profilers, package manager, and many more related features.

Have you ever used emacs? It's more than an editor; it connects to build systems like make, maven, gradle, ant, what-have-you. It has its own elisp debugger, connects to gdb, SLIME provides an integrated Common Lisp debugger &c. It has a profiler. It has a package manager. It has a best-of-breed git interface, Magit. It has a best-of-breed personal organiser, Org-mode. It has multiple email clients (rmail, vm, gnus & notmuch come to mind, but there are probably more). It has multiple web browsers (emacs-w3m, eww, w3 & a new experimental WebKit-based browser). It has multiple image viewers. It has multiple terminals & its own shell.

Emacs is far, far 'more than an editor.' It's probably the single editor which is the furthest from being just an editor. Don't trust me: give it a shot! It really is a wonderful experience.

And yes, it has a GUI. Images, scrollbars, menubar, toolbar: the works. Runs on X11, macOS & Windows. And it also runs perfectly well in a VT100 terminal. You can use the same emacs locally and remotely, over SSH. It's pretty awesome.

Re:Putting the I back in IDE by Const-me on Thursday March 29, 2018 @09:23AM (#16706778)
> which anyone (even a secretary!) can easily extend

Even if that’s true, we’re talking about development environments here, so secretaries are irrelevant. I’ve been programming C++ and C# for decades, for me, visual studio is quite flexible and extensible.

> Terminals support underlines

I specifically told about wavy red underlines for spell checking, and terminals don’t support that. Simple underlines are too intrusive i.e. they often mask '_', and don’t stand out visually from normal text.

> It's more than an editor; it connects to build systems like make, maven, gradle, ant, what-have-you.

I know it’s possible to integrate everything in Linux ecosystem. I just don’t want to waste my time connecting, integrating, and then supporting the setup that just works out of the box on Windows, with freeware visual studio.

Re:Putting the I back in IDE by icebraining on Thursday March 29, 2018 @02:55AM (#16705065)
Another text editor feature hard to do in text mode is spell checking for strings and comments. Color is already used for syntax highlighting, so wavy red underlines come handy.

No wavy red lines, but there's still two different types of coloring (letters vs cell background): https://i1.wp.com/www.tjansson.dk/wp-content/vim-spell-error...

Re:Putting the I back in IDE by confounded on Thursday March 29, 2018 @03:13AM (#16705145)
Emacs 25 GUI gives me wavy red lines (via Flyspell).
Re:Putting the I back in IDE by oblio on Thursday March 29, 2018 @02:30AM (#16704963)
Terminals do have rich text, I have to point that out. Not conhost, the default one on Windows (though I think the latest Windows update might have it).

So you can have underline, bold, italic, squiggles, I think even strikethrough. Also you can have tooltip "windows" but since they're harder to create and manage few applications use them. Those that do are generally based on ncurses, a library for TUI (think Norton Commander or Turbo Pascal)

Vim even has a spell checker built in.

What the terminal does not have is usually consistent support because terminal emulators are really shady, there's no actual standard (most just do what xterm does). For the TUI thing, there's also no real conventions plus I'm pretty sure both Vim and Emacs don't use ncurses and roll their own (see: lack of consistency).

You also need to cobble things together out of packages with varying degrees of quality and documentation, from long forgotten wikis and 90's pages belongings to ex post-docs.

Re:Putting the I back in IDE by icebraining on Thursday March 29, 2018 @03:01AM (#16705090)
> tooltips

Tooltips work in the terminal, they're just text after all. See Vim + YouCompleteMe (which, as the name indicates, also provides auto-complete): https://camo.githubusercontent.com/1f3f922431d5363224b20e994...

> I find it useful to collapse/expand blocks of text

For that you don't even need plugins, folding has been a standard feature for many years

Re:Putting the I back in IDE by Lio on Thursday March 29, 2018 @03:59AM (#16705342)
There doesn't seem to be anything about those features that makes them require a GUI.

e.g. I'm using ZSH specifically for it's command line autocomplete stuff. Emacs has helm for context narrowing and really good support for context menus. Vim will let you collapse/expand blocks of text including in XML using a mouse in a terminal window.

For spelling errors Vim will give you an straight red underline in the terminal and squiggly underline in its "GUI" versions. I assume that Emacs is the same.

I'm not suggesting you leave VS by the way. I'm just saying that your GUI only examples aren't GUI only.

Re:Putting the I back in IDE by yorwba on Wednesday March 28, 2018 @11:19PM (#16704270)
There are vim plugins for auto-completion and it supports code folding out of the box. I'm not sure what you use tooltips and context menus for, but that functionality is probably available via some : command.

But then most command-line editors are actually GUIs in the terminal with excellent keyboard support.

Re:Putting the I back in IDE by Const-me on Thursday March 29, 2018 @12:14AM (#16704449)
> I'm not sure what you use tooltips

They show documentation (pulled from comments) for functions, classes and arguments.

> and context menus

For context-sensitive commands I use once per week or less often, so I don’t bother memorizing keyboard shortcuts for them.

> most command-line editors are actually GUIs in the terminal

Most developers don’t use command line editors. Here’s recent data from this year: https://insights.stackoverflow.com/survey/2018#development-e... As you see, 4 most popular editors are VS Code, Visual Studio, Notepad++ and Sublime Text, all of them are GUI applications. Only 26% developers use Vim, 4% Emacs.

Re:Putting the I back in IDE by oblio on Thursday March 29, 2018 @02:41AM (#16705007)
Those stats are also probably skewed in favor of people actually bothering to fill their survey. Those are more likely to be active/proactive, which in my experience is correlated with tinkering with tools (ergo, using Vim or Emacs).
Re:Putting the I back in IDE by dmitriid on Thursday March 29, 2018 @03:37AM (#16705240)
> Those stats are also probably skewed in favor of people actually bothering to fill their survey. Those are more likely to be active/proactive, which in my experience is correlated with tinkering with tools (ergo, using Vim or Emacs).

and yet:

> Most developers don’t use command line editors. Here’s recent data from this year: https://insights.stackoverflow.com/survey/2018#development-e.... As you see, 4 most popular editors are VS Code, Visual Studio, Notepad++ and Sublime Text, all of them are GUI applications. Only 26% developers use Vim, 4% Emacs.

Re:Putting the I back in IDE by oblio on Thursday March 29, 2018 @05:57AM (#16705792)
My point that those stats are not necessarily representative of the general population in that CLI editors are used by even less people than listed there. In my personal experience maybe 1% of the developers I know use them as their primary editors. They maybe edit some stuff with them on remote Unix systems, if you can call i<change some stuff>:wq real editing :)
Re:Putting the I back in IDE by sid-kap on Wednesday March 28, 2018 @11:48PM (#16704371)
Spacemacs has excellent context menus. It was suprising how discoverable everything is!
Re:Putting the I back in IDE by milesrout on Wednesday March 28, 2018 @11:41PM (#16704350)
vim supports all of those things out of the box, both in GUI mode (gvim/MacVim) and terminal mode (vim).

Emacs supports all of those things out of the box as well.