also tramp, for editing files on any machine you can ssh into ... https://www.emacswiki.org/emacs/TrampMode
My Emacs Productivity Tricks/Hacks
201–210 of 210 posts
Re: My Emacs Productivity Tricks/Hacks
#202The one thing I consistently do in emacs that shocks my coworkers -- is running this (custom) function, that I call "arrayify": (defun arrayify (start end quote) "Turn strings on newlines into a QUOTEd, comma-separated one-liner." (interactive "r\nMQuote: ") (let ((insertion (mapconcat (lambda (x) (format "%s%s%s" quote x quote)) (split-string (buffer-substring start end)) ", "))) (delete-region start end) (insert in…
I use a VIM macro for this.
Showing off macros (in my case evil mode, but I suppose it's the same for emacs) is a nice party trick that has impressed some of my coworkers.
Sadly it does not really do so well at actual parties...
Re: My Emacs Productivity Tricks/Hacks
#203Earlier quoted context omitted.
By vterm do you mean this? https://github.com/akermu/emacs-libvterm/blob/master/README.... It seems extremely experimental, and I've been trying recently to make my emacs more stable so I can choose when I want to spend time editing my config.
It seems stable at this point. I've dropped using anything other than eshell & vterm in Emacs.
Re: My Emacs Productivity Tricks/Hacks
#204Earlier quoted context omitted.
It seems stable at this point. I've dropped using anything other than eshell & vterm in Emacs.
Can confirm—vterm is very stable now. I've ditched separate terminal applications and exclusively use Emacs+vterm.
Is there a way to get fuzzy searchable history ala bash Ctrl+r?
Also I've noticed that if I use any emacs movement command (say jump to start of line) vterm looses internal sync and my edits edit the wrong text. Is that an issue specific to my config, or do you have it as well?
Re: My Emacs Productivity Tricks/Hacks
#205Earlier quoted context omitted.
In vim: :' !awk '{printf("\"\%s\", ",$0)}' or to do the whole file: :%!awk '{printf("\"\%s\", ",$0)}' What I find nice about this approach is that I can use my knowledge of awk in other non-vim contexts. Similarly I can use my knowledge of other text processing commands to do things in vim, like reformat text into columns (:%!column -t) for example. Of course you could use vim commands to do the same thing: 0 GI" $ G…
You can use your knowledge of emacs in other non-emacs contexts as well! Elisp is a reasonably capable, if sprawling, programming language and comes with a lot of useful text and code munging stuff, as well as with cross-platform networking and filesystem support, and more esoteric stuff like calendar and symbolic/aribtrary precision math. And that's before installing any extra packages. I've written shebang scripts…
Re: My Emacs Productivity Tricks/Hacks
#206Earlier quoted context omitted.
Can confirm—vterm is very stable now. I've ditched separate terminal applications and exclusively use Emacs+vterm.
Thanks Is there a way to get fuzzy searchable history ala bash Ctrl+r? Also I've noticed that if I use any emacs movement command (say jump to start of line) vterm looses internal sync and my edits edit the wrong text. Is that an issue specific to my config, or do you have it as well?
the emacs movement issue I don't have, so perhaps that's a configuration issue.
(one perhaps useful tip: `vterm-copy-mode`, by default bound to C-c C-t, let's you navigate the buffer with normal emacs movement in order to copy)
Re: My Emacs Productivity Tricks/Hacks
#207Re: My Emacs Productivity Tricks/Hacks
#208Earlier quoted context omitted.
Looks interesting, but the main page claims it has support for a lot of languages, but according to this module page it only supports javascript, typescript, and html? https://github.com/hlissner/doom-emacs/blob/develop/docs/ind...
The TODO is regarding documentation iirc. All the languages supported are in the init.example.el file seen here: https://github.com/hlissner/doom-emacs/blob/develop/init.exa... Uncomment them, run doom refresh. Check their module under https://github.com/hlissner/doom-emacs/tree/develop/modules/... for any external requirements that they need or flags that they support.
;;hy ; readability of scheme w/ speed of python
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
Re: My Emacs Productivity Tricks/Hacks
#209I'm ashamed to say I've been using Emacs since 1992 but I have never been able to impress into my brain anything other than the minimal set of keystrokes to do basic editing. I feel like I need to be trapped on an island where the only thing I could do was learn emacs for a bit. There's so much there to dig into.
Re: My Emacs Productivity Tricks/Hacks
#210What is the emacs equivalent of package.json? (whenever I git clone my dotfiles on a new machine I usually have to comment out a bunch of stuff in my ~/.emacs because it's referencing packages which aren't installed, and I forgot where I installed them from, what version, etc...)
I use straight.el[0] for a reproducible package list. It basically clones the packages and stores a map of package->commit, so you can freeze your packages and reproduce them on another machine. You could also use the Guix package manager[1] or the Nix package manager[2] to achieve a similar effect. Reproducible software is much more stable! [0] https://github.com/raxod502/straight.el [1] https://guix.gnu.org/#guix-i…