Let’s explore a few different ways to run commands in our terminal from
the comfort of neovim. Trust me, it’s cooler than it sounds! 😎
Here’s a list of commands that I use all the time (and you should too!).
# run a command:!sh <cmd>
# execute the line and replace with the output:.!sh
# execute without replacing:.w !sh
# execute without replacing selection and it will persist until next selection!:'<,'>w !sh
# execute a the line 8:8w !sh
# execute and replace a the line 8:8 !sh
# execute the selection in python:'<,'>w !python -c "$(cat)"# execute and replace the selection in python:'<,'>!python -c "$(cat)"
Hands-on
Hey! This is my absolute favorite command ever! I use it all the time when I’m
writing docs or README files because, let’s face it - who wants to manually
copy-paste code outputs? Not me! 😅 Instead of doing things the boring way, I
use this neat little trick to get things done quickly. Plus, it’s super handy
when you want to format text using other tools too like sql queries!
Let’s dive into the world of Docker Compose and environment variables, where
hilarity ensues and variables come alive (or do they?).
We’ve all been there. Playing hide and seek with environment variables in
Docker Compose. Let’s see how our dear friend MYVAR enjoys this grand game of
Peekaboo!
Today, I want to share this little trick I found out to make life a bit easier
with Takt on macOS. If you’re like me and
want a convenient button to check in and out of work while also seeing useful
info about your hours, you’re in for a treat.
Today, let’s chat about something that has both delighted and frustrated me in
equal measure: managing Python environments. You know how it is—sometimes you
feel on top of the world, and other times, you want to launch your computer out
the window.
Me encontraba trabajando tranquilamente cuando tuve la necesidad de copiar un
archivo de un servidor a mi maquina local para continuar trabajando, asi que me
dispuse a ejecutar scp <server> ~/file.sh y al ejecutarlo me encuentro con
este error:
1
2
3
4
5
6
$ bash ./file.sh
./file.sh: line 2: $'\r': command not found
")60)) * 5rror: invalid arithmetic operator (error token is "./file.sh: line 6: $'\r': command not found
./file.sh: line 7: syntax error near unexpected token `$'{\r''
'/file.sh: line 7: `show_progress(){
Solución
Me llevo unos minutos darme cuenta de que el problema venia por el formato del
archivo file.sh y no por la sintaxis.
He estado pensando mucho en el ‘Eterno Retorno’ de Nietzsche. Este concepto es
algo así como un faro que ilumina nuestro camino moral y nos ayuda a tomar
decisiones conscientes. Además, también puede darnos una idea muy clara de
quiénes somos y de si estamos a gusto con lo que vemos cuando nos miramos al
espejo.
Siempre he buscado una manera simple de incorporar diagramas directamente desde
Neovim, pero nunca había encontrado una solución sencilla hasta hoy.
Hasta ahora, no tenía un método sencillo para incluir diagramas, así que
delegaba ese trabajo a documentación externa al código, usando Mermaid. Aunque
estaba satisfecho con los resultados, me preguntaba cómo podría hacerlo más
simple. La respuesta vino justamente de mi experiencia con Mermaid.