News for hackers. Stuff that matters.
Re:A terminal-based workflow for research, writing, and prog... by snicker7 on Thursday December 03, 2020 @09:32PM (#25298263)
At 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.

Re:A terminal-based workflow for research, writing, and prog... by desmap on Thursday December 03, 2020 @11:25PM (#25298940)
Just 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.
Re:A terminal-based workflow for research, writing, and prog... by npsimons on Friday December 04, 2020 @10:05AM (#25302982)
> is so buttersmooth and no other setup has given me such an seamless interoperability between an editor and an OS . . . This is the most underrated killer feature.

You've just described what it feels like to be an emacs user. It's all just text[0].

[0] - https://blog.vivekhaldar.com/post/3996068979/the-levels-of-e...

Re:A terminal-based workflow for research, writing, and prog... by bigdict on Friday December 04, 2020 @12:36AM (#25299366)
Does NeoVim support that out if the box? For regular Vim I'm using https://github.com/christoomey/vim-tmux-navigator.
Re:A terminal-based workflow for research, writing, and prog... by desmap on Friday December 04, 2020 @03:42AM (#25300306)
No, 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.

Re:A terminal-based workflow for research, writing, and prog... by nbwl on Friday December 04, 2020 @02:20AM (#25299854)
I don't think so. I had to use that package too in neovim.
Re:A terminal-based workflow for research, writing, and prog... by rusticpenn on Friday December 04, 2020 @02:04AM (#25299781)
I am not sure if you tried i3 window manager. It provides similar features but with more freedom.
Re:A terminal-based workflow for research, writing, and prog... by desmap on Friday December 04, 2020 @03:44AM (#25300316)
I posted in another comment more about my view on i3. However, compared to tmux it also lacks the capability to be used via ssh. At the end of the day there are not really comparable but yeah, I prefer to work with tmux+nvim on a *nix environment through ssh, all wrapped in a typical window manager such as Windows which handles stuff like hidpi, meta window management, device management etc. The good thing is that I am not stuck with Windows. You can give me any meta/desktop OS/window management such as any Linux wm or macos as long as I have tmux and nvim, my productivity will stay the same.

FWIW, while automatic tiling with i3 is super impressive, it's overrated. In the beginning you believe that this really boosts your productivity but you get quickly annoyed. If tmux is set-up right, so not just this seamless navigation but also creating and resizing of panes in a similar fashion with intuitive binds you wouldn't want any automatic tiling anymore. With my binds I am able to open and resize dozen of panes faster than I ever could with i3. And as a bonus tmux' config is just simple some remapping but never a rabbit hole to get basic things working.

Re:A terminal-based workflow for research, writing, and prog... by alpaca128 on Friday December 04, 2020 @05:25AM (#25300857)
That is why I prefer the static tiling approach compared to the common dynamic tiling window managers. The important difference is that a static window manager never reorders or resizes windows unless you tell it to, and this leads to the same flexibility but without being forced into a predetermined layout.

I like it a lot but it's rare, the only one I've used is stumpwm.

Re:A terminal-based workflow for research, writing, and prog... by alpaca128 on Friday December 04, 2020 @05:21AM (#25300834)
The disadvantage of that is that i3 is not aware of a window's contents. A terminal multiplexer however knows what the current working directory in each terminal pane is, and if you open a new split it can be automatically set to the same path. This makes the whole process a little bit smoother.
Re:A terminal-based workflow for research, writing, and prog... by briggers on Friday December 04, 2020 @06:04AM (#25301063)
Yes! I do this and love it. Works locally or via SSH with no difference at all.
Re:A terminal-based workflow for research, writing, and prog... by _huayra_ on Friday December 04, 2020 @12:40AM (#25299393)
I think author (and other folks who have this vim+tmux+other tools type of workflow) would really like Emacs, especially Org mode. I have a very similar set of tools for a pure-Emacs workflow to this:

- org-roam - org-noter - persp mode with persistent sessions - vterm + eshell - various plugins for org bibtex / latex

All of this in Doom Emacs gives me the same functionality.

I do admit that it took a large amount of time for me to cultivate this over several years, as it does for most workflows. It's very hard to jump ship, even when the grass may be objectively greener, because one has to actually be productive today instead of postponing until one's fonts are just right and keybindings are perfect!

Re:A terminal-based workflow for research, writing, and prog... by desmap on Friday December 04, 2020 @03:53AM (#25300359)
Tried so many times to get into emacs (3 or 4 times) and once into org mode. It unfortunately never made click despite my love for any kind of terminal app and also competition in this space. Just emacs lisp would be the reason to switch from vimscript but again I just couldn't get warm with emacs.

Also I think that the paradigm of modal editing is key to editing, not because I am used it, it just makes sense to have the myriad of functions of an editor easily reachable without too many modifiers. Coding isn't about just writing code but a lot about thinking, editing, staring at code, thinking, editing, jumping, f, /, yy's, dd's, ct, etc. I use modifiers heavily, way more than the typical ctrl/alt, but again to have an extra dedicated mode is crucial, so I can't imagine how any non-modal editor, eg emacs, can excel re UX like vim or nvim do. There must be reason that even the emacs community itself promotes spacemacs, which follows that paradigm, so much. But for some spacemacs is a layer too much adding unnecessary complexity. Besides, vim is also so popular because it's fast, load time, editing, anything.

Whatever, put me into any text field without modal binds and I am pretty much handicapped but maybe I might just missed emacs' hidden qualities. Trying emacs feels going one step back (when coming from modal editing).

Edit: Don't get me wrong, this shouldn't qualify as offense but every time I read some random emacs praise on the net, I never know if I should give emacs another try or if it's just a vocal minority who never experienced proper modal editing and I just should move on.

Re:A terminal-based workflow for research, writing, and prog... by RaycatRakittra on Friday December 04, 2020 @06:26AM (#25301182)
I would give it another shot. I was a Vim zealot that converted over with Spacemacs, but I ditched Spacemacs once I knew the names of the packages I used the most. The package `evil` is enough to satisfy your modal editing needs (perhaps you already knew about it). Anything that doesn't fit your workflow can be changed to fit into that same modal editing paradigm. It just takes time but it's worth it in my humble opinion.

Just remember: Emacs' main strength comes from how malleable and extensible it can be. Give it time; don't jump ship after a few bumps. Patch it up with some Elisp and keep sailing.

Re:A terminal-based workflow for research, writing, and prog... by selfhoster11 on Friday December 04, 2020 @01:13PM (#25305705)
Emacs is malleable, but it shows that it comes from a pre-CUA era. IMO, they should just drop the existing UI preset into a "legacy UX" package that old-timers can keep, and come up with a new preset that will be familiar to users of post-Win95 machines.

IntelliJ does this right. You are dropped into a brand-new, complicated editor, but the basics like the arrow keys, Ctrl+C/Ctrl+V, ctrl+arrow key movements, menus and lots of other bits are already familiar to you. You may remap the editor in any way you want, but you are likely to override a few presets and get on with your day, than rewire the entire thing.

Re:A terminal-based workflow for research, writing, and prog... by desmap on Friday December 04, 2020 @06:53AM (#25301332)
> It just takes time but it's worth it in my humble opinion.

But why? Because I have a better scripting language? Are there more benefits beyond having lisp?

Re:A terminal-based workflow for research, writing, and prog... by RaycatRakittra on Friday December 04, 2020 @07:08AM (#25301405)
That's really gonna come down to your workflow and use cases. For me, the Lisp is a bit more welcoming than VimScript for me. It's much easier to test out a small snippet of something in-buffer which might grow into something else.

But, putting Lisp aside, going through the growing pains was worth it for me because of org-mode. I'm certain Vim might have something similar but the proper `org` package is definitely on my list of benefits. I have an org-file that tracks my time and generates invoices with a click of a button. Another one documents all the API calls in another project with interactive areas, thanks to org-babel. I think being able to craft documents like this is invaluable but again, it's gonna come down to how you do work and what makes you happy/efficient.

Re:A terminal-based workflow for research, writing, and prog... by desmap on Friday December 04, 2020 @11:52AM (#25304572)
> It's much easier to test out a small snippet of something in-buffer which might grow into something else.

Ok, here you got me and I'm about to try it another time. But then again I remember the slow loading times, the weaker ecosystem (is the lsp implementation as good and fast as coc-vim?) but whatever, maybe I should give it a try with evil mode. But there are so many other cool things waiting to be learned...

Re:A terminal-based workflow for research, writing, and prog... by rofrol on Friday December 04, 2020 @05:50PM (#25309374)
Re:A terminal-based workflow for research, writing, and prog... by _huayra_ on Friday December 04, 2020 @12:10PM (#25304867)
I can't reply to your deepest comment in this thread, but I'm following up on that:

* Try spacemacs. Though I'm a Doom user, spacemacs is much more approachable out of the box. You can just uncomment things and have it work well. * Use Emacs 27.1 or later because it has faster JSON parsing -> crucial for good LSP performance

A few ways to get started are learning how to search for things within Emacs:

* C-h f: find documentation for any function by name * C-k k: find the documentation for any keystroke function * If you want to see what commands are going on: install command-log-mode. it will give you a buffer to see what commands you run with every keystroke * I don't remember if spacemacs has it or not, but the following two packages are crucial when you want to learn more: which-key (to show the keys available when you press something like C-x) and helpful mode [0]. I'm pretty sure spacemacs has these by default, but if not they're golden!

Re:A terminal-based workflow for research, writing, and prog... by rofrol on Friday December 04, 2020 @05:49PM (#25309368)
Re:A terminal-based workflow for research, writing, and prog... by cyrialize on Friday December 04, 2020 @09:15AM (#25302394)
Org-mode is amazing. If you're on iOS I highly recommend beorg https://beorgapp.com/. In my opinion it's the best app for org on the go (including android).
Re:A terminal-based workflow for research, writing, and prog... by marci on Friday December 04, 2020 @01:28AM (#25299628)
Have you heard about Org-roam-bibtex ?

https://github.com/org-roam/org-roam-bibtex

https://www.youtube.com/watch?v=Wy9WvF5gWYg Org-roam-bibtex - Quick Presentation

Re:A terminal-based workflow for research, writing, and prog... by enriquto on Friday December 04, 2020 @04:36AM (#25300575)
To "kludge together a bunch of disparate terminal programs" is not conceptually different than "kludge together a bunch of disparate elisp functions". Some of us live inside the command line, some of us live inside emacs, most of us live inside a web browser.
Re:A terminal-based workflow for research, writing, and prog... by desmap on Friday December 04, 2020 @04:51AM (#25300660)
Yes, I also found "kludge together a bunch of..." a bit misleading since this atomic nature of *nix is why we use it.
Re:A terminal-based workflow for research, writing, and prog... by snicker7 on Friday December 04, 2020 @07:55PM (#25310488)
I was referring to the consistency of the user interface and other behaviours. For example, themes and key bindings can be made consistent across emacs modes. They share the same config.
Re:A terminal-based workflow for research, writing, and prog... by d0mine on Friday December 04, 2020 @11:17AM (#25303997)
There may be a difference in how uniform & integrated the final result is likely to be.
Re:A terminal-based workflow for research, writing, and prog... by thecedarprince on Thursday December 03, 2020 @10:58PM (#25298720)
Thanks! 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/) have a look at [Javis.jl](https://github.com/Wikunia/Javis.jl). It is an animation package similar to manim by 3blue1brown. :)