So far, I like “pretzel-colon”, but “symbol-proc” is probably most accurate. 🥨
So far, I like “pretzel-colon”, but “symbol-proc” is probably most accurate. 🥨
But a beautifully crazy clever one at that.
What do we call Ruby’s &:
syntax in ["a", "b", "c"].map(&:upcase)
? Is that a “symbol-proc”?
In cases more complex than my initial example, I’d prefer hiding these local variables in private convenience methods so they’re well-named and easy to look up.
I do think I like that symbol-proc syntax example works for methods that don’t return self
, though. 🤔
I guess I have a Vim blog now. It’s called “vim quicktip from:jkreeftmeijer”. https://twitter.com/
Using vim-numbertoggle and tmux? Does toggling relative line numbers work for you when switching from Vim to another tmux pane? If not, I’d appreciate it if you’d chime in to this issue.
It sounds like Euruko 2019’s tickets are selling as fast as the 2011 edition in Berlin. 😯
https://twitter.com/
First batch sold out in 15 min 😳 https://t.co/
— Rayta 🏳️🌈 (@raytalks) January 10, 2019wC8CVY6Ln1
Please let me know if you try it out! I’m planning on adding more adapters, as I’ve been adding updates to Reddit, Dev.to and Pixelfed to my archive repository manually.
About posting to your personal site, I’ve set up https://updates.jeffkreeftmeijer.com to publish all updates from the repository. Is that what you mean, or would you like to use Dolphin to post articles to your blog, for example?
☝️ Aside from posting it to Mastodon and Twitter, that update was comitted to a Github repository for archival, which triggered a web hook that redeployed https://updates.jeffkreeftmeijer.com.
You know what’s even more even work than you’d think? Writing a tool that splits, converts and posts Markdown updates to Twitter, Mastodon and Github based on their contents.
It’s called Dolphin, and I’ve been using it myself for over a month now. 🐬
That’s NeoVim on the left and git on the right in tmux. I use Apple’s Terminal.app, and an updated version of Vim’s default colorscheme, combined with a terminal theme to set colors throughout the whole terminal. I wrote an article about my 16-color setup a while back, if you’d like to learn more.
I generally use a visual selection with gq
, but actually using the motions would indeed be faster. I’ll try to get gqap
into my muscle memory. Great addition, thanks!
Never underestimate the power of putting wet electronics in rice to dry them out. It seems to be back alive, but leaving it to dry today just in case. 🍚
It’s drying now. I didn’t notice it actually got into the board until the Caps Lock light started flashing, so I’m pretty sure I fried the circuit board. 😕
Accidentally Bandersnatched my keyboard. 🍵
You can toggle the macOS system appearance, the Terminal theme and Vim’s background between light and dark at once using an AppleScript, a Terminal theme that supports it, and a custom Vim command.
I set up https://github.com/
Not sure what’s wrong, and I don’t want to reboot to test and lose all of my sessions again. 🤷♀️
Vim quicktip #5: gq{motion}
wraps lines to fit the configured textwidth (:set textwidth
). If textwidth is not set, #vim will use the screen width (with a maximum of 79).
Use gqq
to format the current line, or gq
in visual select mode to format all selected lines.
This is especially useful to make sure the lines in your commit messages aren’t longer than 72 characters. vim-fugitive automatically sets the textwidth option to 72 when writing a commit message with :Gcommit
.
Backspace is another frequently-used key that’s too far away for comfort, indeed. I don’t use Delete (mapped to fn + Backspace on my keyboard), ever, though. 🤔
Thanks Tim, that means a lot. I’ll do my best to remember to hide a “therefore” in the next one. 🧐
@template Sorry! Just now noticing that https://twitter.com/
How ERB uses Binding
objects:
class DiyErb
def initialize(template)
@template = template
end
def result(binding)
@template.gsub(/<%=(.+?)%>/) do
binding.eval($1)
end
end
end
https://blog.appsignal.com/
Our editor added a “thus” to my article. 🧐
I use Control+h/j/k/l for switching both tmux and vim splits, and haven’t touched the timeout. So far so good.
I did run into the delay when switching out of insert mode and immediately saving the file. Trying an auto command to save when exiting insert mode now, which helps with that.
Update: now mostly used to using the Caps Lock key for both Escape (press) and Control (hold). Now to unlearn accidentally pressing Caps Lock instead of both Tab and Shift, which is new.