dotfiles/notes/vim/vim_backtick_expansion.md

18 lines
407 B
Markdown
Raw Permalink Normal View History

2023-12-23 20:13:52 -07:00
# Vim backtick expansion
```
:h backtick-expansion
```
Essentially allows command substitution with shell or vim commands. Requires a
lot of escaping special symbols though
```bash
:e `mktemp`
:e `=tempname()`
```
Edit a new temporary file. Very useful in gui contexts when you just quickly
need to jot something down. The equal sign in the second line expands a vim
function instead of calling a shell