13 ms·
A terminal-based workflow for research, writing, and programming
- D13Fd 6y agoLooks nice. I feel like this is somewhere in between a CLI and a GUI.
- coldtea 6y agoAs such, it's a kind of a curse. (pun with ncurses).
- madhadron 6y agoThere's a lot of really good stuff in here about quick access to things. I feel sad that we're all still doing this stuff in teletype emulators, though. Why can't we have this and nice GUIs, too?
- Koshkin 6y agoIt’s acquired taste.
- coldtea 6y agoI, on the other hand, feel sad that we don't have better terminals, but still rely on ancient teletype protocols, escape codes, and arcana. I'd very much like an advanced, still cli/terminal, interface option.
- 1996 6y agohttps://jexer.sourceforge.io/screenshots/jexer_sixel_in_sixel.png https://jexer.sourceforge.io/screenshots/jexer_sixel_in_sixe...
- hhas01 6y agohttps://media.tenor.com/images/f64390f36df99bc8d1891833c658e861/tenor.gif https://media.tenor.com/images/f64390f36df99bc8d1891833c658e...
- madhadron 6y agoI think maybe we're asking for the same thing. I want to be able to write commands and small scripts smoothly but have nice integration with graphical tools. Oberon, Acme, and Smalltalk all are environments that try this to various degrees...
- mongol 6y agoI would probably agree, but what do you think a better terminal would be like, compared to the traditional ones?
- hhas01 6y agoDoesn’t have the beautiful Display Postscript/LeX-esque typography that I want, and less said about Lots of Irritating Silly Parentheses the better, but even 1980s tech was doing it better: https://www.youtube.com/watch?v=o4-YnLpLgtk https://www.youtube.com/watch?v=o4-YnLpLgtk I think there are lessons to be had from the likes of Smalltalk and Logo too. Highly expressive without insane levels of cryptic inconsistent punctuation rules and UX man-traps.
- selfhoster11 6y agoMy attempt at answering that question: https://news.ycombinator.com/item?id=25305383 https://news.ycombinator.com/item?id=25305383
- selfhoster11 6y agoI yearn for a truly modern, speedy and advanced terminal that grows beyond the mold and mindset of a text-only line-by-line Unix terminal. Terminals of 2020 and beyond need to have first-class support for audio, video, images, and peripheral interactivity/customization. Terminology and iTerm 2's ability to display pictures, and some terminals' support for Sixel is one of the directions I want to see progress in. - It should be possible to `cat` an image, or a video, or even previews of Word and Photoshop documents. Terminology, iTerm 2 and Sixel-compatible terminals have this to some extent, but it's not standardised and doesn't have a broad support base. - Programs should be able to raise notifications without relying on third-party/OS-provided utils that have a drastically different API and availability across platforms. - Rich read-only visualisations of progress should be possible to call up with a few lines of code. I want to see a `dd`, `mv` or `cp` with a graphical progress bar at the bottom of my window. If my OS supports it, I want this to integrate with the UI like the progress widget on my taskbar. - We should be able to render a piece of output in 3D, if we so desire. I don't want Crysis, but I do want a Matlab logo that I can rotate by dragging my mouse and graphs that zoom when I Ctrl+scroll at them. - Support for file pickers and rich selection/filtering of file/directory lists. Not for sandboxing, but for convenience. - A command line builder (like one of the classic Apple OSes had, cannot find a reference now, or something like the one in Fish but more advanced). Only valid combinations of parameters will be supported, mutually exclusive commands are impossible to select. Any arguments that are files will be possible to use with a file picker. Any argument that's a date will get a calendar widget. Any argument that's a boolean or an enum will get a checkbox or drop-down respectively. - Terminals should be able to intake gigabytes of input per second, up to the limit of the hardware, without choking up. - We should be seeing 60FPS and beyond as a normal feature. - We should finally get unlimited scrollback enabled by default. The terminal emulator should keep everything that I've seen before, and remember it for me. We have the space for it, either in RAM or persistent storage. If not, it should be adaptable and drop the scrollback buffer that is lower priority than other applications on the system if they need more resources. - Unicode should come as standard. Emoji should come as standard. - End termcap. We should be able to hash out ONE standard to rule them all. We've had 50 years to come up with ideas and opinions. Version it so that we can release a V2 in 2100. - While we are at it, end Bash and come up with a saner shell notation that doesn't overload single/double quotes, the ampersand, > amd <, or human-text spaces. We have several more decades of syntax design knowledge worked out, and a whole keyboard with >101 keys. We have two Alts, two Ctrls, and a whole function key row. Let's make use of them for non-printable character input and interaction with the terminal. - (Debatable) consider adding hypertext support. It's here to stay, and not just in the form of HTML. There's more that can be added, but really, I think terminals deserve better.
- chubot 6y agoI collected some experiments in that area here (and anyone should feel free to add more, including their own): https://github.com/oilshell/oil/wiki/Interactive-Shell https://github.com/oilshell/oil/wiki/Interactive-Shell Many of the articles have nice screenshots / animations to give you a feel for what it is. I plan to turn https://www.oilshell.org/ https://www.oilshell.org/ into a library and I hope people will build GUIs around it. There are some UI possibilities that are difficult or impossible unless you have hooks to the shell other than stdin/stdout. https://github.com/oilshell/oil/issues/738 https://github.com/oilshell/oil/issues/738
- madhadron 6y agoSo I recently started a job where I'm on Windows, and I've found myself surprisingly enamored of PowerShell. So many of the things that the shell got wrong are done right. The authors wanted to use <, >, etc. as their real meanings, but apparently the early users rebelled at the idea that > was no longer redirect to file. But things that would be nightmares in unix shells, such as going in and adding a new element as the last child of only one of four elements in an XML document (based on its attribute value) are a few lines of code. I still have decades of muscle memory in bash, but I find myself reaching for PS more and more. The problem is that you really need an interface for loading software components into your system at runtime, which .NET provides, but aside from .NET or COM I am unaware of any other equivalent system. Java's OSGi is the closest, and ugh...
- chubot 6y agoI haven't used PowerShell much, but I skimmed a 500+ page book on it, and I've heard a lot of mixed feedback on it. Some people love it and some people hate it. Some more responses here: https://news.ycombinator.com/item?id=24873410 https://news.ycombinator.com/item?id=24873410 I guess what I'll say is that I hope the Oil ecosystem will grow the things that people like about it, that aren't tied to Windows. Windows and Unix are fundamentally different and it means they need fundamentally different shells, since a shell is by definition a language closely tied to the OS. You can run powershell on Unix, and bash on Windows, but even on the same OS they are somewhat disjoint tools!
- SebastianKra 6y agoYou don't have to use the terminal for fast workflows. - Many programs offer intuitive quick-action- or quick-search-fields. For example: double-shift in IntelliJ or CMD-Shift-O in many Mac apps like Fork, Things and IA-Writer. - System wide search tools like Alfred and Launchbar will allow you to quickly access Files and execute Workflows - _Every_ Menubar in MacOS is searchable. Just press a shortcut and type what you want to do. - ...and let's not forget that keyboard shortcuts exist. The great thing is that you get all the power of a keyboard workflow, without losing the accessibility of a GUI.
- __turbobrew__ 6y agoHaving a terminal-based workflow is a lifesaver in the era of work from home. When using a terminal based workflow I cannot tell the difference between working locally and working on a machine I have SSH'ed into located at my office (10ms round trip ping). Even when I VPN into work, ssh into a box at work, then ssh to a jumpbox in AWS, and then ssh from the jumpbox to an EC2 server the experience is still flawless.
- bch 6y agoI was thinking about this today - that is: a terminal (“minimal”) setup may well have prepared those of us who practice it - for remote work (great news if a pandemic strikes!) I wondered though, if there’s no way to objectively “score” the advantage of, say, terminal-minimalism vs. GUI-maximalism, what might some discussions of t-min vs GUI-max be? What, if anything, does t-min really cut us out of while we’re preparing for the rare case of “Ok, imagine you’re stuck on a spacecraft with only a character terminal and a 300baud modem - what will you do then with your Windows RDP-available machine back on earth?” Am genuinely interested to hear people’s ideas of the calculus here.
- nbwl 6y agoPros of t-min: - overall greater speed using a computer, you become what people call a "power user". - some sysadmin knowledge. Adopting a terminal based workflow requires to tinker with your system (systemd, sh scripts, building certain repo for a tool you want etc.). Pros of GUI-max: - You don't have to spend hours learning and configuring things. - Certain tools are just better when they are built out in a GUI for you. I think here in particular of C/C++ debuggers, it's hard to get a nice experience in the terminal. As for objectively "scoring" it's hard to assign real values. You could eventually measure speed. I have worked in production support solving a lot of benign problems on a day to day basis. This is when I adopted my terminal based workflow. It was way faster than my other teammates using desktop apps.
- desmap 6y ago> You don't have to spend hours learning and configuring things I got 70% of my sysadmin skills because of hanging out 24/7 in the shell and configuring things.
- spekcular 6y agoI tried very hard when I first installed Linux to get into a terminal-based workflow, mainly by creating an elaborate vim config. In the end I couldn't do it. I spent a lot of my time at my computer writing LaTeX documents, and for this the ctrl-click capability of a GUI editor is indispensable. That is, the editor brings up the source and compiled file simultaneously, and by ctrl-clicking somewhere in either, I am brought immediately to the corresponding place in the other display. I don't really use any conveniences of the editor (e.g. autocomplete) except this. Whereas, in vim, trying to do random-access edits like this with just a keyboard is sort of a nightmare. I'm sure there's a way to rig ctrl-click up in vim, but to me the appeal of vim is the (purported) speed boost from your hands not leaving the keyboard, so that really defeats the point. If anyone has ideas in this regard, I'd be happy to hear them!
- nuclearnice1 6y agoWhat GUI do you use for that Latex editing experience?
- spekcular 6y agoI use TeXShop. TeXstudio also has this.
- threatofrain 6y agoNothing has rivaled VSC for me.
- shepherdjerred 6y agoI think [TexPad](https://www.texpad.com/ https://www.texpad.com/) has this feature. It's my favorite LaTeX editor.
- konjin 6y agoI use terminal exclusively and my vim config is basically 10 lines. Looking at peoples really complex init scripts is like looking at olympic athletes, cool for relaxation, maybe getting one or two things out of them, but if you're a removalist you really don't need glistening six packs.
- tomcat27 6y agowhy do you prefer writing in terminal based editor?
- lytedev 6y agoPersonally, I'm in a terminal anyways doing other things. tmux really enables me to compose things together really powerfully.
- idolaspecus 6y agoStarting with Tmux was quite eye-opening to me for exactly this reason. The power of composable tools is hard to exaggerate.
- ropeladder 6y agoCan you give some examples of what you're able to do or what exactly you mean by composing in this context? I've used tmux a bit but just to split windows and restore sessions...
- hxegon 6y agoFeel like I'm stuck at this point myself. Sort of plateau'd my tmux at "persistence / tab manager"
- idolaspecus 6y agoVim + Tmux + SSH is probably the most common/generic example. This stack allows me to, for example, work from my iPad Pro.
- thecedarprince 6y agoAuthor of the article here! For me, I prefer it for two reasons: 1. Distractionless editing - not fiddling with formatting or things like that is quite nice. Especially since I work with markdown and LaTeX, it is easy to convert over to a word file once I get the draft of the version done thanks to pandoc. From there, then I can really worry about the formatting - if I need to as pandoc is great! 2. I like the speed and lightness of a text editor for writing. Don't have to wait for boot, can easily grep and replace, and jump to where I need to go.
- kody 6y agoVery nice! I've tried to switch over to a terminal-based workflow but Qt Creator, VS Code, and Firefox for Atlassian products have been the main holdouts for me. I can't see myself moving away from Qt Creator, but I would kill for an ncurses app for editing Confluence pages and reviewing pull requests without 1200ms between every. single. click. At the very least this article has given me the itch to dust off the old dotfiles and start fiddling with zsh again!
- SabbathHex 6y agoRe: Confluence. I was at the same point about a year ago and wrote a small python script that posts pages that I write locally in vim to Confluence: https://github.com/SabbathHex/confluence_poster https://github.com/SabbathHex/confluence_poster The downside is that due to Atlassian limitation and phasing out of wiki markup it's not possible to retrieve articles from Confluence. This script is not suitable for collaborative editing of the same page. Script is quite ugly, but gets the job done.
- thecedarprince 6y agoThanks for the kind words kody! Hopefully my linked dotfiles in the article can help out with that. :)
- desmap 6y agoVS Code is very good at connecting to remote servers/wsls/etc being just a dumb client. I still use VS Code next to all my terminal apps because some stuff is unmatched in VS Code, eg Pythons Interactive Console paired with a Jupyter server (1000x better than any notebook).
- snicker7 6y agoAt risk of being /that guy/, I find that emacs gives me a nice & consistent "one-stop-shop" for text-based apps instead of having to kludge together a bunch disparate terminal programs. Also, +1 for Julia.
- thecedarprince 6y agoThanks! I love Julia - if you want to check out a cool Julia project I am working on with my friend [Ole Kröger](https://opensourc.es/about/ https://opensourc.es/about/) have a look at [Javis.jl](https://github.com/Wikunia/Javis.jl https://github.com/Wikunia/Javis.jl). It is an animation package similar to manim by 3blue1brown. :)
- desmap 6y agoJust the combination of tmux and nvim with shared ctrl-hjkl between both nvim and tmux panes is so buttersmooth and no other setup has given me such an seamless interoperability between an editor and an OS. What this means: you can switch between tmux panes or nvim panes or from tmux to nvim and back always with the same shortcut. This is the most underrated killer feature.
- bigdict 6y agoDoes NeoVim support that out if the box? For regular Vim I'm using https://github.com/christoomey/vim-tmux-navigator https://github.com/christoomey/vim-tmux-navigator.
- nbwl 6y agoI don't think so. I had to use that package too in neovim.
- desmap 6y agoNo, you need that plugin/script but installation and usage is rock-solid, I am using this now for years. FWIW, I also never use nvim's built-in terminal because this setup with tmux is so fast and feels super natural. Hint: you have to redefine more of tmux' binds, the defaults are just not usable. Hint2: most creation and resizing of panes and windows binds should be mapped without the tmux prefix, you can do this with "bind -n" in the .tmux.conf. Hint3: read the tmux manual, it's really good and on one (long) page.
- syntaxing 6y agoWhoa the terminal based browser mentioned (ranger) looks awesome! I’ve been looking for something similar since I SSH so much more because of the WFH situation. I love how it has the image preview too!
- asciimov 6y agoA good alternative to strictly terminal-based workflows are tiled window managers. The big gain is that you don't have to give up all those gui apps as they blend in next to the terminal apps quite well.
- ekianjo 6y agoTiled windows managers have issues though. Last time I tried i3wm for example, there was no default support for sleep, energy saving and hardware keyboard shortcuts and you had to take care of all of that instead of the usual GNOME/KDE to do it for you. The best option is to install tiled windows managers plugins within GNOME or KDE on Linux.
- 188201 6y agoAll are supported. You just need to edit the config file. Adding keyboard shortcuts is easiest in window manager comparing to full desktop environment where the setting is hide behind the some Setting GUI. Energy saving feature is basically setting P-state on Intel CPU, and does not work on AMD. You could do it manually by using kernel interface.
- generalizations 6y agoI found i3 to be the easiest WM for setting arbitrary keyboard shortcuts. The .config file makes it really convenient, and you can just set the key to run an arbitrary shell command.
- swirepe 6y agoi3 is one of those things that supports everything, you just have to configure it. If you want i3 with sane defaults and a pretty style out of the box, you should try i3-regolith[1] [1]https://regolith-linux.org/ https://regolith-linux.org/
- cptnapalm 6y agoRegolith has at least some of that. I'm using it on Ubuntu. https://regolith-linux.org/ https://regolith-linux.org/
- thecedarprince 6y agoHey everyone! I am the author of the article! If you have any questions, feel free to ping me and I will try to respond in a timely fashion! I intend to always keep this article up to date so feel free to bookmark it for a future reference. Further, it makes my heart so so happy to see so many people being either inspired, interested, or curious about my workflow! I think the best workflow is the one that works for you. If my article played some part in that, then I am jubilant. Have a wonderful day!
- desmap 6y agoI switched to this setup years ago and I regret all the decades before I've spent with GUIs. One question though, how do I get the floating terminals?
- catfive 6y agoLooks like a vim plugin: https://gist.github.com/TheCedarPrince/7b9b51af4c146880f17c39407815b594#file-init-vim-L43 https://gist.github.com/TheCedarPrince/7b9b51af4c146880f17c3...
- zwayhowder 6y agoI think I used your article on knowledge management when I set up my Browser/Kindle > Zotero > Vim (Markdown) > Pandoc > PDF workflow. Thank you! After a year of not doing research I'm just getting it all back together and I've swapped Zotero for Jurism a fork that has support for multiple languages that I greatly appreciate.
- thecedarprince 6y agoThat is amazing to hear zwayhowder and am happy to hear that made a difference for you! I need to overhaul that article you referenced at some point as I have a different system in place. It still accomplishes the same goals, but is just a bit neater. :) I will have to check out Jurism too. Best of luck with your research endeavors!
- p00f 6y ago
- anta40 6y agoA Mac user here, who use iTerm and Terminal for daily work. I just installed Alacritty. How do I open new tabs?
- disposedtrolley 6y agoI don’t think it has tabs —- you might need to have a look at Tmux and handling tabs/split panes using that. It’s 100% worth learning though. Tmux is available almost everywhere and it’s an easy way to increase your productivity!
- yudlejoza 6y agoTitle, especially with the inclusion of 'research,' is overly broad, and gimmicky. A (quantitative) researcher, involved in serious plotting, illustrations, and diagrammatic analysis, wouldn't last half-a-day in this workflow.
- neolog 6y ago> serious plotting, illustrations, and diagrammatic analysis I'm curious what these refer to. What kind of illustrations are you thinking of? What is diagrammatic analysis? Any introductory links for the uninformed?
- yudlejoza 6y agodata analytics, stats, machine learning, computational science, computational engineering, the list goes on plotting/viz using matplotlib, altair, Mike Bostock's D3.js, graphviz, pgf/tikz, inkscape, the list goes on I can't think of much outside a small subset of pure-math, and a small subset of TCS, where visualization is not part and parcel of daily research activity. (ignoring non-STEM disciplines like english, communication, social/political/economic sciences, etc).
- tomtomtom777 6y agoYou seem to be using a rather specific meaning of the word "research". If, for example, I pause coding and spent a few hours comparing and reading about various libraries to aid in a certain task, wouldn't this task be best described as "research" as well?
- deleted 6y ago[deleted]
- yudlejoza 6y agoAnd you would call that "research" terminal-based?
- tartoran 6y agoThanks for sharing. I haven't run into Ranger before and really like it. Will add it to my tool-chain.
- pjmlp 6y agoI keep traveling back to multiple xterms on IBM X Windows terminals accessing a DG/UX server back in 1994, when I see this kind of posts. I guess it is some people's idea of progress.
- mongol 6y agoI want to find a good way to preview pdf files in a terminal environment. Basically, browse through them to find the right one. Showing first page would be sufficient. Have not found the right solution yet.
- marttt 6y agoHere's a computer scientist with an impressive amount of hand-tailored tools for living without X11 (scroll down to the "Framebuffer" / "I no longer use X11" section): http://litcave.rudi.ir/ http://litcave.rudi.ir/
- baddate 6y agoI use Alacritty,zsh,oh-my-zsh and fzf like you, but I have never used tmux and lsd, do they have any highlight?
- kettro 6y agoTmux is great for persistence. It’s also basically required for working remotely. Allows you to, across sessions, to reconnect to the same flow. I have it set up to have multiple views of the same set of windows, so I can scroll through them independently. I’d say it is one of the best utilities I use.
- ajvs 6y agoMosh supports roaming. Or are you referring to something else about reconnecting?
- hopw_roewur_ne 6y agoTmux allows you to set up several windows and programs in a session (or multiple tmux sessions at once, like virtual desktops), detach from tmux, disconnect SSH, and when you SSH back in a week later, just "tmux attach" to get back to where you were. Also works if your connection drops in the middle of something.
- ngcc_hk 6y agoThis vs browsers especially notes like for ease of sharing ?
- hhas01 6y agoI love text, and I love IPC. I hate what 1970s terminal culture does to both. Why can’t we have modern text-driven interfaces* that are both parsimonious and elegant? The mighty Knuth gave us TeX 40 years ago, and our hardware has long since passed the point where doing the job right demands a significant number of cycles (even with the clattery mess that is Unicode standard), so there really isn’t any excuse for such awful regressive primitivism now. Because I don’t care that OP’s workflow works well for OP; I care about workflows that work better. For everyone. /cynical idealist -- * Traditionally “text-driven interface” means keyboard-driven, but if you aren’t paying attention to the rise of spoken words then you’re missing the next great opportunity to open up computing to all 8Bn of your fellow humans.
- antihero 6y agoWould highly recommend switching from nvm to asdf :) Your config is kinda similar looing to mine: github.com/radiosilence/dotfiles
- bregma 6y agoI'm not sure I see any advantages of having a window with multiple panes and tabs instead of a separate window for what would be in each pane or tab? I can easily alt-tab between windows on a workspace (and ctrl-alt-arrow between workspaces) and I can cut and paste between windows. I only need to use a mouse when I am forced by necessity to interact with the cartoons in a browser window or to play the red 10 on a black jack. Can anyone elaborate on the advantages to using a single mother application to house all my command-line interactions instead of separate application windows for each?
- selfhoster11 6y agoI yearn for a truly modern, speedy and advanced terminal that grows beyond the mold and mindset of a text-only line-by-line Unix terminal. Terminals of 2020 and beyond need to have first-class support for audio, video, images, and peripheral interactivity/customization. Terminology and iTerm 2's ability to display pictures, and some terminals' support for Sixel is one of the directions I want to see progress in. - It should be possible to `cat` an image, or a video, or even previews of Word and Photoshop documents. Terminology, iTerm 2 and Sixel-compatible terminals have this to some extent, but it's not standardised and doesn't have a broad support base. - Programs should be able to raise notifications without relying on third-party/OS-provided utils that have a drastically different API and availability across platforms. - Rich read-only visualisations of progress should be possible to call up with a few lines of code. I want to see a `dd`, `mv` or `cp` with a graphical progress bar at the bottom of my window. If my OS supports it, I want this to integrate with the UI like the progress widget on my taskbar. - We should be able to render a piece of output in 3D, if we so desire. I don't want Crysis, but I do want a Matlab logo that I can rotate by dragging my mouse and graphs that zoom when I Ctrl+scroll at them. - Support for file pickers and rich selection/filtering of file/directory lists. Not for sandboxing, but for convenience. - A command line builder (like one of the classic Apple OSes had, cannot find a reference now, or something like the one in Fish but more advanced). Only valid combinations of parameters will be supported, mutually exclusive commands are impossible to select. Any arguments that are files will be possible to use with a file picker. Any argument that's a date will get a calendar widget. Any argument that's a boolean or an enum will get a checkbox or drop-down respectively. - Terminals should be able to intake gigabytes of input per second, up to the limit of the hardware, without choking up. - We should be seeing 60FPS and beyond as a normal feature. - We should finally get unlimited scrollback enabled by default. The terminal emulator should keep everything that I've seen before, and remember it for me. We have the space for it, either in RAM or persistent storage. If not, it should be adaptable and drop the scrollback buffer that is lower priority than other applications on the system if they need more resources. - Unicode should come as standard. Emoji should come as standard. - End termcap. We should be able to hash out ONE standard to rule them all. We've had 50 years to come up with ideas and opinions. Version it so that we can release a V2 in 2100. - While we are at it, end Bash and come up with a saner shell notation that doesn't overload single/double quotes, the ampersand, > amd <, or human-text spaces. We have several more decades of syntax design knowledge worked out, and a whole keyboard with >101 keys. We have two Alts, two Ctrls, and a whole function key row. Let's make use of them for non-printable character input and interaction with the terminal. - (Debatable) consider adding hypertext support. It's here to stay, and not just in the form of HTML. There's more that can be added, but really, I think terminals deserve better.