this post was submitted on 10 Nov 2023
9 points (100.0% liked)

Neovim

2187 readers
3 users here now

founded 1 year ago
MODERATORS
 

Hi, how can I associate to a var a path with both env variable and text? something like this for example: let trial=$HOME/dir1/dir2/$env1/dir3 I saw that let trial=$HOME works when I echo it, but if I add $HOME/dir1 it doesn't anymore....any help? Thanks

top 2 comments
sorted by: hot top controversial new old
[โ€“] chimay 1 points 1 year ago (1 children)

you can use a dot to concatenate strings :

let trial = $HOME . '/dir1/dir2/dir3'
[โ€“] dafunkkk 1 points 1 year ago

it works!!!....many thanks!!!