New answers tagged


Minimal Verifiable Solution | is a vim character, and must be escaped. noremap ~~ :! \bash -c "git rev-parse --show-toplevel \\| xargs -I {} \ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q {}"<CR> Note: the following will work as well noremap ~~ :! \bash -c "git rev-parse --show-toplevel \ \| xargs -I {} \ctags -R --...


In Vim line continuation is done with a backslash on the new line. Like: noremap <C-F12> :!bash -c ' \git rev-parse --show-toplevel \\| xargs -I {} \ ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q {}' \<CR> Another point is the usage of | in the command line, as it is a command ...


Actually, you don’t need saved sessions for this; vim -S will happily accept any file containing vimscript. So, write some commands for your custom layout (stolen from the other answer) edit file3 leftabove vsplit file2 split file1 And then do vim -S layout.vim. This also helps avoid cluttering the command and makes it easier to edit the layout commands.


You could try it like this: vim -c "lefta vsplit file2.txt|split file1.txt" file3.txt With the option -c you can specify commands that should be executed after the first file was loaded. So here: The file file3.txt is loaded. The command lefta vsplit file2.txt|split file1.txt is executed. This are in fact two commandsseparated by | lefta vsplit ...

Top 50 recent answers are included