In Vim, if you look at the source code for buflist_new() which adds a filename to the buffer list you'll find the part where the b: dictionary is initialized
// init b: variables
buf->b_vars = dict_alloc();
if (buf->b_vars == NULL)
init_var_dict(buf->b_vars, &buf->b_bufvar, ...
You have several ways to do it:
You can use <bar> which is the key code for | to be used in a mapping (Do not use | directly in your mapping):
nnoremap <leader>a :echo "fizz" <bar> echo "buzz"<CR>
This is the equivalent of running :echo "fizz" | echo "buzz" in the command line.
You can also ...
Mapping the escape key like this tends to break things because of the way certain special characters are handled (references needed/appreciated). I would also recommend avoiding <C-t> and <C-]> as they are pretty useful commands (:help CTRL-T, :help CTRL-]). You might want to know about gt and gT for navigating tabs. They also take a count.
A substitution like this works for all scenarios:
Grab everything within print brackets (.*) using regex
replace the match with a join statement surrounding the match
replace the print with log.info (or whatever is required)
Here is the test script if anyone wants to try it for themselves:
Building uppon Lie Ryan's answer and the code provided above (it is described here)
Change your function parsing the git branch as follows:
let g:gitparsedbranchname = ' '
let l:string = system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
let g:gitparsedbranchname = strlen(l:string) > 0?'['.l:...