dorgan

dorgan

Yep this is mine (also linked in my first post)

2
Post #11
sodapopcan

sodapopcan

I just make the reach on an American QWERTY keyboard. I’m one of those “Pipes shall always start a new line”-folks so I get some yypwCs in for subsequent lines (having a key that would just type it would be even quicker, for sure). I also have some snippets, like >a<TAB>foo becomes |> assign(:foo, foo).

EDIT: I can’t believe I misspelled “QWERTY”. I think I’m packing it in for the day.

2
Post #12
cblavier

cblavier

You can also create a Siri shortcut and shout out “PIPE!” :face_with_tongue:

7
Post #13
garrison

garrison

Personally I just type it normally, it’s not a problem for me. Now the tilde (for sigils) on the other hand - that one tilts me every time :slight_smile: There is just something about that key that begs me to hit 1 instead…

4
Post #14
AndyL

AndyL

I just tried this in neovim - going to keep it!!

vim.api.nvim_set_keymap("i", "pp<tab>", "|>")
vim.api.nvim_set_keymap("i", "aa<tab>", "->")
6
Post #15
sodapopcan

sodapopcan

If you find the delay every time you type a or p jarring you can use an abbreviation instead:

abbrev pp <bar>>
abbrev aa ->

(sorry, I don’t know the neo-y code for that)

Then you can just press pp<space> and aa<space> with no delay. No (English) words end in those (er, well, “app”). Of course you could do other stuff like p> and a> which is fine as another nice thing about abbreviations is that they only expand if they aren’t part of a word, so aa and pp should be fine.

4
Post #16
jswanner

jswanner

I’ve had the following in my Neovim/vim config for ~15 years for Ruby:

vim.api.nvim_set_keymap("i", "<c-l>", "<Space>=><Space>")

When I got into Elixir, I added the following:

vim.api.nvim_set_keymap("i", "<c-h>", "<Space><-<Space>")
vim.api.nvim_set_keymap("i", "<c-j>", "<Space>-><Space>")
vim.api.nvim_set_keymap("i", "<c-k>", "<Space>|><Space>")
9
Post #17
codeanpeace

codeanpeace

I’ve been experimenting with the text substitution of ?> for |> and it’s been surprisingly effective and ergonomic as a single motion inward roll ¯\_(ツ)_/¯

3
Post #18
sodapopcan

sodapopcan

?. or /.? That’s a good one, especially if the latter.

EDIT: I responded too quickly

1
Post #19
codeanpeace

codeanpeace

Hahah, when you spot your typo and fix it within the editing grace period, but it’s all for naught as @sodapopcan catches you in the act :upside_down_face:

3
Post #20