Fork me on GitHub
#vim
<
2019-05-15
>
dharrigan11:05:10

Does anyone have good tips for replacing the "fn" with the similar "pretty symbols" on emacs?

dharrigan11:05:36

is there anything better?

dominicm12:05:58

Conceal is definitely what you are after, I recall seeing a conceal plugin like this, but I don't recall it's name

juhoteperi12:05:46

Fonts with ligatures also works in some editors/terminals: https://github.com/tonsky/FiraCode

👍 4
dominicm12:05:59

I use kitty which supports that

dharrigan12:05:59

Yup, have firacode installed (actually, nerdfonts, aka furacode)

dharrigan12:05:19

so, in visual studio code (and intellij) all looks nice

dharrigan12:05:26

This seems to work well enough

dharrigan12:05:40

Not that I may stick with it, just playing with l&f possibilities.

fedreg16:05:00

hi all, Can someone explain how I can eval the last symbol or sexp before the cursor with fireplace? (I would use C-c C-e in emacs). For example,,,

(+ 1 1)      CURSOR

snoe17:05:34

If you have vim-sexp you could do cp<M-b> Usually I just move the cursor the closing paren and cpp

fedreg17:05:38

@snoe Thx! will try it out. ...the problem is mainly if I need to eval a symbol with no parens, like an atom.

fedreg17:05:19

works great, thx

Noah Bogart17:05:47

I've been having a lot of trouble with vim-sexp, where I open parens, type some stuff, and then for some reason delete the closing parens, I can't input another because even in insert-mode, pressing ) moved the cursor to the end of the form

fedreg17:05:30

same exact problem here. ...figured it was just my vim ineptitude

Noah Bogart17:05:38

I had to stop using it (and stopped using paredit for similar reasons) because it's super annoying lol

fedreg17:05:40

Yes, tried both paredit / parinfer in emacs and both did more harm than good. Didn't invest the time into learning either properly

snoe17:05:47

if you have @a|tm you could cpaW

nate17:05:07

@nbtheduke I run into this as well, I usually cut and paste a paren from somewhere else (`x` and then p)

nate17:05:48

doesn't happen often, but it definitely is annoying when it does

Noah Bogart17:05:00

i had it happen like 4 times yesterday, lol

Noah Bogart17:05:02

was driving me nuts

nate17:05:08

sexp editing usefulness outweighs the annoyance for me

Noah Bogart17:05:09

maybe i just edit in the wrong way!

Chase18:05:57

I found the combo of parinfer-rust plugin and vim-sexp (with tpope's add-on) worked really well. I like "smart" mode parinfer. It lets me just line 'em up if I need to get a handle on it manually and it just works.

dave19:05:35

+1, that's the setup i use too

Noah Bogart19:05:11

i think i'm used to the workflow of pressing i then typing (str in front of a string I want to add stuff to, and then pressing ESC and shift-A to enter insert mode at the end of the line to type )

Noah Bogart19:05:57

feels backward to move to the ", type ysa") then i then type str

dave19:05:48

i get a lot of mileage out of vim-surround

dave19:05:12

like in that scenario, i would visually select the word i want to surround with parens, and do S) to surround it with parens

dave19:05:28

or ysiw) would work too

Noah Bogart19:05:44

yeah, if it's a single word that's chill, but when it's a long string, it's tough

Chase19:05:02

that's giving me the idea to put those on a local leader command

Noah Bogart19:05:06

lol again, maybe i'm just bad at editing

Chase19:05:07

like C-c in emacs

dave19:05:17

va" to select a string 🙂

dave19:05:04

that does also select the space before the string, though, for some reason :thinking_face:

dave19:05:46

could be something weird about my setup, not sure why it would do that

dave19:05:54

anyway, look into vim-surround, it's awesome for many reasons!

Noah Bogart19:05:17

yeah, i love vim-surround! it's one of my faves

dharrigan19:05:09

I've replaced vim-surround with vim-sandwich

dave19:05:29

interesting. what are the benefits of sandwich over surround?

dharrigan19:05:38

For me, it's the mnemonics, it suits me a lot better

dharrigan19:05:10

surround word

dharrigan19:05:20

sa = sandwich add (in my mind)

dharrigan19:05:23

w = text object

dharrigan19:05:49

sa$ start surround on line

dharrigan19:05:09

so, `sa$(" == surround this line with braces.

dharrigan19:05:15

easier for me to remember

dharrigan19:05:10

sd( == surround delete (

dharrigan19:05:21

try it out, if you don't like it, no problemo! 🙂

dave19:05:34

that does sound very nice

dave19:05:48

i think i'd have a hard time re-training my fingers, which have the vim-surround mappings ingrained

nate20:05:30

interesting, when I want to add (str ...) around something, I hit ,i and it wraps in parens and puts my cursor in the right place to type str

Noah Bogart20:05:23

which plug-in is that?

nate20:05:34

vim sexp does that

dave20:05:06

neat, i didn't know it did that

dave20:05:14

looks like it's <localleader>i

dave20:05:16

\i in my case

nate21:05:01

ah, forgot that I'd remapped my localleader

nate21:05:24

yeah, I also use ,w and ,o and the capitalized variants a lot too

nate21:05:49

haven't quite muscle-memorized the slurp/barf ones, but I really want to

nate21:05:06

man, there is a ton of stuff in there that is useful https://github.com/guns/vim-sexp